do not pretend that there were no conflicts (IDEA-66499)

This commit is contained in:
anna
2011-03-17 21:26:15 +01:00
parent fd0eb07c81
commit 59f29c05c3
2 changed files with 7 additions and 1 deletions
@@ -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();
@@ -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);
}