mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 21:41:24 +07:00
i18n java fixes
GitOrigin-RevId: c959538a5724a2057be6e5123b891250ac30b4d3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c578ee2549
commit
7f69cec585
@@ -364,4 +364,46 @@ change.method.parameters.family=Change method parameters
|
||||
|
||||
add.default.branch.to.variable.initializing.switch.fix.name=Add ''default'' branch to the ''switch'' statement which initializes ''{0}''
|
||||
|
||||
add.empty.record.header=Insert '()'
|
||||
insert.empty.parenthesis=Insert '()'
|
||||
remove.parameter.list=Remove parameter list
|
||||
|
||||
convert.primitive.to.boxed.type=Convert primitive to boxed type
|
||||
|
||||
choose.class.to.move.popup.title=Choose Class to Move
|
||||
move.0.in.1=Move ''{0}'' in ''{1}''...
|
||||
move.0.from.module.1.to.2=Move ''{0}'' from module ''{1}'' to ''{2}''
|
||||
|
||||
add.0.to.classpath=Add ''{0}'' to classpath
|
||||
|
||||
pull.up=Pull up
|
||||
|
||||
iterate.iterable=Iterate
|
||||
rename.reference=Rename Reference
|
||||
|
||||
choose.fields.to.generate.constructor.parameters.for=Choose Fields to Generate Constructor Parameters for
|
||||
choose.constructors.to.add.parameter.to=Choose Constructors to Add Parameter to
|
||||
add.constructor.parameters=Add constructor parameters
|
||||
|
||||
add.annotation.attribute.name.family.name=Add annotation attribute name
|
||||
add.annotation.attribute.name=Add ''{0}=''
|
||||
|
||||
replace.with.getter.setter=Replace with getter/setter
|
||||
replace.with.getter=Replace with getter
|
||||
replace.with.setter=Replace with setter
|
||||
|
||||
wrap.with.block=Wrap with block
|
||||
create.block=Create block
|
||||
|
||||
replace.for.each.loop.with.iterator.for.loop=Replace 'for each' loop with iterator 'for' loop
|
||||
|
||||
surround.annotation.parameter.value.with.quotes=Surround annotation parameter value with quotes
|
||||
surround.with.array.initialization=Surround with array initialization
|
||||
|
||||
create.service.implementation=Create Service Implementation
|
||||
create.service=Create Service
|
||||
|
||||
choose.default.value.parameters.popup.title=Choose Default Value Parameters
|
||||
generate.overloaded.method.or.constructor.with.default.parameter.values=Generate overloaded {0} with default parameter values
|
||||
generate.overloaded.method.with.default.parameter.values=Generate overloaded method with default parameter values
|
||||
|
||||
remove.unreachable.branches=Remove unreachable branches
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -43,14 +44,14 @@ public class AddAnnotationAttributeNameFix extends LocalQuickFixAndIntentionActi
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Add '" + myName + "='";
|
||||
return QuickFixBundle.message("add.annotation.attribute.name", myName);
|
||||
}
|
||||
|
||||
@Nls
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Add annotation attribute name";
|
||||
return QuickFixBundle.message("add.annotation.attribute.name.family.name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,6 +43,6 @@ public class AddEmptyRecordHeaderFix extends LocalQuickFixAndIntentionActionOnPs
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return QuickFixBundle.message("add.empty.record.header");
|
||||
return QuickFixBundle.message("insert.empty.parenthesis");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -39,7 +40,7 @@ class AddExtLibraryDependencyFix extends OrderEntryFix {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Add '" + myLibraryDescriptor.getPresentableName() + "' to classpath";
|
||||
return QuickFixBundle.message("add.0.to.classpath", myLibraryDescriptor.getPresentableName());
|
||||
}
|
||||
|
||||
@Nls
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -41,7 +42,7 @@ public class AddParameterListFix extends LocalQuickFixAndIntentionActionOnPsiEle
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Insert '()'";
|
||||
return QuickFixBundle.message("insert.empty.parenthesis");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class CreateConstructorParameterFromFieldFix implements IntentionAction {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getText() {
|
||||
if (getFieldsToFix().size() > 1 && myConstructorsLength <= 1) return "Add constructor parameters";
|
||||
if (getFieldsToFix().size() > 1 && myConstructorsLength <= 1) return QuickFixBundle.message("add.constructor.parameters");
|
||||
return QuickFixBundle.message("add.constructor.parameter.name");
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public class CreateConstructorParameterFromFieldFix implements IntentionAction {
|
||||
elements = Arrays.asList(members);
|
||||
} else {
|
||||
final MemberChooser<PsiMethodMember> chooser = new MemberChooser<>(members, false, true, project);
|
||||
chooser.setTitle("Choose Constructors to Add Parameter to");
|
||||
chooser.setTitle(QuickFixBundle.message("choose.constructors.to.add.parameter.to"));
|
||||
chooser.show();
|
||||
elements = chooser.getSelectedElements();
|
||||
if (elements == null) return;
|
||||
@@ -166,7 +166,7 @@ public class CreateConstructorParameterFromFieldFix implements IntentionAction {
|
||||
members[i++] = new PsiFieldMember(field);
|
||||
}
|
||||
MemberChooser<PsiElementClassMember> chooser = new MemberChooser<>(members, false, true, project);
|
||||
chooser.setTitle("Choose Fields to Generate Constructor Parameters for");
|
||||
chooser.setTitle(QuickFixBundle.message("choose.fields.to.generate.constructor.parameters.for"));
|
||||
chooser.show();
|
||||
if (chooser.getExitCode() != DialogWrapper.OK_EXIT_CODE) return;
|
||||
final List<PsiElementClassMember> selectedElements = chooser.getSelectedElements();
|
||||
|
||||
@@ -165,7 +165,7 @@ public class CreateServiceImplementationClassFix extends CreateServiceClassFixBa
|
||||
PsiDirectory @NotNull [] psiRootDirs,
|
||||
@NotNull String superClassName) {
|
||||
super(project);
|
||||
setTitle("Create Service Implementation");
|
||||
setTitle(QuickFixBundle.message("create.service.implementation"));
|
||||
|
||||
mySubclassButton.setText("Subclass of '" + superClassName + "'");
|
||||
mySubclassButton.setSelected(true);
|
||||
|
||||
@@ -142,7 +142,7 @@ public class CreateServiceInterfaceOrClassFix extends CreateServiceClassFixBase
|
||||
|
||||
protected CreateServiceInterfaceDialog(@Nullable Project project, @NotNull Map<Module, PsiDirectory[]> psiRootDirs) {
|
||||
super(project);
|
||||
setTitle("Create Service");
|
||||
setTitle(QuickFixBundle.message("create.service"));
|
||||
|
||||
myModuleCombo.setRenderer(SimpleListCellRenderer.create("", Module::getName));
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.FileModificationService;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.generation.ClassMember;
|
||||
import com.intellij.codeInsight.generation.RecordConstructorMember;
|
||||
import com.intellij.codeInsight.hint.HintManager;
|
||||
@@ -64,7 +65,7 @@ public class DefineParamsDefaultValueAction extends PsiElementBaseIntentionActio
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Generate overloaded method with default parameter values";
|
||||
return QuickFixBundle.message("generate.overloaded.method.with.default.parameter.values");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,7 +91,7 @@ public class DefineParamsDefaultValueAction extends PsiElementBaseIntentionActio
|
||||
if (containingClass == null || (containingClass.isInterface() && !PsiUtil.isLanguageLevel8OrHigher(method))) {
|
||||
return false;
|
||||
}
|
||||
setText("Generate overloaded " + (method.isConstructor() ? "constructor" : "method") + " with default parameter values");
|
||||
setText(QuickFixBundle.message("generate.overloaded.method.or.constructor.with.default.parameter.values", method.isConstructor() ? "constructor" : "method"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -201,7 +202,7 @@ public class DefineParamsDefaultValueAction extends PsiElementBaseIntentionActio
|
||||
else {
|
||||
chooser.selectElements(members);
|
||||
}
|
||||
chooser.setTitle("Choose Default Value Parameters");
|
||||
chooser.setTitle(QuickFixBundle.message("choose.default.value.parameters.popup.title"));
|
||||
chooser.setCopyJavadocVisible(false);
|
||||
if (chooser.showAndGet()) {
|
||||
final List<ParameterClassMember> elements = chooser.getSelectedElements();
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInsight.template.impl.InvokeTemplateAction;
|
||||
import com.intellij.codeInsight.template.impl.TemplateImpl;
|
||||
@@ -74,7 +75,7 @@ public class IterateOverIterableIntention implements IntentionAction {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Iterate";
|
||||
return QuickFixBundle.message("iterate.iterable");
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixActionRegistrar;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.daemon.impl.actions.AddImportAction;
|
||||
import com.intellij.codeInsight.hint.QuestionAction;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
@@ -74,10 +75,10 @@ public class MoveClassToModuleFix implements IntentionAction {
|
||||
public String getText() {
|
||||
if (myModules.size() == 1) {
|
||||
final PsiClass aClass = myModules.keySet().iterator().next();
|
||||
return "Move '" + aClass.getQualifiedName() + "' from module '" + myModules.get(aClass).getName() +
|
||||
"' to '" + myCurrentModule.getName() + "'";
|
||||
return QuickFixBundle
|
||||
.message("move.0.from.module.1.to.2", aClass.getQualifiedName(), myModules.get(aClass).getName(), myCurrentModule.getName());
|
||||
}
|
||||
return "Move '" + myReferenceName + "' in '" + myCurrentModule.getName() + "'...";
|
||||
return QuickFixBundle.message("move.0.in.1", myReferenceName, myCurrentModule.getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -100,7 +101,7 @@ public class MoveClassToModuleFix implements IntentionAction {
|
||||
LOG.assertTrue(editor != null);
|
||||
JBPopupFactory.getInstance()
|
||||
.createPopupChooserBuilder(new ArrayList<>(myModules.keySet()))
|
||||
.setTitle("Choose Class to Move")
|
||||
.setTitle(QuickFixBundle.message("choose.class.to.move.popup.title"))
|
||||
.setRenderer(new PsiElementListCellRenderer<PsiClass>() {
|
||||
@Override
|
||||
public String getElementText(PsiClass psiClass) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -35,7 +36,7 @@ public class RemoveParameterListFix implements IntentionAction {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getText() {
|
||||
return "Remove parameter list";
|
||||
return QuickFixBundle.message("remove.parameter.list");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.intention.HighPriorityAction;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -34,7 +35,7 @@ public class RemoveTypeArgumentsFix extends LocalQuickFixAndIntentionActionOnPsi
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Remove type arguments";
|
||||
return InspectionsBundle.message("inspection.redundant.type.remove.quickfix");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -203,7 +203,7 @@ public class RenameWrongRefFix implements IntentionAction, HintAction {
|
||||
}
|
||||
JBPopupFactory.getInstance()
|
||||
.createPopupChooserBuilder(Arrays.asList(myItems))
|
||||
.setTitle("Rename Reference")
|
||||
.setTitle(QuickFixBundle.message("rename.reference"))
|
||||
.setRenderer(new DefaultListCellRenderer() {
|
||||
@Override
|
||||
public Component getListCellRendererComponent(JList<?> list,
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInspection.CommonQuickFixBundle;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleUtilCore;
|
||||
@@ -44,7 +45,7 @@ public class ReplaceAddAllArrayToCollectionFix implements IntentionAction {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getText() {
|
||||
return "Replace " + myMethodCall.getText() + " with " + getCollectionsMethodCall();
|
||||
return CommonQuickFixBundle.message("fix.replace.x.with.y", myMethodCall.getText(), getCollectionsMethodCall());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -68,12 +69,12 @@ public class ReplaceInaccessibleFieldWithGetterSetterFix extends LocalQuickFixAn
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return myIsSetter ? "Replace with setter" : "Replace with getter";
|
||||
return myIsSetter ? QuickFixBundle.message("replace.with.setter") : QuickFixBundle.message("replace.with.getter");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Replace with getter/setter";
|
||||
return QuickFixBundle.message("replace.with.getter.setter");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.application.options.CodeStyle;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInsight.intention.impl.BaseIntentionAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -48,7 +49,7 @@ public class ReplaceIteratorForEachLoopWithIteratorForLoopFix implements Intenti
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Replace 'for each' loop with iterator 'for' loop";
|
||||
return QuickFixBundle.message("replace.for.each.loop.with.iterator.for.loop");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInspection.CommonQuickFixBundle;
|
||||
import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
@@ -37,13 +39,13 @@ public class ReplacePrimitiveWithBoxedTypeAction extends LocalQuickFixAndIntenti
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Convert '" + myPrimitiveName + "' to '" + myBoxedTypeName + "'";
|
||||
return CommonQuickFixBundle.message("fix.replace.x.with.y", myPrimitiveName, myBoxedTypeName);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Convert primitive to boxed type";
|
||||
return QuickFixBundle.message("convert.primitive.to.boxed.type");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.TargetElementUtil;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -46,7 +47,7 @@ public class SurroundWithArrayFix extends PsiElementBaseIntentionAction {
|
||||
@Override
|
||||
@NotNull
|
||||
public String getText() {
|
||||
return "Surround with array initialization";
|
||||
return QuickFixBundle.message("surround.with.array.initialization");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixActionRegistrar;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -63,7 +64,7 @@ public class SurroundWithQuotesAnnotationParameterValueFix implements IntentionA
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Surround annotation parameter value with quotes";
|
||||
return QuickFixBundle.message("surround.annotation.parameter.value.with.quotes");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.BlockUtils;
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.dataFlow.fix.DeleteSwitchLabelFix;
|
||||
@@ -24,7 +25,7 @@ public class UnwrapSwitchLabelFix implements LocalQuickFix {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Remove unreachable branches";
|
||||
return QuickFixBundle.message("remove.unreachable.branches");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
|
||||
import com.intellij.codeInsight.daemon.QuickFixBundle;
|
||||
import com.intellij.codeInsight.intention.impl.BaseIntentionAction;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -25,7 +26,7 @@ public class WrapSwitchRuleStatementsIntoBlockFix extends BaseIntentionAction {
|
||||
@NotNull
|
||||
@Override
|
||||
public String getFamilyName() {
|
||||
return "Create block";
|
||||
return QuickFixBundle.message("create.block");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,7 +38,7 @@ public class WrapSwitchRuleStatementsIntoBlockFix extends BaseIntentionAction {
|
||||
if (sibling == null || sibling instanceof PsiSwitchLabelStatementBase) {
|
||||
setText(getFamilyName());
|
||||
} else {
|
||||
setText("Wrap with block");
|
||||
setText(QuickFixBundle.message("wrap.with.block"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace l.addAll(objs) with java.util.Collections.addAll(l, objs)" "true"
|
||||
// "Replace 'l.addAll(objs)' with 'java.util.Collections.addAll(l, objs)'" "true"
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace addAll(objs) with java.util.Collections.addAll(this, objs)" "true"
|
||||
// "Replace 'addAll(objs)' with 'java.util.Collections.addAll(this, objs)'" "true"
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace l.addAll(objs) with java.util.Collections.addAll(l, objs)" "true"
|
||||
// "Replace 'l.addAll(objs)' with 'java.util.Collections.addAll(l, objs)'" "true"
|
||||
import java.util.List;
|
||||
|
||||
class A {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace addAll(objs) with java.util.Collections.addAll(this, objs)" "true"
|
||||
// "Replace 'addAll(objs)' with 'java.util.Collections.addAll(this, objs)'" "true"
|
||||
import java.util.List;
|
||||
|
||||
class A implements List {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Replace l.removeAll(objs) with java.util.Collections.addAll(l, objs)" "false"
|
||||
// "Replace 'l.removeAll(objs)' with 'java.util.Collections.addAll(l, objs)'" "false"
|
||||
class T {
|
||||
public static void main(String[] args){
|
||||
List l = new List();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Convert 'int' to 'java.lang.Integer'" "true"
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Convert 'int' to 'java.lang.Integer'" "true"
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Convert 'int' to 'java.lang.Integer'" "true"
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Convert 'int' to 'java.lang.Integer'" "true"
|
||||
// "Replace 'int' with 'java.lang.Integer'" "true"
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.java.propertyBased;
|
||||
|
||||
import com.intellij.codeInsight.daemon.impl.HighlightInfo;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInspection.InspectionsBundle;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
@@ -76,35 +77,35 @@ class JavaCommentingStrategy extends JavaIntentionPolicy {
|
||||
public boolean checkComments(IntentionAction intention) {
|
||||
String intentionText = intention.getText();
|
||||
boolean isCommentChangingAction = intentionText.startsWith("Replace with end-of-line comment") ||
|
||||
intentionText.startsWith("Replace with block comment") ||
|
||||
intentionText.startsWith("Remove //noinspection") ||
|
||||
intentionText.startsWith("Unwrap 'if' statement") || //remove ifs content
|
||||
intentionText.startsWith("Remove 'if' statement") || //remove content of the if with everything inside
|
||||
intentionText.startsWith("Unimplement Class") || intentionText.startsWith("Unimplement Interface") || //remove methods in batch
|
||||
intentionText.startsWith("Suppress with 'NON-NLS' comment") ||
|
||||
intentionText.startsWith("Move comment to separate line") || //merge comments on same line
|
||||
intentionText.startsWith("Remove redundant arguments to call") || //removes arg with all comments inside
|
||||
intentionText.startsWith("Convert to 'enum'") || //removes constructor with javadoc?
|
||||
intentionText.startsWith("Remove redundant constructor") ||
|
||||
intentionText.startsWith("Remove block marker comments") ||
|
||||
intentionText.startsWith("Remove redundant method") ||
|
||||
intentionText.startsWith("Delete unnecessary import") ||
|
||||
intentionText.startsWith("Delete empty class initializer") ||
|
||||
intentionText.startsWith("Replace with 'throws Exception'") ||
|
||||
intentionText.startsWith("Replace unicode escape with character") ||
|
||||
intentionText.startsWith("Remove 'serialVersionUID' field") ||
|
||||
intentionText.startsWith("Remove unnecessary") ||
|
||||
intentionText.startsWith("Remove 'try-finally' block") ||
|
||||
intentionText.startsWith("Fix doc comment") ||
|
||||
intentionText.startsWith("Add Javadoc") ||
|
||||
intentionText.startsWith("Replace qualified name with import") || //may change references in javadoc, making refs always qualified in javadoc makes them expand on "reformat"
|
||||
intentionText.startsWith("Qualify with outer class") || // may change links in javadoc
|
||||
intentionText.contains("'ordering inconsistent with equals'") || //javadoc will be changed
|
||||
intentionText.matches("Simplify '.*' to .*") ||
|
||||
intentionText.matches("Move '.*' to Javadoc ''@throws'' tag") ||
|
||||
intentionText.matches("Remove '.*' from '.*' throws list") ||
|
||||
intentionText.matches("Remove type arguments") ||
|
||||
intentionText.matches("Remove .+ suppression");
|
||||
intentionText.startsWith("Replace with block comment") ||
|
||||
intentionText.startsWith("Remove //noinspection") ||
|
||||
intentionText.startsWith("Unwrap 'if' statement") ||//remove ifs content
|
||||
intentionText.startsWith("Remove 'if' statement") ||//remove content of the if with everything inside
|
||||
intentionText.startsWith("Unimplement Class") || intentionText.startsWith("Unimplement Interface") ||//remove methods in batch
|
||||
intentionText.startsWith("Suppress with 'NON-NLS' comment") ||
|
||||
intentionText.startsWith("Move comment to separate line") ||//merge comments on same line
|
||||
intentionText.startsWith("Remove redundant arguments to call") ||//removes arg with all comments inside
|
||||
intentionText.startsWith("Convert to 'enum'") ||//removes constructor with javadoc?
|
||||
intentionText.startsWith("Remove redundant constructor") ||
|
||||
intentionText.startsWith("Remove block marker comments") ||
|
||||
intentionText.startsWith("Remove redundant method") ||
|
||||
intentionText.startsWith("Delete unnecessary import") ||
|
||||
intentionText.startsWith("Delete empty class initializer") ||
|
||||
intentionText.startsWith("Replace with 'throws Exception'") ||
|
||||
intentionText.startsWith("Replace unicode escape with character") ||
|
||||
intentionText.startsWith("Remove 'serialVersionUID' field") ||
|
||||
intentionText.startsWith("Remove unnecessary") ||
|
||||
intentionText.startsWith("Remove 'try-finally' block") ||
|
||||
intentionText.startsWith("Fix doc comment") ||
|
||||
intentionText.startsWith("Add Javadoc") ||
|
||||
intentionText.startsWith("Replace qualified name with import") ||//may change references in javadoc, making refs always qualified in javadoc makes them expand on "reformat"
|
||||
intentionText.startsWith("Qualify with outer class") ||// may change links in javadoc
|
||||
intentionText.contains("'ordering inconsistent with equals'") ||//javadoc will be changed
|
||||
intentionText.matches("Simplify '.*' to .*") ||
|
||||
intentionText.matches("Move '.*' to Javadoc ''@throws'' tag") ||
|
||||
intentionText.matches("Remove '.*' from '.*' throws list") ||
|
||||
intentionText.matches(InspectionsBundle.message("inspection.redundant.type.remove.quickfix")) ||
|
||||
intentionText.matches("Remove .+ suppression");
|
||||
return !isCommentChangingAction;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user