Groovy: update Inline dialog texts (IJPL-10853)

GitOrigin-RevId: 35e021b74139e7c7af6ce651b75dad5ed3c41f0f
This commit is contained in:
Bas Leijdekkers
2024-10-11 16:06:42 +02:00
committed by intellij-monorepo-bot
parent 0f2a6017eb
commit 1375efd017
3 changed files with 14 additions and 24 deletions

View File

@@ -20,12 +20,10 @@ specify.type.label=Specify return &type explicitly
signature.preview.border.title=Signature Preview signature.preview.border.title=Signature Preview
method.is.already.defined.in.class=Method {0} is already defined in the class {1}. method.is.already.defined.in.class=Method {0} is already defined in the class {1}.
method.is.already.defined.in.script=Method {0} is already defined in the script {1}. method.is.already.defined.in.script=Method {0} is already defined in the script {1}.
inline.method.title=Inline Method inline.method.label=Inline method ''{0}''
inline.method.border.title=Inline all.invocations.and.remove.the.method=Inline &all usages and remove the method
inline.method.label=Method {0} all.invocations.in.project=Inline &all usages in the project
all.invocations.and.remove.the.method=Inline &all invocations and remove the method this.invocation.only.and.keep.the.method=Inline &this usage only and keep the method
all.invocations.in.project=Inline &all invocations in project
this.invocation.only.and.keep.the.method=Inline &this invocation only and keep the method
refactoring.cannot.be.applied.to.abstract.methods=Refactoring cannot be applied to abstract methods refactoring.cannot.be.applied.to.abstract.methods=Refactoring cannot be applied to abstract methods
refactoring.cannot.be.applied.no.sources.attached=Refactoring cannot be applied: no sources attached refactoring.cannot.be.applied.no.sources.attached=Refactoring cannot be applied: no sources attached
refactoring.is.not.supported.when.return.statement.interrupts.the.execution.flow=Refactoring is not supported when return statement interrupts the execution flow refactoring.is.not.supported.when.return.statement.interrupts.the.execution.flow=Refactoring is not supported when return statement interrupts the execution flow

View File

@@ -1,5 +1,4 @@
// Copyright 2000-2020 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. // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.groovy.refactoring.inline; package org.jetbrains.plugins.groovy.refactoring.inline;
import com.intellij.codeInsight.TargetElementUtil; import com.intellij.codeInsight.TargetElementUtil;
@@ -15,6 +14,7 @@ import com.intellij.psi.search.LocalSearchScope;
import com.intellij.psi.search.searches.ReferencesSearch; import com.intellij.psi.search.searches.ReferencesSearch;
import com.intellij.psi.util.PsiTreeUtil; import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.refactoring.HelpID; import com.intellij.refactoring.HelpID;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.refactoring.inline.InlineOptionsDialog; import com.intellij.refactoring.inline.InlineOptionsDialog;
import com.intellij.refactoring.util.CommonRefactoringUtil; import com.intellij.refactoring.util.CommonRefactoringUtil;
import com.intellij.util.IncorrectOperationException; import com.intellij.util.IncorrectOperationException;
@@ -339,11 +339,6 @@ public final class GroovyInlineMethodUtil {
init(); init();
} }
@Override
protected String getBorderTitle() {
return GroovyRefactoringBundle.message("inline.method.border.title");
}
@Override @Override
protected String getNameLabelText() { protected String getNameLabelText() {
return GroovyRefactoringBundle.message("inline.method.label", GroovyRefactoringUtil.getMethodSignature(myMethod)); return GroovyRefactoringBundle.message("inline.method.label", GroovyRefactoringUtil.getMethodSignature(myMethod));
@@ -570,6 +565,6 @@ public final class GroovyInlineMethodUtil {
} }
public static @Nls(capitalization = Title) String getRefactoringName() { public static @Nls(capitalization = Title) String getRefactoringName() {
return GroovyRefactoringBundle.message("inline.method.title"); return RefactoringBundle.message("inline.method.title");
} }
} }

View File

@@ -1,4 +1,4 @@
// Copyright 2000-2020 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. // Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.plugins.groovy.refactoring.inline; package org.jetbrains.plugins.groovy.refactoring.inline;
import com.intellij.java.refactoring.JavaRefactoringBundle; import com.intellij.java.refactoring.JavaRefactoringBundle;
@@ -6,9 +6,9 @@ import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiField; import com.intellij.psi.PsiField;
import com.intellij.psi.PsiSubstitutor; import com.intellij.psi.PsiSubstitutor;
import com.intellij.psi.util.PsiFormatUtil; import com.intellij.psi.util.PsiFormatUtil;
import com.intellij.psi.util.PsiFormatUtilBase;
import com.intellij.refactoring.HelpID; import com.intellij.refactoring.HelpID;
import com.intellij.refactoring.JavaRefactoringSettings; import com.intellij.refactoring.JavaRefactoringSettings;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.refactoring.inline.InlineOptionsDialog; import com.intellij.refactoring.inline.InlineOptionsDialog;
import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.Nls;
@@ -32,14 +32,11 @@ class InlineGroovyFieldDialog extends InlineOptionsDialog {
@Override @Override
protected String getNameLabelText() { protected String getNameLabelText() {
@SuppressWarnings("StaticFieldReferencedViaSubclass") int options = myInvokedOnReference
String fieldText = PsiFormatUtil.formatVariable(myField, PsiFormatUtil.SHOW_NAME | PsiFormatUtil.SHOW_TYPE, PsiSubstitutor.EMPTY); ? PsiFormatUtilBase.SHOW_CONTAINING_CLASS | PsiFormatUtilBase.SHOW_NAME
return JavaRefactoringBundle.message("inline.field.field.name.label", fieldText, ""); : PsiFormatUtilBase.SHOW_NAME;
} String fieldText = PsiFormatUtil.formatVariable(myField, options, PsiSubstitutor.EMPTY);
return JavaRefactoringBundle.message("inline.field.field.name.label", fieldText);
@Override
protected String getBorderTitle() {
return RefactoringBundle.message("inline.field.border.title");
} }
@Override @Override