mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
hide initialization in current method when multiple occurrences found
This commit is contained in:
+11
@@ -233,6 +233,17 @@ public class IntroduceFieldPopupPanel extends IntroduceFieldCentralPanel {
|
||||
return super.allowFinal() && allowFinal;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInitializerSelection() {
|
||||
if (myAllowInitInMethodIfAll || !isReplaceAllOccurrences()) {
|
||||
if (myInitialisersPlaceModel.getIndexOf(BaseExpressionToFieldHandler.InitializationPlace.IN_CURRENT_METHOD) == -1) {
|
||||
myInitialisersPlaceModel.insertElementAt(BaseExpressionToFieldHandler.InitializationPlace.IN_CURRENT_METHOD, 0);
|
||||
}
|
||||
} else {
|
||||
myInitialisersPlaceModel.removeElement(BaseExpressionToFieldHandler.InitializationPlace.IN_CURRENT_METHOD);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldUpdateTypeSelector() {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user