merge multiple conflict dialogs (IDEADEV-39791)

This commit is contained in:
anna
2009-10-02 18:02:51 +04:00
parent a435ad948d
commit 832f94cf93
2 changed files with 5 additions and 6 deletions
@@ -232,6 +232,7 @@ public class MoveMembersProcessor extends BaseRefactoringProcessor {
catch (IncorrectOperationException e) {
LOG.error(e);
}
conflicts.putAll(analyzeMoveConflicts(myMembersToMove, myTargetClass, myNewVisibility));
RefactoringUtil.analyzeModuleConflicts(myProject, myMembersToMove, usages, myTargetClass, conflicts);
return showConflicts(conflicts);
}
@@ -268,8 +269,8 @@ public class MoveMembersProcessor extends BaseRefactoringProcessor {
if (!JavaResolveUtil.isAccessible(member, myTargetClass, modifierListCopies.get(member), element, accessObjectClass, null)) {
newVisibility = newVisibility == null ? VisibilityUtil.getVisibilityStringToDisplay(member) : newVisibility;
String message =
RefactoringBundle.message("0.with.1.visibility.is.not.accesible.from.2", RefactoringUIUtil.getDescription(member, true),
newVisibility, RefactoringUIUtil.getDescription(ConflictsUtil.getContainer(element), true));
CommonRefactoringUtil.capitalize(RefactoringBundle.message("0.with.1.visibility.is.not.accesible.from.2", RefactoringUIUtil.getDescription(member, false),
newVisibility, RefactoringUIUtil.getDescription(ConflictsUtil.getContainer(element), true)));
conflicts.put(member, message);
}
}
@@ -294,9 +295,7 @@ public class MoveMembersProcessor extends BaseRefactoringProcessor {
CommonRefactoringUtil.showErrorMessage(MoveMembersImpl.REFACTORING_NAME, message, HelpID.MOVE_MEMBERS, myProject);
return;
}
if (canRefactor()) {
super.doRun();
}
super.doRun();
}
private boolean canRefactor() {
@@ -244,7 +244,7 @@ method.does.not.have.a.body=Method {0} does not have a body.
method.has.an.empty.body=Method {0} has an empty body.
idea.has.not.found.any.code.that.can.be.replaced.with.method.call={0} has not found any code that can be replaced with method call
method.duplicates.found.message={0, choice, 1#1 code fragment|2#{0,number} code fragments} found
0.with.1.visibility.is.not.accesible.from.2={0} with {1} visibility is not accesible from {2}
0.with.1.visibility.is.not.accesible.from.2={0} with {1} visibility won't be accesible from {2}
0.contains.call.with.null.argument.for.parameter.1={0} contains call with null argument for parameter {1}
no.members.selected=No members selected
0.already.exists.in.the.target.class={0} already exists in the target class.