mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-20 06:35:50 +02:00
Bug 333839 - NPE opening Rename refactoring dialog.
This commit is contained in:
parent
806b1a45b0
commit
9bf0315622
1 changed files with 6 additions and 2 deletions
|
@ -191,7 +191,11 @@ public class RenameSupport {
|
||||||
CRenameProcessor processor = (CRenameProcessor) refactoring.getProcessor();
|
CRenameProcessor processor = (CRenameProcessor) refactoring.getProcessor();
|
||||||
processor.lockIndex();
|
processor.lockIndex();
|
||||||
try {
|
try {
|
||||||
processor.checkInitialConditions(new NullProgressMonitor());
|
RefactoringStatus status = processor.checkInitialConditions(new NullProgressMonitor());
|
||||||
|
if (status.hasFatalError()) {
|
||||||
|
showInformation(shell, status);
|
||||||
|
return DialogResult.CANCELED;
|
||||||
|
}
|
||||||
if (starter.activate(wizard, shell, RenameMessages.CRefactory_title_rename,
|
if (starter.activate(wizard, shell, RenameMessages.CRefactory_title_rename,
|
||||||
processor.getSaveMode())) {
|
processor.getSaveMode())) {
|
||||||
return DialogResult.OK;
|
return DialogResult.OK;
|
||||||
|
@ -298,7 +302,7 @@ public class RenameSupport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showInformation(Shell parent, RefactoringStatus status) {
|
private static void showInformation(Shell parent, RefactoringStatus status) {
|
||||||
String message= status.getMessageMatchingSeverity(RefactoringStatus.FATAL);
|
String message= status.getMessageMatchingSeverity(RefactoringStatus.FATAL);
|
||||||
MessageDialog.openInformation(parent, RenameMessages.RenameSupport_dialog_title, message);
|
MessageDialog.openInformation(parent, RenameMessages.RenameSupport_dialog_title, message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue