replace title with action name for IDEA-CR-43679

This commit is contained in:
Alexey Kudravtsev
2019-02-20 19:21:11 +03:00
parent 98ccf02534
commit 0c98b4a136
11 changed files with 13 additions and 13 deletions
@@ -50,7 +50,7 @@ class SuperMethodWarningDialog extends DialogWrapper {
myIsSuperAbstract = isSuperAbstract;
myIsParentInterface = isParentInterface;
myIsContainedInInterface = isContainedInInterface;
setTitle("Method Overrides Found");
setTitle("Method Overrides");
setButtonsAlignment(SwingConstants.CENTER);
setOKButtonText(CommonBundle.getYesButtonText());
init();
@@ -129,7 +129,7 @@ public class DuplicatesImpl {
showAll.set(allChosen);
if (allChosen && confirmDuplicatePrompt != null && prompt == null) {
if (Messages.showOkCancelDialog(project, "In order to replace all occurrences method signature will be changed. Proceed?",
"Signature Change Warning", CommonBundle.getContinueButtonText(), CommonBundle.getCancelButtonText(), Messages.getWarningIcon()) !=
"Change Method Signature", CommonBundle.getContinueButtonText(), CommonBundle.getCancelButtonText(), Messages.getWarningIcon()) !=
Messages.OK) return true;
}
if (promptDialog.getExitCode() == FindManager.PromptResult.SKIP) return false;
@@ -251,7 +251,7 @@ class DragHelper extends MouseDragHelper {
if (myTabs.getVisibleRect().contains(p) && myPressedOnScreenPoint.distance(new RelativePoint(event).getScreenPoint()) > 15) {
final int answer = Messages.showOkCancelDialog(myTabs,
IdeBundle.message("alphabetical.mode.is.on.warning"),
"Tabs Order Conflict",
"Reorder Tabs",
"Off", "On",
Messages.getQuestionIcon());
if (answer == Messages.OK) {
@@ -108,7 +108,7 @@ private fun onError(e: Exception, errorBean: ErrorBean, callback: Consumer<Submi
ApplicationManager.getApplication().invokeLater {
if (e is UpdateAvailableException) {
val message = DiagnosticBundle.message("error.report.new.eap.build.message", e.message)
val title = "Build Available"
val title = "Report Exception"
val icon = Messages.getWarningIcon()
if (parentComponent.isShowing) Messages.showMessageDialog(parentComponent, message, title, icon)
else Messages.showMessageDialog(project, message, title, icon)
@@ -131,7 +131,7 @@ public class InstalledPluginsManagerMain extends PluginManagerMain {
if (ourState.wasInstalled(pluginDescriptor.getPluginId())) {
String message = "Plugin '" + pluginDescriptor.getName() + "' was already installed";
MessagesEx.showWarningDialog(parent, message, "Already Installed");
MessagesEx.showWarningDialog(parent, message, "Install Plugin");
return false;
}
@@ -180,7 +180,7 @@ public class InstalledPluginsManagerMain extends PluginManagerMain {
if (!notInstalled.isEmpty()) {
String deps = StringUtil.join(notInstalled, PluginId::toString, ", ");
String message = "Plugin " + pluginDescriptor.getName() + " depends on unknown plugin" + (notInstalled.size() > 1 ? "s " : " ") + deps;
MessagesEx.showWarningDialog(parent, message, "Unknown Plugin Found");
MessagesEx.showWarningDialog(parent, message, "Install Plugin");
}
if (!disabledIds.isEmpty()) {
final Set<IdeaPluginDescriptor> dependencies = new HashSet<>();
@@ -192,7 +192,7 @@ public class InstalledPluginsManagerMain extends PluginManagerMain {
String part = "disabled plugin" + (dependencies.size() > 1 ? "s " : " ");
String deps = StringUtil.join(dependencies, IdeaPluginDescriptor::getName, ", ");
String message = "Plugin " + pluginDescriptor.getName() + " depends on " + part + deps + ". Enable " + part.trim() + "?";
if (MessagesEx.showOkCancelDialog(parent, message, "Plugin Dependency Found", Messages.getWarningIcon()) == Messages.OK) {
if (MessagesEx.showOkCancelDialog(parent, message, "Install Plugin", Messages.getWarningIcon()) == Messages.OK) {
model.enableRows(dependencies.toArray(new IdeaPluginDescriptor[0]), Boolean.TRUE);
}
}
@@ -52,7 +52,7 @@ public class ExportToFileUtil {
int result = Messages.showYesNoCancelDialog(
project,
IdeBundle.message("error.text.file.already.exists", fileName),
"File Already Exists",
"Export To File",
IdeBundle.message("action.overwrite"),
IdeBundle.message("action.append"),
CommonBundle.getCancelButtonText(),
@@ -183,7 +183,7 @@ public class CreatePatchCommitExecutor extends LocalCommitExecutor implements Pr
WaitForProgressToShow.runOrInvokeAndWaitAboveProgress(
() -> result[0] = Messages.showYesNoDialog(myProject, "File " + file.getName() + " (" + file.getParent() + ")" +
" already exists.\nDo you want to overwrite it?",
"File Already Exists",
"Save Patch File",
"Overwrite", "Cancel",
Messages.getWarningIcon()));
if (Messages.NO == result[0]) return false;
@@ -66,7 +66,7 @@ public interface CoverageSuite extends JDOMExternalizable {
final String fileName = getCoverageDataFileName();
if (!FileUtil.isAncestor(PathManager.getSystemPath(), fileName, false)) {
String message = "Would you like to delete file \'" + fileName + "\' " + "on disk?";
if (Messages.showYesNoDialog(getProject(), message, "Delete File Warning", Messages.getWarningIcon()) != Messages.YES) {
if (Messages.showYesNoDialog(getProject(), message, "Delete File", Messages.getWarningIcon()) != Messages.YES) {
return;
}
}
@@ -95,7 +95,7 @@ public class JUnit4Framework extends JavaTestFramework {
int exit = ApplicationManager.getApplication().isUnitTestMode() ?
Messages.OK :
Messages.showOkCancelDialog("Method setUp already exist but is not annotated as @Before. Annotate?",
"SetUp Not Annotated",
"Create SetUp",
Messages.getWarningIcon());
if (exit == Messages.OK) {
new AddAnnotationFix(beforeAnnotationName, existingMethod).invoke(existingMethod.getProject(), null, existingMethod.getContainingFile());
@@ -89,7 +89,7 @@ public class JUnit5Framework extends JavaTestFramework {
int exit = ApplicationManager.getApplication().isUnitTestMode() ?
Messages.OK :
Messages.showOkCancelDialog("Method setUp already exist but is not annotated as @BeforeEach. Annotate?",
"SetUp Not Annotated",
"Create SetUp",
Messages.getWarningIcon());
if (exit == Messages.OK) {
new AddAnnotationFix(JUnitUtil.BEFORE_EACH_ANNOTATION_NAME, existingMethod).invoke(existingMethod.getProject(), null, existingMethod.getContainingFile());
@@ -102,7 +102,7 @@ public class TestNGFramework extends JavaTestFramework {
int exit = ApplicationManager.getApplication().isUnitTestMode() ?
Messages.YES :
Messages.showYesNoDialog(manager.getProject(), "Method \'" + setUpName + "\' already exist but is not annotated as @BeforeMethod.",
"SetUp Not Annotated",
"Create SetUp",
"Annotate",
"Create new method",
Messages.getWarningIcon());