mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
LAB-62 get rid of static *Bundle usages: more fields
GitOrigin-RevId: 69ded152ad5996ae07c45dc4fd6ff20224d25572
This commit is contained in:
committed by
intellij-monorepo-bot
parent
240e2cea4c
commit
38f6f13df8
+2
-2
@@ -77,7 +77,7 @@ class AnalyzeModuleDependencyAction extends AnAction {
|
||||
if (usedEntries.isEmpty()) {
|
||||
String message = "No code dependencies were found." + generateSkipImportsWarning() + " Would you like to remove the dependency?";
|
||||
if (Messages.showOkCancelDialog(myProject, message, getTemplateText(), CommonBundle.message("button.remove"),
|
||||
Messages.getCANCEL_BUTTON(),
|
||||
Messages.getCancelButton(),
|
||||
Messages.getWarningIcon()) == Messages.OK) {
|
||||
myPanel.getRootModel().removeOrderEntry(selectedEntry);
|
||||
}
|
||||
@@ -96,7 +96,7 @@ class AnalyzeModuleDependencyAction extends AnAction {
|
||||
String message = "No direct code dependencies were found." + generateSkipImportsWarning() + "\nHowever " + usedExportedEntriesText + " exported by '"
|
||||
+ StringUtil.decapitalize(selectedEntry.getPresentableName()) + "' " + (usedEntries.size() > 1 ? "are" : "is") + " used in code.\n" +
|
||||
"Do you want to replace dependency on '" + selectedEntry.getPresentableName() + "' by " + replacementText + "?";
|
||||
String[] options = {"Replace", "Show Dependencies", Messages.getCANCEL_BUTTON()};
|
||||
String[] options = {"Replace", "Show Dependencies", Messages.getCancelButton()};
|
||||
switch (Messages.showDialog(myProject, message, getTemplateText(), options, 0, Messages.getWarningIcon())) {
|
||||
case 0:
|
||||
InlineModuleDependencyAction.inlineEntry(myPanel, selectedEntry, usedEntries::contains);
|
||||
|
||||
+4
-4
@@ -248,11 +248,11 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
|
||||
}
|
||||
else {
|
||||
if (access.equals(PsiModifier.PACKAGE_LOCAL)) {
|
||||
message = getCAN_BE_PACKAGE_LOCAL();
|
||||
message = getCanBePackageLocal();
|
||||
quickFixName += VisibilityUtil.toPresentableText(PsiModifier.PACKAGE_LOCAL);
|
||||
}
|
||||
else {
|
||||
message = getCAN_BE_PROTECTED();
|
||||
message = getCanBeProtected();
|
||||
quickFixName += VisibilityUtil.toPresentableText(PsiModifier.PROTECTED);
|
||||
}
|
||||
}
|
||||
@@ -695,11 +695,11 @@ public final class VisibilityInspection extends GlobalJavaBatchInspectionTool {
|
||||
return InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PRIVATE));
|
||||
}
|
||||
|
||||
private static String getCAN_BE_PACKAGE_LOCAL() {
|
||||
private static String getCanBePackageLocal() {
|
||||
return InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PACKAGE_LOCAL));
|
||||
}
|
||||
|
||||
private static String getCAN_BE_PROTECTED() {
|
||||
private static String getCanBeProtected() {
|
||||
return InspectionsBundle.message("inspection.visibility.compose.suggestion", VisibilityUtil.toPresentableText(PsiModifier.PROTECTED));
|
||||
}
|
||||
}
|
||||
|
||||
+7
-7
@@ -43,8 +43,8 @@ public class JavaAutoImportOptions implements AutoImportOptionsProvider {
|
||||
myProject = project;
|
||||
|
||||
mySmartPasteCombo.addItem(getInsertImportsAlways());
|
||||
mySmartPasteCombo.addItem(getINSERT_IMPORTS_ASK());
|
||||
mySmartPasteCombo.addItem(getINSERT_IMPORTS_NONE());
|
||||
mySmartPasteCombo.addItem(getInsertImportsAsk());
|
||||
mySmartPasteCombo.addItem(getInsertImportsNone());
|
||||
|
||||
myExcludePackagesTable = new ExcludeTable(project);
|
||||
myExcludeFromImportAndCompletionPanel.add(myExcludePackagesTable.getComponent(), BorderLayout.CENTER);
|
||||
@@ -65,11 +65,11 @@ public class JavaAutoImportOptions implements AutoImportOptionsProvider {
|
||||
break;
|
||||
|
||||
case CodeInsightSettings.NO:
|
||||
mySmartPasteCombo.setSelectedItem(getINSERT_IMPORTS_NONE());
|
||||
mySmartPasteCombo.setSelectedItem(getInsertImportsNone());
|
||||
break;
|
||||
|
||||
case CodeInsightSettings.ASK:
|
||||
mySmartPasteCombo.setSelectedItem(getINSERT_IMPORTS_ASK());
|
||||
mySmartPasteCombo.setSelectedItem(getInsertImportsAsk());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ public class JavaAutoImportOptions implements AutoImportOptionsProvider {
|
||||
if (getInsertImportsAlways().equals(selectedItem)) {
|
||||
return CodeInsightSettings.YES;
|
||||
}
|
||||
else if (getINSERT_IMPORTS_NONE().equals(selectedItem)) {
|
||||
else if (getInsertImportsNone().equals(selectedItem)) {
|
||||
return CodeInsightSettings.NO;
|
||||
}
|
||||
else {
|
||||
@@ -142,11 +142,11 @@ public class JavaAutoImportOptions implements AutoImportOptionsProvider {
|
||||
return ApplicationBundle.message("combobox.insert.imports.all");
|
||||
}
|
||||
|
||||
private static String getINSERT_IMPORTS_ASK() {
|
||||
private static String getInsertImportsAsk() {
|
||||
return ApplicationBundle.message("combobox.insert.imports.ask");
|
||||
}
|
||||
|
||||
private static String getINSERT_IMPORTS_NONE() {
|
||||
private static String getInsertImportsNone() {
|
||||
return ApplicationBundle.message("combobox.insert.imports.none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class CyclicDependenciesPanel extends JPanel implements Disposable, DataP
|
||||
|
||||
private static PackageDependenciesNode hideEmptyMiddlePackages(PackageDependenciesNode node, StringBuffer result){
|
||||
if (node.getChildCount() == 0 || node.getChildCount() > 1 || node.getChildCount() == 1 && node.getChildAt(0) instanceof FileNode){
|
||||
result.append(result.length() != 0 ? "." : "").append(node.toString().equals(getDEFAULT_PACKAGE_ABBREVIATION()) ? "" : node.toString());//toString()
|
||||
result.append(result.length() != 0 ? "." : "").append(node.toString().equals(getDefaultPackageAbbreviation()) ? "" : node.toString());//toString()
|
||||
} else {
|
||||
if (node.getChildCount() == 1){
|
||||
PackageDependenciesNode child = (PackageDependenciesNode)node.getChildAt(0);
|
||||
@@ -171,7 +171,7 @@ public class CyclicDependenciesPanel extends JPanel implements Disposable, DataP
|
||||
if (child instanceof PackageNode){
|
||||
node.removeAllChildren();
|
||||
result.append(result.length() != 0 ? "." : "")
|
||||
.append(node.toString().equals(getDEFAULT_PACKAGE_ABBREVIATION()) ? "" : node.toString());
|
||||
.append(node.toString().equals(getDefaultPackageAbbreviation()) ? "" : node.toString());
|
||||
node = hideEmptyMiddlePackages(child, result);
|
||||
((PackageNode)node).setPackageName(result.toString());//toString()
|
||||
}
|
||||
@@ -503,7 +503,7 @@ public class CyclicDependenciesPanel extends JPanel implements Disposable, DataP
|
||||
}
|
||||
}
|
||||
|
||||
public static String getDEFAULT_PACKAGE_ABBREVIATION() {
|
||||
public static String getDefaultPackageAbbreviation() {
|
||||
return AnalysisScopeBundle.message("dependencies.tree.node.default.package.abbreviation");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class PackageNode extends PackageDependenciesNode {
|
||||
myPackage = aPackage;
|
||||
myPackageName = showFQName ? aPackage.getQualifiedName() : aPackage.getName();
|
||||
if (myPackageName == null || myPackageName.length() == 0) {
|
||||
myPackageName = CyclicDependenciesPanel.getDEFAULT_PACKAGE_ABBREVIATION();
|
||||
myPackageName = CyclicDependenciesPanel.getDefaultPackageAbbreviation();
|
||||
}
|
||||
String packageQName = aPackage.getQualifiedName();
|
||||
if (packageQName.length() == 0) {
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
class MigrateGetterNameSetting {
|
||||
private static final String CODE_ALWAYS_YES = "Always Migrate Method Names";
|
||||
private static final String CODE_ALWAYS_NO = "Never Migrate Method Names";
|
||||
private static final String[] CODES = new String[]{CODE_ALWAYS_YES, Messages.getYES_BUTTON(), CODE_ALWAYS_NO, Messages.getNO_BUTTON()};
|
||||
private static final String[] CODES = new String[]{CODE_ALWAYS_YES, Messages.getYesButton(), CODE_ALWAYS_NO, Messages.getNoButton()};
|
||||
|
||||
private final AtomicReference<Boolean> myGlobalValue = new AtomicReference<>();
|
||||
|
||||
|
||||
+37
-37
@@ -181,69 +181,69 @@ class JavaPredefinedConfigurations {
|
||||
|
||||
// Generics
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.generic.classes"), "class 'GenericClass<'_TypeParameter+> {} ",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.generic.methods"), "<'_TypeParameter+> '_Type '_Method('_ParameterType '_Parameter*);",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.typed.symbol"), "'Symbol <'_GenericArgument+>",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.generic.casts"), "( '_Type <'_GenericArgument+> ) '_Expr",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.type.var.substitutions.in.intanceof.with.generic.types"), "'_Expr instanceof '_Type <'Substitutions+> ",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.variables.of.generic.types"), "'_Type <'_GenericArgument+> 'Var = '_Init?;",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.diamond.operators"), "new 'Class<>('_Argument*)",
|
||||
getGENERICS_TYPE()),
|
||||
getGenericsType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.method.returns.bounded.wildcard"),
|
||||
"[script( \"!Method.hasModifierProperty(com.intellij.psi.PsiModifier.ABSTRACT)\" )]'_Type<? extends '_Bound> 'Method('_ParameterType '_Parameter*);",
|
||||
getGENERICS_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
getGenericsType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.generic.constructors"), "<'_TypeParameter+> 'Class('_ParameterType '_Parameter*) {\n '_Statement*;\n}",
|
||||
getGENERICS_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
getGenericsType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
|
||||
// Add comments and metadata
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.comments"), "/* 'CommentContent */", getMETADATA_TYPE()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.comments"), "/* 'CommentContent */", getMetadataType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.javadoc.annotated.class"),
|
||||
"/**\n" +
|
||||
" * '_Comment\n" +
|
||||
" * @'_Tag* '_TagValue*\n" +
|
||||
" */\n" +
|
||||
"class '_Class {\n}", getMETADATA_TYPE()),
|
||||
"class '_Class {\n}", getMetadataType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.javadoc.annotated.methods"),
|
||||
"/**\n" +
|
||||
" * '_Comment\n" +
|
||||
" * @'_Tag* '_TagValue*\n" +
|
||||
" */\n" +
|
||||
"'_Type? '_Method('_ParameterType '_Parameter*);",
|
||||
getMETADATA_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
getMetadataType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.javadoc.annotated.fields"),
|
||||
"/**\n" +
|
||||
" * '_Comment\n" +
|
||||
" * @'_Tag* '_TagValue*\n" +
|
||||
" */\n" +
|
||||
"'_Type+ 'Field+ = '_Init*;",
|
||||
getMETADATA_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.javadoc.tags"), "/** @'Tag+ '_TagValue* */", getMETADATA_TYPE()),
|
||||
getMetadataType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.javadoc.tags"), "/** @'Tag+ '_TagValue* */", getMetadataType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.xdoclet.metadata"), "/** @'Tag \n '_Property+\n*/",
|
||||
getMETADATA_TYPE()),
|
||||
getMetadataType()),
|
||||
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.annotations"), "@'_Annotation", getMETADATA_TYPE()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.annotations"), "@'_Annotation", getMetadataType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.annotated.class"),
|
||||
"@'_Annotation\n" +
|
||||
"class 'Class {}", getMETADATA_TYPE()),
|
||||
"class 'Class {}", getMetadataType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.annotated.fields"),
|
||||
"@'_Annotation+\n" +
|
||||
"'_FieldType 'Field+ = '_Init?;\n",
|
||||
getMETADATA_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
getMetadataType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.annotated.methods"),
|
||||
"@'_Annotation+\n'_MethodType '_Method('_ParameterType '_Parameter*);",
|
||||
getMETADATA_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
getMetadataType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.not.annotated.methods"),
|
||||
"@'_Annotation{0,0}\n'_MethodType '_Method('_ParameterType '_Parameter*);",
|
||||
getMETADATA_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
getMetadataType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.annotation.declarations"),
|
||||
"@interface 'Interface {}", getMETADATA_TYPE()),
|
||||
"@interface 'Interface {}", getMetadataType()),
|
||||
|
||||
// J2EE templates
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.struts.1.1.actions"),"public class '_StrutsActionClass extends '_ParentClass*:Action {\n" +
|
||||
@@ -251,7 +251,7 @@ class JavaPredefinedConfigurations {
|
||||
" ActionForm '_form,\n" +
|
||||
" HttpServletRequest '_request,\n" +
|
||||
" HttpServletResponse '_response);\n" +
|
||||
"}", getJ2EE_TYPE()),
|
||||
"}", getJ2EEType()),
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.entity.ejb"),"class 'EntityBean implements EntityBean {\n" +
|
||||
" EntityContext '_Context?;\n\n" +
|
||||
" public void setEntityContext(EntityContext '_Context2);\n\n" +
|
||||
@@ -261,7 +261,7 @@ class JavaPredefinedConfigurations {
|
||||
" public void ejbPassivate();\n\n" +
|
||||
" public void ejbRemove();\n\n" +
|
||||
" public void ejbStore();\n" +
|
||||
"}", getJ2EE_TYPE()),
|
||||
"}", getJ2EEType()),
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.session.ejb"),"class 'SessionBean implements SessionBean {\n" +
|
||||
" SessionContext '_Context?;\n\n" +
|
||||
" public void '_setSessionContext(SessionContext '_Context2);\n\n" +
|
||||
@@ -269,22 +269,22 @@ class JavaPredefinedConfigurations {
|
||||
" public void ejbActivate();\n\n" +
|
||||
" public void ejbPassivate();\n\n" +
|
||||
" public void ejbRemove();\n" +
|
||||
"}", getJ2EE_TYPE()),
|
||||
"}", getJ2EEType()),
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.ejb.interface"),"interface 'EjbInterface extends EJBObject {\n" +
|
||||
" '_Type '_Method+('_ParameterType '_Param*);\n" +
|
||||
"}", getJ2EE_TYPE()),
|
||||
"}", getJ2EEType()),
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.servlets"),"public class 'Servlet extends '_ParentClass:*HttpServlet {\n" +
|
||||
" public void '_InitServletMethod?:init ();\n" +
|
||||
" public void '_DestroyServletMethod?:destroy ();\n" +
|
||||
" void '_ServiceMethod?:*service (HttpServletRequest '_request, HttpServletResponse '_response);\n" +
|
||||
" void '_SpecificServiceMethod*:do.* (HttpServletRequest '_request2, HttpServletResponse '_response2); \n" +
|
||||
"}", getJ2EE_TYPE()),
|
||||
"}", getJ2EEType()),
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.filters"),"public class 'Filter implements Filter {\n" +
|
||||
" public void '_DestroyFilterMethod?:*destroy ();\n" +
|
||||
" public void '_InitFilterMethod?:*init ();\n" +
|
||||
" public void '_FilteringMethod:*doFilter (ServletRequest '_request,\n" +
|
||||
" ServletResponse '_response,FilterChain '_chain);\n" +
|
||||
"}", getJ2EE_TYPE()),
|
||||
"}", getJ2EEType()),
|
||||
|
||||
// Misc types
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.serializable.classes.and.their.serialization.implementation"),
|
||||
@@ -295,15 +295,15 @@ class JavaPredefinedConfigurations {
|
||||
" private void '_SerializationReadHandler?:readObject (ObjectInputStream '_stream2) throws IOException, ClassNotFoundException;\n" +
|
||||
" Object '_SpecialSerializationReadHandler?:readResolve () throws ObjectStreamException;\n" +
|
||||
" Object '_SpecialSerializationWriteHandler?:writeReplace () throws ObjectStreamException;\n" +
|
||||
"}", getMISC_TYPE()),
|
||||
"}", getMiscType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.cloneable.implementations"),
|
||||
"class '_Class implements '_Interface:*Cloneable {\n" +
|
||||
" Object 'CloningMethod:*clone ();\n" +
|
||||
"}", getMISC_TYPE()),
|
||||
"}", getMiscType()),
|
||||
createSearchTemplateInfoSimple(SSRBundle.message("predefined.configuration.]junit.test.cases"),
|
||||
"public class 'TestCase extends '_TestCaseClazz:*TestCase {\n" +
|
||||
" public void '_testMethod+:test.* ();\n" +
|
||||
"}", getMISC_TYPE()),
|
||||
"}", getMiscType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.singletons"),
|
||||
"class 'Class {\n" +
|
||||
" private 'Class('_ParameterType '_Parameter*) {\n" +
|
||||
@@ -314,7 +314,7 @@ class JavaPredefinedConfigurations {
|
||||
" '_SomeStatement*;\n" +
|
||||
" return '_Instance;\n" +
|
||||
" }\n"+
|
||||
"}", getMISC_TYPE()),
|
||||
"}", getMiscType()),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.similar.methods.structure"),
|
||||
"'_RetType '_Method('_ParameterType '_Parameter*) throws 'ExceptionType {\n" +
|
||||
" try {\n" +
|
||||
@@ -323,10 +323,10 @@ class JavaPredefinedConfigurations {
|
||||
" '_CatchStatement*;\n" +
|
||||
" throw new 'ExceptionType('_ExceptionConstructorArgs*);\n" +
|
||||
" }\n" +
|
||||
"}", getMISC_TYPE(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
"}", getMiscType(), StdFileTypes.JAVA, JavaStructuralSearchProfile.MEMBER_CONTEXT),
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.bean.info.classes"),
|
||||
"class 'A implements '_:*java\\.beans\\.BeanInfo {\n" +
|
||||
"}", getMISC_TYPE()),
|
||||
"}", getMiscType()),
|
||||
|
||||
// interesting types
|
||||
createSearchTemplateInfo(SSRBundle.message("predefined.configuration.symbol"), "'Symbol", getInterestingType()),
|
||||
@@ -380,7 +380,7 @@ class JavaPredefinedConfigurations {
|
||||
return SSRBundle.message("interesting.category");
|
||||
}
|
||||
|
||||
private static String getJ2EE_TYPE() {
|
||||
private static String getJ2EEType() {
|
||||
return SSRBundle.message("j2ee.category");
|
||||
}
|
||||
|
||||
@@ -392,15 +392,15 @@ class JavaPredefinedConfigurations {
|
||||
return SSRBundle.message("class.category");
|
||||
}
|
||||
|
||||
private static String getMETADATA_TYPE() {
|
||||
private static String getMetadataType() {
|
||||
return SSRBundle.message("metadata.category");
|
||||
}
|
||||
|
||||
private static String getMISC_TYPE() {
|
||||
private static String getMiscType() {
|
||||
return SSRBundle.message("misc.category");
|
||||
}
|
||||
|
||||
private static String getGENERICS_TYPE() {
|
||||
private static String getGenericsType() {
|
||||
return SSRBundle.message("generics.category");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public abstract class DvcsTaskHandler<R extends Repository> extends VcsTaskHandl
|
||||
"<html>The following repositories already have specified " + myBranchType + "<b>" + taskName + "</b>:<br>" +
|
||||
StringUtil.join(problems, "<br>") + ".<br>" +
|
||||
"Do you want to checkout existing " + myBranchType + "?", StringUtil.capitalize(myBranchType) + " Already Exists",
|
||||
new String[]{Messages.getYES_BUTTON(), Messages.getNO_BUTTON()}, 0,
|
||||
new String[]{Messages.getYesButton(), Messages.getNoButton()}, 0,
|
||||
Messages.getWarningIcon()) == 0) {
|
||||
checkout(taskName, problems, null);
|
||||
map.addAll(problems);
|
||||
|
||||
@@ -86,8 +86,8 @@ public class IndentOptionsEditor extends OptionGroup implements CodeStyleSetting
|
||||
}
|
||||
|
||||
protected void addTabSizeField() {
|
||||
myTabSizeField = createIndentTextField(getTAB_SIZE_LABEL(), MIN_TAB_SIZE, MAX_TAB_SIZE, DEFAULT_TAB_SIZE);
|
||||
myTabSizeLabel = new JLabel(getTAB_SIZE_LABEL());
|
||||
myTabSizeField = createIndentTextField(getTabSizeLabel(), MIN_TAB_SIZE, MAX_TAB_SIZE, DEFAULT_TAB_SIZE);
|
||||
myTabSizeLabel = new JLabel(getTabSizeLabel());
|
||||
add(myTabSizeLabel, myTabSizeField);
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ public class IndentOptionsEditor extends OptionGroup implements CodeStyleSetting
|
||||
return ApplicationBundle.message("editbox.indent.indent");
|
||||
}
|
||||
|
||||
private static String getTAB_SIZE_LABEL() {
|
||||
private static String getTabSizeLabel() {
|
||||
return ApplicationBundle.message("editbox.indent.tab.size");
|
||||
}
|
||||
}
|
||||
|
||||
+9
-9
@@ -57,14 +57,14 @@ public class TemplateExpandShortcutPanel extends JPanel {
|
||||
myExpandByCombo.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
myOpenKeymapLabel.setVisible(myExpandByCombo.getSelectedItem() == getCUSTOM());
|
||||
myOpenKeymapLabel.setVisible(myExpandByCombo.getSelectedItem() == getCustom());
|
||||
}
|
||||
});
|
||||
for (String s : ContainerUtil.ar(getSpace(), getTab(), getENTER(), getCUSTOM())) {
|
||||
for (String s : ContainerUtil.ar(getSpace(), getTab(), getEnter(), getCustom())) {
|
||||
myExpandByCombo.addItem(s);
|
||||
}
|
||||
myExpandByCombo.setRenderer(SimpleListCellRenderer.create("", value -> {
|
||||
if (value == getCUSTOM()) {
|
||||
if (value == getCustom()) {
|
||||
Shortcut[] shortcuts = getCurrentCustomShortcuts();
|
||||
String shortcutText = shortcuts.length == 0 ? "" : KeymapUtil.getShortcutsText(shortcuts);
|
||||
return StringUtil.isEmpty(shortcutText) ? ApplicationBundle.message("custom.option") : "Custom (" + shortcutText + ")";
|
||||
@@ -120,16 +120,16 @@ public class TemplateExpandShortcutPanel extends JPanel {
|
||||
}
|
||||
|
||||
public void setSelectedChar(char ch) {
|
||||
myExpandByCombo.setSelectedItem(ch == TemplateSettings.CUSTOM_CHAR ? getCUSTOM() :
|
||||
myExpandByCombo.setSelectedItem(ch == TemplateSettings.CUSTOM_CHAR ? getCustom() :
|
||||
ch == TemplateSettings.TAB_CHAR ? getTab() :
|
||||
ch == TemplateSettings.ENTER_CHAR ? getENTER() :
|
||||
ch == TemplateSettings.ENTER_CHAR ? getEnter() :
|
||||
getSpace());
|
||||
}
|
||||
|
||||
public char getSelectedChar() {
|
||||
Object selectedItem = myExpandByCombo.getSelectedItem();
|
||||
if (getTab().equals(selectedItem)) return TemplateSettings.TAB_CHAR;
|
||||
if (getENTER().equals(selectedItem)) return TemplateSettings.ENTER_CHAR;
|
||||
if (getEnter().equals(selectedItem)) return TemplateSettings.ENTER_CHAR;
|
||||
if (getSpace().equals(selectedItem)) {
|
||||
return TemplateSettings.SPACE_CHAR;
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public class TemplateExpandShortcutPanel extends JPanel {
|
||||
|
||||
private void resizeComboToFitCustomShortcut() {
|
||||
myExpandByCombo.setPrototypeDisplayValue(null);
|
||||
myExpandByCombo.setPrototypeDisplayValue(getCUSTOM());
|
||||
myExpandByCombo.setPrototypeDisplayValue(getCustom());
|
||||
myExpandByCombo.revalidate();
|
||||
myExpandByCombo.repaint();
|
||||
}
|
||||
@@ -153,11 +153,11 @@ public class TemplateExpandShortcutPanel extends JPanel {
|
||||
return CodeInsightBundle.message("template.shortcut.tab");
|
||||
}
|
||||
|
||||
private static String getENTER() {
|
||||
private static String getEnter() {
|
||||
return CodeInsightBundle.message("template.shortcut.enter");
|
||||
}
|
||||
|
||||
private static String getCUSTOM() {
|
||||
private static String getCustom() {
|
||||
return CodeInsightBundle.message("template.shortcut.custom");
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -70,7 +70,7 @@ public class PostfixTemplatesConfigurable implements SearchableConfigurable, Edi
|
||||
});
|
||||
myShortcutComboBox.addItem(getTab());
|
||||
myShortcutComboBox.addItem(getSpace());
|
||||
myShortcutComboBox.addItem(getENTER());
|
||||
myShortcutComboBox.addItem(getEnter());
|
||||
myDescriptionPanel.setLayout(new BorderLayout());
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public class PostfixTemplatesConfigurable implements SearchableConfigurable, Edi
|
||||
if (getSpace().equals(string)) {
|
||||
return TemplateSettings.SPACE_CHAR;
|
||||
}
|
||||
else if (getENTER().equals(string)) {
|
||||
else if (getEnter().equals(string)) {
|
||||
return TemplateSettings.ENTER_CHAR;
|
||||
}
|
||||
return TemplateSettings.TAB_CHAR;
|
||||
@@ -278,7 +278,7 @@ public class PostfixTemplatesConfigurable implements SearchableConfigurable, Edi
|
||||
return getSpace();
|
||||
}
|
||||
if (shortcut == TemplateSettings.ENTER_CHAR) {
|
||||
return getENTER();
|
||||
return getEnter();
|
||||
}
|
||||
return getTab();
|
||||
}
|
||||
@@ -291,7 +291,7 @@ public class PostfixTemplatesConfigurable implements SearchableConfigurable, Edi
|
||||
return CodeInsightBundle.message("template.shortcut.tab");
|
||||
}
|
||||
|
||||
private static String getENTER() {
|
||||
private static String getEnter() {
|
||||
return CodeInsightBundle.message("template.shortcut.enter");
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ class RunDashboardServiceViewDeleteProvider implements ServiceViewContributorDel
|
||||
else {
|
||||
message = "Remove " + targetTypes.size() + " configuration types from Services?";
|
||||
}
|
||||
if (Messages.showYesNoDialog(project, message, "Remove", "Remove", Messages.getCANCEL_BUTTON(), Messages.getWarningIcon(), null)
|
||||
if (Messages.showYesNoDialog(project, message, "Remove", "Remove", Messages.getCancelButton(), Messages.getWarningIcon(), null)
|
||||
!= Messages.YES) {
|
||||
return;
|
||||
}
|
||||
|
||||
+1
-1
@@ -237,7 +237,7 @@ public class ReplaceInProjectManager {
|
||||
StringUtil.escapeXmlEntities(stringToReplace)))
|
||||
.yesText(FindBundle.message("find.replace.command"))
|
||||
.project(myProject)
|
||||
.noText(Messages.getCANCEL_BUTTON()).show();
|
||||
.noText(Messages.getCancelButton()).show();
|
||||
}
|
||||
|
||||
private static Set<VirtualFile> getFiles(@NotNull ReplaceContext replaceContext, boolean selectedOnly) {
|
||||
|
||||
@@ -82,8 +82,8 @@ public abstract class MessageDialogBuilder<T extends MessageDialogBuilder> {
|
||||
|
||||
@Messages.YesNoResult
|
||||
public int show() {
|
||||
String yesText = ObjectUtils.chooseNotNull(myYesText, Messages.getYES_BUTTON());
|
||||
String noText = ObjectUtils.chooseNotNull(myNoText, Messages.getNO_BUTTON());
|
||||
String yesText = ObjectUtils.chooseNotNull(myYesText, Messages.getYesButton());
|
||||
String noText = ObjectUtils.chooseNotNull(myNoText, Messages.getNoButton());
|
||||
try {
|
||||
if (Messages.canShowMacSheetPanel() && !Messages.isApplicationInUnitTestOrHeadless()) {
|
||||
Window window = WindowManager.getInstance().suggestParentWindow(myProject);
|
||||
@@ -120,9 +120,9 @@ public abstract class MessageDialogBuilder<T extends MessageDialogBuilder> {
|
||||
|
||||
@Messages.YesNoCancelResult
|
||||
public int show() {
|
||||
String yesText = ObjectUtils.chooseNotNull(myYesText, Messages.getYES_BUTTON());
|
||||
String noText = ObjectUtils.chooseNotNull(myNoText, Messages.getNO_BUTTON());
|
||||
String cancelText = ObjectUtils.chooseNotNull(myCancelText, Messages.getCANCEL_BUTTON());
|
||||
String yesText = ObjectUtils.chooseNotNull(myYesText, Messages.getYesButton());
|
||||
String noText = ObjectUtils.chooseNotNull(myNoText, Messages.getNoButton());
|
||||
String cancelText = ObjectUtils.chooseNotNull(myCancelText, Messages.getCancelButton());
|
||||
try {
|
||||
if (Messages.canShowMacSheetPanel() && !Messages.isApplicationInUnitTestOrHeadless()) {
|
||||
Window window = WindowManager.getInstance().suggestParentWindow(myProject);
|
||||
|
||||
@@ -6,12 +6,12 @@ import com.intellij.openapi.project.Project
|
||||
import org.jetbrains.annotations.Nls
|
||||
import javax.swing.Icon
|
||||
|
||||
fun showYesNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String, message: String, project: Project?, yesText: String = Messages.getYES_BUTTON(), noText: String = Messages.getNO_BUTTON(), icon: Icon? = null): Boolean {
|
||||
fun showYesNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String, message: String, project: Project?, yesText: String = Messages.getYesButton(), noText: String = Messages.getNoButton(), icon: Icon? = null): Boolean {
|
||||
return Messages.showYesNoDialog(project, message, title, yesText, noText, icon) == Messages.YES
|
||||
}
|
||||
|
||||
fun showOkNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String, message: String, project: Project?,
|
||||
okText: String = Messages.getOkButton(), noText: String = Messages.getNO_BUTTON(), icon: Icon? = null): Boolean {
|
||||
okText: String = Messages.getOkButton(), noText: String = Messages.getNoButton(), icon: Icon? = null): Boolean {
|
||||
return Messages.showYesNoDialog(project, message, title, okText, noText, icon) == Messages.YES
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ fun showOkNoDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String
|
||||
fun showOkCancelDialog(@Nls(capitalization = Nls.Capitalization.Title) title: String,
|
||||
@Nls(capitalization = Nls.Capitalization.Sentence) message: String,
|
||||
okText: String,
|
||||
cancelText: String = Messages.getCANCEL_BUTTON(),
|
||||
cancelText: String = Messages.getCancelButton(),
|
||||
icon: Icon? = null,
|
||||
doNotAskOption: DialogWrapper.DoNotAskOption? = null,
|
||||
project: Project? = null): Int {
|
||||
|
||||
@@ -52,27 +52,27 @@ public class Messages {
|
||||
public static final String OK_BUTTON = "OK";
|
||||
|
||||
/**
|
||||
* Use {code {@link #getYES_BUTTON()}} instead
|
||||
* Use {code {@link #getYesButton()}} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String YES_BUTTON = "&Yes";
|
||||
|
||||
/**
|
||||
* Use {code {@link #getNO_BUTTON()}} instead
|
||||
* Use {code {@link #getNoButton()}} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String NO_BUTTON = "&No";
|
||||
|
||||
/**
|
||||
* Use {code {@link #getCANCEL_BUTTON()}} instead
|
||||
* Use {code {@link #getCancelButton()}} instead
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String CANCEL_BUTTON = "Cancel";
|
||||
|
||||
public static String getOkButton() { return CommonBundle.getOkButtonText(); }
|
||||
public static String getYES_BUTTON() { return CommonBundle.getYesButtonText(); }
|
||||
public static String getNO_BUTTON() { return CommonBundle.getNoButtonText(); }
|
||||
public static String getCANCEL_BUTTON() { return CommonBundle.getCancelButtonText(); }
|
||||
public static String getYesButton() { return CommonBundle.getYesButtonText(); }
|
||||
public static String getNoButton() { return CommonBundle.getNoButtonText(); }
|
||||
public static String getCancelButton() { return CommonBundle.getCancelButtonText(); }
|
||||
|
||||
private static TestDialog ourTestImplementation = TestDialog.DEFAULT;
|
||||
private static TestInputDialog ourTestInputImplementation = TestInputDialog.DEFAULT;
|
||||
@@ -503,7 +503,7 @@ public class Messages {
|
||||
try {
|
||||
if (canShowMacSheetPanel()) {
|
||||
return MacMessages.getInstance()
|
||||
.showYesNoDialog(title, message, getYES_BUTTON(), getNO_BUTTON(), WindowManager.getInstance().suggestParentWindow(project));
|
||||
.showYesNoDialog(title, message, getYesButton(), getNoButton(), WindowManager.getInstance().suggestParentWindow(project));
|
||||
}
|
||||
}
|
||||
catch (MessageException ignored) {/*rollback the message and show a dialog*/}
|
||||
@@ -511,7 +511,7 @@ public class Messages {
|
||||
LOG.error(reportThis);
|
||||
}
|
||||
|
||||
int result = showYesNoDialog(project, message, title, getYES_BUTTON(), getNO_BUTTON(), icon);
|
||||
int result = showYesNoDialog(project, message, title, getYesButton(), getNoButton(), icon);
|
||||
|
||||
LOG.assertTrue(result == YES || result == NO, result);
|
||||
return result;
|
||||
@@ -529,7 +529,7 @@ public class Messages {
|
||||
try {
|
||||
if (canShowMacSheetPanel()) {
|
||||
return MacMessages.getInstance()
|
||||
.showYesNoDialog(title, message, getYES_BUTTON(), getNO_BUTTON(), WindowManager.getInstance().suggestParentWindow(project), doNotAskOption);
|
||||
.showYesNoDialog(title, message, getYesButton(), getNoButton(), WindowManager.getInstance().suggestParentWindow(project), doNotAskOption);
|
||||
}
|
||||
}
|
||||
catch (MessageException ignored) {/*rollback the message and show a dialog*/}
|
||||
@@ -537,7 +537,7 @@ public class Messages {
|
||||
LOG.error(reportThis);
|
||||
}
|
||||
|
||||
int result = showYesNoDialog(project, message, title, getYES_BUTTON(), getNO_BUTTON(), icon, doNotAskOption);
|
||||
int result = showYesNoDialog(project, message, title, getYesButton(), getNoButton(), icon, doNotAskOption);
|
||||
|
||||
LOG.assertTrue(result == YES || result == NO, result);
|
||||
return result;
|
||||
@@ -554,7 +554,7 @@ public class Messages {
|
||||
@Nullable Icon icon) {
|
||||
try {
|
||||
if (canShowMacSheetPanel()) {
|
||||
return MacMessages.getInstance().showYesNoDialog(title, message, getYES_BUTTON(), getNO_BUTTON(), SwingUtilities.getWindowAncestor(parent));
|
||||
return MacMessages.getInstance().showYesNoDialog(title, message, getYesButton(), getNoButton(), SwingUtilities.getWindowAncestor(parent));
|
||||
}
|
||||
}
|
||||
catch (MessageException ignored) {/*rollback the message and show a dialog*/}
|
||||
@@ -562,7 +562,7 @@ public class Messages {
|
||||
LOG.error(reportThis);
|
||||
}
|
||||
|
||||
int result = showDialog(parent, message, title, new String[]{getYES_BUTTON(), getNO_BUTTON()}, 0, icon) == 0 ? YES : NO;
|
||||
int result = showDialog(parent, message, title, new String[]{getYesButton(), getNoButton()}, 0, icon) == 0 ? YES : NO;
|
||||
//noinspection ConstantConditions
|
||||
LOG.assertTrue(result == YES || result == NO, result);
|
||||
return result;
|
||||
@@ -629,7 +629,7 @@ public class Messages {
|
||||
@Nullable Icon icon) {
|
||||
try {
|
||||
if (canShowMacSheetPanel()) {
|
||||
return MacMessages.getInstance().showYesNoDialog(title, message, getYES_BUTTON(), getNO_BUTTON(), null);
|
||||
return MacMessages.getInstance().showYesNoDialog(title, message, getYesButton(), getNoButton(), null);
|
||||
}
|
||||
}
|
||||
catch (MessageException ignored) {/*rollback the message and show a dialog*/}
|
||||
@@ -637,7 +637,7 @@ public class Messages {
|
||||
LOG.error(reportThis);
|
||||
}
|
||||
|
||||
int result = showYesNoDialog(message, title, getYES_BUTTON(), getNO_BUTTON(), icon);
|
||||
int result = showYesNoDialog(message, title, getYesButton(), getNoButton(), icon);
|
||||
LOG.assertTrue(result == YES || result == NO, result);
|
||||
return result;
|
||||
}
|
||||
@@ -695,7 +695,7 @@ public class Messages {
|
||||
String message,
|
||||
@Nls(capitalization = Nls.Capitalization.Title) String title,
|
||||
Icon icon) {
|
||||
return showOkCancelDialog(project, message, title, getOkButton(), getCANCEL_BUTTON(), icon);
|
||||
return showOkCancelDialog(project, message, title, getOkButton(), getCancelButton(), icon);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -733,7 +733,7 @@ public class Messages {
|
||||
String message,
|
||||
@Nls(capitalization = Nls.Capitalization.Title) String title,
|
||||
Icon icon) {
|
||||
return showOkCancelDialog(parent, message, title, getOkButton(), getCANCEL_BUTTON(), icon);
|
||||
return showOkCancelDialog(parent, message, title, getOkButton(), getCancelButton(), icon);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -745,7 +745,7 @@ public class Messages {
|
||||
@OkCancelResult
|
||||
@Deprecated
|
||||
public static int showOkCancelDialog(String message, @Nls(capitalization = Nls.Capitalization.Title) String title, Icon icon) {
|
||||
return showOkCancelDialog(message, title, getOkButton(), getCANCEL_BUTTON(), icon, null);
|
||||
return showOkCancelDialog(message, title, getOkButton(), getCancelButton(), icon, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -799,7 +799,7 @@ public class Messages {
|
||||
final int defaultOptionIndex,
|
||||
final int focusedOptionIndex,
|
||||
Icon icon) {
|
||||
return showCheckboxMessageDialog(message, title, new String[]{getOkButton(), getCANCEL_BUTTON()}, checkboxText, checked, defaultOptionIndex,
|
||||
return showCheckboxMessageDialog(message, title, new String[]{getOkButton(), getCancelButton()}, checkboxText, checked, defaultOptionIndex,
|
||||
focusedOptionIndex, icon,
|
||||
(exitCode, cb) -> exitCode == -1 ? CANCEL : exitCode + (cb.isSelected() ? 1 : 0));
|
||||
}
|
||||
@@ -971,7 +971,7 @@ public class Messages {
|
||||
String message,
|
||||
@Nls(capitalization = Nls.Capitalization.Title) String title,
|
||||
Icon icon) {
|
||||
return showYesNoCancelDialog(project, message, title, getYES_BUTTON(), getNO_BUTTON(), getCANCEL_BUTTON(), icon);
|
||||
return showYesNoCancelDialog(project, message, title, getYesButton(), getNoButton(), getCancelButton(), icon);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1008,7 +1008,7 @@ public class Messages {
|
||||
String message,
|
||||
@Nls(capitalization = Nls.Capitalization.Title) String title,
|
||||
Icon icon) {
|
||||
return showYesNoCancelDialog(parent, message, title, getYES_BUTTON(), getNO_BUTTON(), getCANCEL_BUTTON(), icon);
|
||||
return showYesNoCancelDialog(parent, message, title, getYesButton(), getNoButton(), getCancelButton(), icon);
|
||||
}
|
||||
|
||||
|
||||
@@ -1067,7 +1067,7 @@ public class Messages {
|
||||
*/
|
||||
@YesNoCancelResult
|
||||
public static int showYesNoCancelDialog(String message, @Nls(capitalization = Nls.Capitalization.Title) String title, Icon icon) {
|
||||
return showYesNoCancelDialog(message, title, getYES_BUTTON(), getNO_BUTTON(), getCANCEL_BUTTON(), icon);
|
||||
return showYesNoCancelDialog(message, title, getYesButton(), getNoButton(), getCancelButton(), icon);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1385,7 +1385,7 @@ public class Messages {
|
||||
@Nullable Icon icon,
|
||||
@Nullable String initialValue,
|
||||
@Nullable InputValidator validator) {
|
||||
this(project, message, title, icon, initialValue, validator, new String[]{getOkButton(), getCANCEL_BUTTON()}, 0);
|
||||
this(project, message, title, icon, initialValue, validator, new String[]{getOkButton(), getCancelButton()}, 0);
|
||||
}
|
||||
|
||||
public InputDialog(@NotNull Component parent,
|
||||
@@ -1394,7 +1394,7 @@ public class Messages {
|
||||
@Nullable Icon icon,
|
||||
@Nullable String initialValue,
|
||||
@Nullable InputValidator validator) {
|
||||
super(null, parent, message, title, new String[]{getOkButton(), getCANCEL_BUTTON()}, -1, 0, icon, null, true);
|
||||
super(null, parent, message, title, new String[]{getOkButton(), getCancelButton()}, -1, 0, icon, null, true);
|
||||
myValidator = validator;
|
||||
myComment = null;
|
||||
myField.setText(initialValue);
|
||||
@@ -1406,7 +1406,7 @@ public class Messages {
|
||||
@Nullable Icon icon,
|
||||
@Nullable String initialValue,
|
||||
@Nullable InputValidator validator) {
|
||||
super(null, null, message, title, new String[]{getOkButton(), getCANCEL_BUTTON()}, 0, -1, icon, null, true);
|
||||
super(null, null, message, title, new String[]{getOkButton(), getCancelButton()}, 0, -1, icon, null, true);
|
||||
myValidator = validator;
|
||||
myComment = null;
|
||||
myField.setText(initialValue);
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CreateLauncherScriptAction extends DumbAwareAction {
|
||||
if (target.exists()) {
|
||||
String message = ApplicationBundle.message("launcher.script.overwrite", target);
|
||||
String ok = ApplicationBundle.message("launcher.script.overwrite.button");
|
||||
if (Messages.showOkCancelDialog(project, message, title, ok, Messages.getCANCEL_BUTTON(), Messages.getQuestionIcon()) != Messages.OK) {
|
||||
if (Messages.showOkCancelDialog(project, message, title, ok, Messages.getCancelButton(), Messages.getQuestionIcon()) != Messages.OK) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -81,10 +81,10 @@ public class QuickChangeColorSchemeAction extends QuickSwitchSchemeAction {
|
||||
if (isDarkEditorTheme &&
|
||||
(UIUtil.isUnderIntelliJLaF() || theme != null && !theme.isDark())) {
|
||||
if (/*applyAlways ||*/ Messages.showYesNoDialog(
|
||||
ApplicationBundle.message("color.scheme.theme.change.confirmation", "dark", productName),
|
||||
ApplicationBundle.message("color.scheme.theme.change.confirmation.title", productName),
|
||||
Messages.getYES_BUTTON(), Messages.getNO_BUTTON(),
|
||||
Messages.getQuestionIcon()/*, doNotAskOption*/) == Messages.YES) {
|
||||
ApplicationBundle.message("color.scheme.theme.change.confirmation", "dark", productName),
|
||||
ApplicationBundle.message("color.scheme.theme.change.confirmation.title", productName),
|
||||
Messages.getYesButton(), Messages.getNoButton(),
|
||||
Messages.getQuestionIcon()/*, doNotAskOption*/) == Messages.YES) {
|
||||
|
||||
lafManager.setCurrentLookAndFeel(suitableLaf != null ? suitableLaf : new DarculaLookAndFeelInfo());
|
||||
lafManager.updateUI();
|
||||
@@ -98,7 +98,7 @@ public class QuickChangeColorSchemeAction extends QuickSwitchSchemeAction {
|
||||
(/*applyAlways ||*/ Messages.showYesNoDialog(
|
||||
ApplicationBundle.message("color.scheme.theme.change.confirmation", "bright", productName),
|
||||
ApplicationBundle.message("color.scheme.theme.change.confirmation.title", productName),
|
||||
Messages.getYES_BUTTON(), Messages.getNO_BUTTON(),
|
||||
Messages.getYesButton(), Messages.getNoButton(),
|
||||
Messages.getQuestionIcon()/*, doNotAskOption*/) == Messages.YES)) {
|
||||
|
||||
lafManager.setCurrentLookAndFeel(suitableLaf != null ? suitableLaf : ((LafManagerImpl)lafManager).getDefaultLaf());
|
||||
|
||||
@@ -249,7 +249,7 @@ public class InstalledPluginsTableModel extends PluginTableModel {
|
||||
"<html>The enabled plugin" + beginS + " depend" + middleS + " on the following plugin" + endS + ":<br>" + listOfDependencies + "</html>"
|
||||
: "<html>The following plugin" + beginS + " depend" + middleS + " on the disabled plugin" + endS + ":<br>" + listOfDependencies + "</html>";
|
||||
if (Messages.showOkCancelDialog(message, newEnabledState ? "Enable required plugins" : "Disable dependent plugins",
|
||||
newEnabledState ? "Enable" : "Disable" , Messages.getCANCEL_BUTTON(), Messages.getQuestionIcon()) == Messages.OK) {
|
||||
newEnabledState ? "Enable" : "Disable" , Messages.getCancelButton(), Messages.getQuestionIcon()) == Messages.OK) {
|
||||
for (PluginId pluginId : deps) {
|
||||
myEnabled.put(pluginId, newEnabledState);
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ public class PluginInstallOperation {
|
||||
String title = IdeBundle.message("plugin.manager.dependencies.detected.title");
|
||||
String deps = getPluginsText(depends);
|
||||
String message = IdeBundle.message("plugin.manager.dependencies.detected.message", pluginNode.getName(), deps);
|
||||
proceed[0] = Messages.showYesNoDialog(message, title, "Install", Messages.getNO_BUTTON(), Messages.getWarningIcon()) == Messages.YES;
|
||||
proceed[0] = Messages.showYesNoDialog(message, title, "Install", Messages.getNoButton(), Messages.getWarningIcon()) == Messages.YES;
|
||||
}, ModalityState.any());
|
||||
}
|
||||
catch (Exception e) {
|
||||
@@ -202,7 +202,7 @@ public class PluginInstallOperation {
|
||||
String title = IdeBundle.message("plugin.manager.optional.dependencies.detected.title");
|
||||
String deps = getPluginsText(optionalDeps);
|
||||
String message = IdeBundle.message("plugin.manager.optional.dependencies.detected.message", pluginNode.getName(), deps);
|
||||
proceed[0] = Messages.showYesNoDialog(message, title, "Install", Messages.getNO_BUTTON(), Messages.getWarningIcon()) == Messages.YES;
|
||||
proceed[0] = Messages.showYesNoDialog(message, title, "Install", Messages.getNoButton(), Messages.getWarningIcon()) == Messages.YES;
|
||||
}, ModalityState.any());
|
||||
}
|
||||
catch (Exception e) {
|
||||
@@ -226,7 +226,7 @@ public class PluginInstallOperation {
|
||||
ApplicationManager.getApplication().invokeAndWait(() -> {
|
||||
String title = IdeBundle.message("plugin.manager.obsolete.plugins.detected.title");
|
||||
String message = pluginReplacement.getReplacementMessage(oldPlugin, pluginNode);
|
||||
if (Messages.showYesNoDialog(message, title, "Disabled", Messages.getNO_BUTTON(), Messages.getWarningIcon()) == Messages.YES) {
|
||||
if (Messages.showYesNoDialog(message, title, "Disabled", Messages.getNoButton(), Messages.getWarningIcon()) == Messages.YES) {
|
||||
toDisable.set(oldPlugin);
|
||||
}
|
||||
}, ModalityState.any());
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ChooseDialog extends MessageDialog {
|
||||
@Nullable Icon icon,
|
||||
String[] values,
|
||||
String initialValue) {
|
||||
super(project, parent, message, title, new String[]{Messages.getOkButton(), Messages.getCANCEL_BUTTON()}, 0, -1, icon, null, true);
|
||||
super(project, parent, message, title, new String[]{Messages.getOkButton(), Messages.getCancelButton()}, 0, -1, icon, null, true);
|
||||
myComboBox.setModel(new DefaultComboBoxModel<>(values));
|
||||
myComboBox.setSelectedItem(initialValue);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class ChooseDialog extends MessageDialog {
|
||||
@Nullable Icon icon,
|
||||
String[] values,
|
||||
String initialValue) {
|
||||
super(message, title, new String[]{Messages.getOkButton(), Messages.getCANCEL_BUTTON()}, 0, icon);
|
||||
super(message, title, new String[]{Messages.getOkButton(), Messages.getCancelButton()}, 0, icon);
|
||||
myComboBox.setModel(new DefaultComboBoxModel<>(values));
|
||||
myComboBox.setSelectedItem(initialValue);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class MessagesServiceImpl implements MessagesService {
|
||||
}
|
||||
|
||||
InputDialog dialog = new InputDialog(project, message, title, icon, initialValue, validator,
|
||||
new String[]{getOkButton(), getCANCEL_BUTTON()},
|
||||
new String[]{getOkButton(), getCancelButton()},
|
||||
0, comment);
|
||||
|
||||
final JTextComponent field = dialog.getTextField();
|
||||
@@ -185,7 +185,7 @@ public class MessagesServiceImpl implements MessagesService {
|
||||
}
|
||||
|
||||
Messages.InputDialog dialog = new Messages.MultilineInputDialog(project, message, title, icon, initialValue, validator,
|
||||
new String[]{getOkButton(), getCANCEL_BUTTON()}, 0);
|
||||
new String[]{getOkButton(), getCancelButton()}, 0);
|
||||
dialog.show();
|
||||
return dialog.getInputString();
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class SheetController implements Disposable {
|
||||
myDefaultButton = (defaultButtonIndex == -1) ? buttons[0] : buttons[defaultButtonIndex];
|
||||
|
||||
if (myResult == null) {
|
||||
myResult = Messages.getCANCEL_BUTTON();
|
||||
myResult = Messages.getCancelButton();
|
||||
}
|
||||
|
||||
mySheetPanel = createSheetPanel(title, message, buttons);
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ public class ConfigurationManager implements PersistentStateComponent<Element> {
|
||||
SSRBundle.message("overwrite.message"),
|
||||
SSRBundle.message("overwrite.title", name),
|
||||
"Replace",
|
||||
Messages.getCANCEL_BUTTON(),
|
||||
Messages.getCancelButton(),
|
||||
Messages.getQuestionIcon()
|
||||
);
|
||||
if (answer == Messages.YES) {
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public class ExistingTemplatesComponent {
|
||||
SSRBundle.message("template.in.use.message", configurationName, otherConfiguration.getName()),
|
||||
SSRBundle.message("template.in.use.title", configurationName),
|
||||
CommonBundle.message("button.remove"),
|
||||
Messages.getCANCEL_BUTTON(),
|
||||
Messages.getCancelButton(),
|
||||
AllIcons.General.WarningDialog
|
||||
)) {
|
||||
return;
|
||||
|
||||
+4
-4
@@ -298,7 +298,7 @@ public class ChangeDiffRequestProducer implements DiffRequestProducer, ChangeDif
|
||||
String afterRevisionTitle = getRevisionTitle(aRev, getServerVersion());
|
||||
|
||||
String title = DiffRequestFactory.getInstance().getTitle(file);
|
||||
List<String> titles = Arrays.asList(beforeRevisionTitle, getBASE_VERSION(), afterRevisionTitle);
|
||||
List<String> titles = Arrays.asList(beforeRevisionTitle, getBaseVersion(), afterRevisionTitle);
|
||||
|
||||
DiffContentFactory contentFactory = DiffContentFactory.getInstance();
|
||||
List<DiffContent> contents = Arrays.asList(contentFactory.createFromBytes(project, mergeData.CURRENT, file),
|
||||
@@ -338,7 +338,7 @@ public class ChangeDiffRequestProducer implements DiffRequestProducer, ChangeDif
|
||||
DiffContent content2 = createContent(project, aRev, context, indicator);
|
||||
|
||||
final String userLeftRevisionTitle = (String)myChangeContext.get(DiffUserDataKeysEx.VCS_DIFF_LEFT_CONTENT_TITLE);
|
||||
String beforeRevisionTitle = userLeftRevisionTitle != null ? userLeftRevisionTitle : getRevisionTitle(bRev, getBASE_VERSION());
|
||||
String beforeRevisionTitle = userLeftRevisionTitle != null ? userLeftRevisionTitle : getRevisionTitle(bRev, getBaseVersion());
|
||||
final String userRightRevisionTitle = (String)myChangeContext.get(DiffUserDataKeysEx.VCS_DIFF_RIGHT_CONTENT_TITLE);
|
||||
String afterRevisionTitle = userRightRevisionTitle != null ? userRightRevisionTitle : getRevisionTitle(aRev, getYourVersion());
|
||||
|
||||
@@ -461,11 +461,11 @@ public class ChangeDiffRequestProducer implements DiffRequestProducer, ChangeDif
|
||||
return DiffBundle.message("merge.version.title.their");
|
||||
}
|
||||
|
||||
public static String getBASE_VERSION() {
|
||||
public static String getBaseVersion() {
|
||||
return DiffBundle.message("merge.version.title.base");
|
||||
}
|
||||
|
||||
public static String getMERGED_VERSION() {
|
||||
public static String getMergedVersion() {
|
||||
return DiffBundle.message("merge.version.title.merged");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class VcsExecutablePathSelector {
|
||||
VcsBundle.getString("executable.project.override.reset.title"),
|
||||
VcsBundle.getString("executable.project.override.reset.globalize"),
|
||||
VcsBundle.getString("executable.project.override.reset.revert"),
|
||||
Messages.getCANCEL_BUTTON(),
|
||||
Messages.getCancelButton(),
|
||||
null)) {
|
||||
case Messages.NO:
|
||||
myPathSelector.setText(mySavedPath);
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ public class MergedChangeDiffRequestProvider implements ChangeDiffRequestProvide
|
||||
String leftTitle = getRevisionTitle(myContext, DiffUserDataKeysEx.VCS_DIFF_LEFT_CONTENT_TITLE, leftRevision,
|
||||
ChangeDiffRequestProducer.getYourVersion());
|
||||
String centerTitle = getRevisionTitle(myContext, DiffUserDataKeysEx.VCS_DIFF_CENTER_CONTENT_TITLE, centerRevision,
|
||||
ChangeDiffRequestProducer.getMERGED_VERSION());
|
||||
ChangeDiffRequestProducer.getMergedVersion());
|
||||
String rightTitle = getRevisionTitle(myContext, DiffUserDataKeysEx.VCS_DIFF_RIGHT_CONTENT_TITLE, rightRevision,
|
||||
ChangeDiffRequestProducer.getServerVersion());
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ public class XDebuggerUtilImpl extends XDebuggerUtil {
|
||||
if (Messages.showOkCancelDialog(message.toString(),
|
||||
XDebuggerBundle.message("message.confirm.breakpoint.removal.title"),
|
||||
CommonBundle.message("button.remove"),
|
||||
Messages.getCANCEL_BUTTON(),
|
||||
Messages.getCancelButton(),
|
||||
Messages.getQuestionIcon(),
|
||||
new DialogWrapper.DoNotAskOption.Adapter() {
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -50,7 +50,7 @@ public class ReadWriteStatistics {
|
||||
myShownReadKBytes = myReadBytes / KB;
|
||||
}
|
||||
|
||||
showProgress(getPROGRESS_READING());
|
||||
showProgress(getProgressReading());
|
||||
}
|
||||
|
||||
public void send(long bytes) {
|
||||
@@ -71,7 +71,7 @@ public class ReadWriteStatistics {
|
||||
}
|
||||
if (myShownReadKBytes > 0) {
|
||||
buffer.append(myShownReadKBytes);
|
||||
buffer.append(getREAD_PROGRESS_MESSAGE());
|
||||
buffer.append(getReadProgressMessage());
|
||||
if (myShownSentKBytes > 0) buffer.append("; ");
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ReadWriteStatistics {
|
||||
myProgress.setText(buffer.toString());
|
||||
}
|
||||
|
||||
private static String getREAD_PROGRESS_MESSAGE() {
|
||||
private static String getReadProgressMessage() {
|
||||
return CvsBundle.message("progress.text.kb.read");
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class ReadWriteStatistics {
|
||||
return CvsBundle.message("progress.text.sending.data.to.server");
|
||||
}
|
||||
|
||||
private static String getPROGRESS_READING() {
|
||||
private static String getProgressReading() {
|
||||
return CvsBundle.message("progress.text.reading.data.from.server");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class GitSubmoduleDiffRequestProvider : ChangeDiffRequestProvider {
|
||||
return SimpleDiffRequest("$title (Submodule)",
|
||||
beforeContent,
|
||||
afterContent,
|
||||
getRevisionTitle(beforeRevision, getBASE_VERSION()),
|
||||
getRevisionTitle(beforeRevision, getBaseVersion()),
|
||||
getRevisionTitle(afterRevision, getYourVersion()))
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -39,14 +39,14 @@ public class GrInlineFieldUtil {
|
||||
final Project project = field.getProject();
|
||||
|
||||
if (!field.hasModifierProperty(PsiModifier.FINAL)) {
|
||||
String message = RefactoringBundle.message("0.refactoring.is.supported.only.for.final.fields", getINLINE_FIELD());
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, message, getINLINE_FIELD(), HelpID.INLINE_FIELD);
|
||||
String message = RefactoringBundle.message("0.refactoring.is.supported.only.for.final.fields", getInlineField());
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, message, getInlineField(), HelpID.INLINE_FIELD);
|
||||
return InlineHandler.Settings.CANNOT_INLINE_SETTINGS;
|
||||
}
|
||||
|
||||
if (field.getInitializerGroovy() == null) {
|
||||
String message = GroovyRefactoringBundle.message("cannot.find.a.single.definition.to.inline.field");
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, message, getINLINE_FIELD(), HelpID.INLINE_FIELD);
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, message, getInlineField(), HelpID.INLINE_FIELD);
|
||||
return InlineHandler.Settings.CANNOT_INLINE_SETTINGS;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class GrInlineFieldUtil {
|
||||
}
|
||||
}
|
||||
|
||||
public static String getINLINE_FIELD() {
|
||||
public static String getInlineField() {
|
||||
return RefactoringBundle.message("inline.field.title");
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -79,17 +79,17 @@ public class PyConvertCollectionLiteralIntentionTest extends PyIntentionTestCase
|
||||
|
||||
// PY-9419
|
||||
public void testConvertSetToTuple() {
|
||||
doIntentionTest(getCONVERT_SET_TO_TUPLE());
|
||||
doIntentionTest(getConvertSetToTuple());
|
||||
}
|
||||
|
||||
// PY-9419
|
||||
public void testConvertSetWithoutClosingBraceToTuple() {
|
||||
doIntentionTest(getCONVERT_SET_TO_TUPLE());
|
||||
doIntentionTest(getConvertSetToTuple());
|
||||
}
|
||||
|
||||
// PY-9419
|
||||
public void testConvertSetToList() {
|
||||
doIntentionTest(getCONVERT_SET_TO_LIST());
|
||||
doIntentionTest(getConvertSetToList());
|
||||
}
|
||||
|
||||
// PY-16335
|
||||
@@ -158,11 +158,11 @@ public class PyConvertCollectionLiteralIntentionTest extends PyIntentionTestCase
|
||||
return PyBundle.message("INTN.convert.collection.literal.text", "list", "set");
|
||||
}
|
||||
|
||||
private static String getCONVERT_SET_TO_TUPLE() {
|
||||
private static String getConvertSetToTuple() {
|
||||
return PyBundle.message("INTN.convert.collection.literal.text", "set", "tuple");
|
||||
}
|
||||
|
||||
private static String getCONVERT_SET_TO_LIST() {
|
||||
private static String getConvertSetToList() {
|
||||
return PyBundle.message("INTN.convert.collection.literal.text", "set", "list");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user