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 with better name
GitOrigin-RevId: 47473f9bd3c2a454188464dbabb69a8329ddeea7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ae5bde9d70
commit
5e39996220
+6
-6
@@ -58,14 +58,14 @@ class WrapReturnValueHandler implements RefactoringActionHandler {
|
||||
}
|
||||
if(selectedMethod == null){
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message(
|
||||
"the.caret.should.be.positioned.at.the.name.of.the.method.to.be.refactored"), getREFACTORING_NAME(), this.getHelpID());
|
||||
"the.caret.should.be.positioned.at.the.name.of.the.method.to.be.refactored"), getRefactoringNameText(), this.getHelpID());
|
||||
return;
|
||||
}
|
||||
invoke(project, selectedMethod, editor);
|
||||
}
|
||||
|
||||
protected String getRefactoringName(){
|
||||
return getREFACTORING_NAME();
|
||||
return getRefactoringNameText();
|
||||
}
|
||||
|
||||
protected String getHelpID(){
|
||||
@@ -91,13 +91,13 @@ class WrapReturnValueHandler implements RefactoringActionHandler {
|
||||
private void invoke(final Project project, PsiMethod method, Editor editor) {
|
||||
if(method.isConstructor()){
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message("constructor.returns.can.not.be.wrapped"),
|
||||
getREFACTORING_NAME(), this.getHelpID());
|
||||
getRefactoringNameText(), this.getHelpID());
|
||||
return;
|
||||
}
|
||||
final PsiType returnType = method.getReturnType();
|
||||
if(PsiType.VOID.equals(returnType)){
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message("method.selected.returns.void"),
|
||||
getREFACTORING_NAME(), this.getHelpID());
|
||||
getRefactoringNameText(), this.getHelpID());
|
||||
return;
|
||||
}
|
||||
method = SuperMethodWarningUtil.checkSuperMethod(method, RefactoringBundle.message("to.refactor"));
|
||||
@@ -105,7 +105,7 @@ class WrapReturnValueHandler implements RefactoringActionHandler {
|
||||
|
||||
if(method instanceof PsiCompiledElement){
|
||||
CommonRefactoringUtil.showErrorHint(project, editor, RefactorJBundle.message("cannot.perform.the.refactoring") + RefactorJBundle.message(
|
||||
"the.selected.method.cannot.be.wrapped.because.it.is.defined.in.a.non.project.class"), getREFACTORING_NAME(), this.getHelpID());
|
||||
"the.selected.method.cannot.be.wrapped.because.it.is.defined.in.a.non.project.class"), getRefactoringNameText(), this.getHelpID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ class WrapReturnValueHandler implements RefactoringActionHandler {
|
||||
|
||||
}
|
||||
|
||||
public static String getREFACTORING_NAME() {
|
||||
public static String getRefactoringNameText() {
|
||||
return RefactorJBundle.message("wrap.return.value");
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -77,7 +77,7 @@ public class GeneralHighlightingPass extends ProgressableTextEditorHighlightingP
|
||||
@NotNull ProperTextRange priorityRange,
|
||||
@Nullable Editor editor,
|
||||
@NotNull HighlightInfoProcessor highlightInfoProcessor) {
|
||||
super(project, document, getPRESENTABLE_NAME(), file, editor, TextRange.create(startOffset, endOffset), true, highlightInfoProcessor);
|
||||
super(project, document, getPresentableNameText(), file, editor, TextRange.create(startOffset, endOffset), true, highlightInfoProcessor);
|
||||
myUpdateAll = updateAll;
|
||||
myPriorityRange = priorityRange;
|
||||
|
||||
@@ -599,7 +599,7 @@ public class GeneralHighlightingPass extends ProgressableTextEditorHighlightingP
|
||||
return super.toString() + " updateAll="+myUpdateAll+" range= "+myRestrictRange;
|
||||
}
|
||||
|
||||
private static String getPRESENTABLE_NAME() {
|
||||
private static String getPresentableNameText() {
|
||||
return DaemonBundle.message("pass.syntax");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user