[spring-mvc] making `DomSpringBeanPsiTarget` equal to the `DomTarget` of the same...
authorNicolay Mitropolsky <nicolay.mitropolsky@jetbrains.com>
Thu, 13 Aug 2020 17:29:52 +0000 (20:29 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 13 Aug 2020 18:00:02 +0000 (18:00 +0000)
otherwise new Symbol-bases usage-search will consider the DomTarget-declaration and DomSpringBeanPsiTarget as a different declarations

GitOrigin-RevId: 36e044808d8059e37b1243659e7e78d7fc968c07

platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java

index 8876789205c7f90d397cdd49eb34c1028ed45080..3dd37b99ee0bc0f4a586a7dd9ade504e764aebc1 100644 (file)
@@ -883,7 +883,9 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig
   @Override
   public Collection<Usage> testFindUsagesUsingAction(String @NotNull ... fileNames) {
     assertInitialized();
-    configureByFiles(fileNames);
+    if (fileNames.length > 0) { // don't change configured files if already configured
+      configureByFiles(fileNames);
+    }
     EdtTestUtil.runInEdtAndWait(() -> myEditorTestFixture.performEditorAction(IdeActions.ACTION_FIND_USAGES));
     Disposer.register(getTestRootDisposable(), () -> {
       UsageViewContentManager usageViewManager = UsageViewContentManager.getInstance(getProject());