mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
initialize text fixed (IDEA-69251)
This commit is contained in:
+4
-2
@@ -166,7 +166,7 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
||||
groupPanel.add(initializersCombo, gridBagConstraints);
|
||||
myInitializerCombo = initializersCombo;
|
||||
} else {
|
||||
} else if (myInitialisersPlaceModel.getSize() == 1){
|
||||
gridBagConstraints.gridwidth = 2;
|
||||
groupPanel.add(new JLabel("Initialize field in " +
|
||||
getPresentableText((BaseExpressionToFieldHandler.InitializationPlace)myInitialisersPlaceModel.getElementAt(0))),
|
||||
@@ -186,6 +186,7 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
return mainPanel;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static String getPresentableText(BaseExpressionToFieldHandler.InitializationPlace value) {
|
||||
if (value == BaseExpressionToFieldHandler.InitializationPlace.IN_CURRENT_METHOD) {
|
||||
return "current method";
|
||||
@@ -193,9 +194,10 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
return "constructor";
|
||||
} else if (value == BaseExpressionToFieldHandler.InitializationPlace.IN_FIELD_DECLARATION) {
|
||||
return "field declaration";
|
||||
} else {
|
||||
} else if (value == BaseExpressionToFieldHandler.InitializationPlace.IN_SETUP_METHOD){
|
||||
return "setUp";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
protected boolean setEnabledInitializationPlaces(PsiElement initializerPart, PsiElement initializer) {
|
||||
|
||||
Reference in New Issue
Block a user