mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
friendly dialog
This commit is contained in:
@@ -47,7 +47,7 @@ occurence.info.usage={0,choice, 0#Not Found|1#1 usage|2#{0,number} usages}{1,cho
|
||||
occurence.info.occurence={0,choice, 0#Not Found|1#1 occurrence|2#{0,number} occurrences}{1,choice, 0#|1# in 1 file|2# in {1,number} files}
|
||||
occurence.info.reference={0,choice, 0#Not Found|1#1 reference|2#{0,number} references}{1,choice, 0#|1# in 1 file|2# in {1,number} files}
|
||||
default.package.presentable.name=<default>
|
||||
error.common.title=Error
|
||||
changes.detected.error.title=Changes Detected
|
||||
usage.target.xml.tag.of.file={0} of file {1}
|
||||
usage.target.package.in.directory={0} (in {1})
|
||||
usage.target.exception=Exception
|
||||
|
||||
@@ -1286,24 +1286,17 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra
|
||||
if (!checkReadonlyUsages()) return;
|
||||
PsiDocumentManager.getInstance(myProject).commitAllDocuments();
|
||||
if (myCannotMakeString != null && myChangesDetected) {
|
||||
String title = UsageViewBundle.message("changes.detected.error.title");
|
||||
if (canPerformReRun() && allTargetsAreValid()) {
|
||||
int answer = Messages.showYesNoDialog(
|
||||
myProject,
|
||||
myCannotMakeString + "\n" + UsageViewBundle.message("dialog.rerun.search"),
|
||||
UsageViewBundle.message("error.common.title"),
|
||||
Messages.getErrorIcon()
|
||||
);
|
||||
String[] options = {UsageViewBundle.message("action.description.rerun"), UsageViewBundle.message("usage.view.cancel.button")};
|
||||
String message = myCannotMakeString + "\n\n" + UsageViewBundle.message("dialog.rerun.search");
|
||||
int answer = Messages.showDialog(myProject, message, title, options, 0, Messages.getErrorIcon());
|
||||
if (answer == 0) {
|
||||
refreshUsages();
|
||||
}
|
||||
}
|
||||
else {
|
||||
Messages.showMessageDialog(
|
||||
myProject,
|
||||
myCannotMakeString,
|
||||
UsageViewBundle.message("error.common.title"),
|
||||
Messages.getErrorIcon()
|
||||
);
|
||||
Messages.showMessageDialog(myProject, myCannotMakeString, title, Messages.getErrorIcon());
|
||||
//todo[myakovlev] request focus to tree
|
||||
//myUsageView.getTree().requestFocus();
|
||||
}
|
||||
@@ -1313,15 +1306,14 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra
|
||||
close();
|
||||
|
||||
CommandProcessor.getInstance().executeCommand(
|
||||
myProject, new Runnable() {
|
||||
myProject, new Runnable() {
|
||||
public void run() {
|
||||
myProcessRunnable.run();
|
||||
}
|
||||
},
|
||||
myCommandName,
|
||||
null
|
||||
myCommandName,
|
||||
null
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user