mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not pretend that there were no conflicts (IDEA-66499)
This commit is contained in:
+1
-1
@@ -251,7 +251,7 @@ class InplaceIntroduceParameterPopup extends IntroduceParameterSettingsUI {
|
||||
processor.setPrepareSuccessfulSwingThreadCallback(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
conflictsFound[0] = false;
|
||||
conflictsFound[0] = processor.hasConflicts();
|
||||
}
|
||||
});
|
||||
processor.run();
|
||||
|
||||
+6
@@ -79,6 +79,7 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem
|
||||
private final TIntArrayList myParametersToRemove;
|
||||
private final PsiManager myManager;
|
||||
private JavaExpressionWrapper myInitializerWrapper;
|
||||
private boolean myHasConflicts;
|
||||
|
||||
/**
|
||||
* if expressionToSearch is null, search for localVariable
|
||||
@@ -199,6 +200,10 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem
|
||||
return occurenceManager.getOccurences();
|
||||
}
|
||||
|
||||
public boolean hasConflicts() {
|
||||
return myHasConflicts;
|
||||
}
|
||||
|
||||
private static class ReferencedElementsCollector extends JavaRecursiveElementWalkingVisitor {
|
||||
private final Set<PsiElement> myResult = new HashSet<PsiElement>();
|
||||
|
||||
@@ -250,6 +255,7 @@ public class IntroduceParameterProcessor extends BaseRefactoringProcessor implem
|
||||
processor.findConflicts(this, refUsages.get(), conflicts);
|
||||
}
|
||||
|
||||
myHasConflicts = !conflicts.isEmpty();
|
||||
return showConflicts(conflicts, usagesIn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user