mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
LAB-62 get rid of static *Bundle usages: public static fields
replace `public static String X = *Bundle.message(...)` with
```public static String getX() {
return *Bundle.message(...)
}
```
GitOrigin-RevId: cb9d31ce0cc938d794867c9467083c9968d8cbd5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f0a9c5f83b
commit
f0df6b34fe
@@ -32,9 +32,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @author Dennis.Ushakov
|
||||
*/
|
||||
public class PyExtractSuperclassHandler extends PyClassRefactoringHandler {
|
||||
public static final String REFACTORING_NAME = RefactoringBundle.message("extract.superclass.title");
|
||||
|
||||
|
||||
@Override
|
||||
protected void doRefactorImpl(@NotNull final Project project,
|
||||
@NotNull final PyClass classUnderRefactoring,
|
||||
@@ -70,11 +67,15 @@ public class PyExtractSuperclassHandler extends PyClassRefactoringHandler {
|
||||
|
||||
@Override
|
||||
protected String getTitle() {
|
||||
return REFACTORING_NAME;
|
||||
return getREFACTORING_NAME();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getHelpId() {
|
||||
return "refactoring.extractSuperclass";
|
||||
}
|
||||
|
||||
public static String getREFACTORING_NAME() {
|
||||
return RefactoringBundle.message("extract.superclass.title");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class PyExtractSuperclassViewSwingImpl
|
||||
@NotNull final Project project,
|
||||
@NotNull final PyExtractSuperclassPresenter presenter) {
|
||||
super(project, presenter, RefactoringBundle.message("extract.superclass.from"), true);
|
||||
setTitle(PyExtractSuperclassHandler.REFACTORING_NAME);
|
||||
setTitle(PyExtractSuperclassHandler.getREFACTORING_NAME());
|
||||
|
||||
|
||||
final Box box = Box.createVerticalBox();
|
||||
|
||||
@@ -29,8 +29,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @author: Dennis.Ushakov
|
||||
*/
|
||||
public class PyPullUpHandler extends PyClassRefactoringHandler {
|
||||
public static final String REFACTORING_NAME = PyBundle.message("refactoring.pull.up.dialog.title");
|
||||
|
||||
@Override
|
||||
protected void doRefactorImpl(@NotNull final Project project,
|
||||
@NotNull final PyClass classUnderRefactoring,
|
||||
@@ -65,11 +63,15 @@ public class PyPullUpHandler extends PyClassRefactoringHandler {
|
||||
|
||||
@Override
|
||||
protected String getTitle() {
|
||||
return REFACTORING_NAME;
|
||||
return getREFACTORING_NAME();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getHelpId() {
|
||||
return "refactoring.pullMembersUp";
|
||||
}
|
||||
|
||||
public static String getREFACTORING_NAME() {
|
||||
return PyBundle.message("refactoring.pull.up.dialog.title");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class PyPullUpProcessor extends PyMembersRefactoringBaseProcessor {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getCommandName() {
|
||||
return PyPullUpHandler.REFACTORING_NAME;
|
||||
return PyPullUpHandler.getREFACTORING_NAME();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,7 +53,7 @@ class PyPullUpViewSwingImpl extends MembersBasedViewSwingImpl<PyPullUpPresenter,
|
||||
@NotNull final PyClass clazz,
|
||||
@NotNull final PyPullUpNothingToRefactorMessage nothingToRefactorMessage) {
|
||||
super(project, presenter, RefactoringBundle.message("members.to.be.pulled.up"), true);
|
||||
setTitle(PyPullUpHandler.REFACTORING_NAME);
|
||||
setTitle(PyPullUpHandler.getREFACTORING_NAME());
|
||||
myNothingToRefactorMessage = nothingToRefactorMessage;
|
||||
|
||||
myParentsComboBoxModel = new DefaultComboBoxModel();
|
||||
|
||||
@@ -32,8 +32,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @author Dennis.Ushakov
|
||||
*/
|
||||
public class PyPushDownHandler extends PyClassRefactoringHandler {
|
||||
public static final String REFACTORING_NAME = RefactoringBundle.message("push.members.down.title");
|
||||
|
||||
@Override
|
||||
protected void doRefactorImpl(@NotNull final Project project,
|
||||
@NotNull final PyClass classUnderRefactoring,
|
||||
@@ -66,11 +64,15 @@ public class PyPushDownHandler extends PyClassRefactoringHandler {
|
||||
|
||||
@Override
|
||||
protected String getTitle() {
|
||||
return REFACTORING_NAME;
|
||||
return getREFACTORING_NAME();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getHelpId() {
|
||||
return "members.push.down";
|
||||
}
|
||||
|
||||
public static String getREFACTORING_NAME() {
|
||||
return RefactoringBundle.message("push.members.down.title");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PyPushDownProcessor extends PyMembersRefactoringBaseProcessor {
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getCommandName() {
|
||||
return PyPushDownHandler.REFACTORING_NAME;
|
||||
return PyPushDownHandler.getREFACTORING_NAME();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PyPushDownViewSwingImpl extends MembersBasedViewSwingImpl<PyPushDow
|
||||
super(project, presenter, RefactoringBundle.message("push.members.from.0.down.label", classUnderRefactoring.getName()), false);
|
||||
|
||||
myCenterPanel.add(myPyMemberSelectionPanel, BorderLayout.CENTER);
|
||||
setTitle(PyPushDownHandler.REFACTORING_NAME);
|
||||
setTitle(PyPushDownHandler.getREFACTORING_NAME());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -50,8 +50,6 @@ import java.util.List;
|
||||
* @see PyMoveSymbolProcessor
|
||||
*/
|
||||
public class PyMoveModuleMembersProcessor extends BaseRefactoringProcessor {
|
||||
public static final String REFACTORING_NAME = PyBundle.message("refactoring.move.module.members");
|
||||
|
||||
private final List<SmartPsiElementPointer<PsiNamedElement>> myElements;
|
||||
private final LinkedHashSet<PsiFile> mySourceFiles;
|
||||
private final String myDestination;
|
||||
@@ -76,7 +74,7 @@ public class PyMoveModuleMembersProcessor extends BaseRefactoringProcessor {
|
||||
|
||||
@Override
|
||||
public String getProcessedElementsHeader() {
|
||||
return REFACTORING_NAME;
|
||||
return getREFACTORING_NAME();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -141,13 +139,13 @@ public class PyMoveModuleMembersProcessor extends BaseRefactoringProcessor {
|
||||
for (PsiFile file : optimizeImportsTargets) {
|
||||
PyClassRefactoringUtil.optimizeImports(file);
|
||||
}
|
||||
}), REFACTORING_NAME, null);
|
||||
}), getREFACTORING_NAME(), null);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getCommandName() {
|
||||
return REFACTORING_NAME;
|
||||
return getREFACTORING_NAME();
|
||||
}
|
||||
|
||||
private static class MyUsageInfo extends UsageInfo {
|
||||
@@ -157,5 +155,9 @@ public class PyMoveModuleMembersProcessor extends BaseRefactoringProcessor {
|
||||
myMovedElement = element;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getREFACTORING_NAME() {
|
||||
return PyBundle.message("refactoring.move.module.members");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user