mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 21:43:33 +07:00
do not try to show "can be final" when it should be hidden (EA-26324 - NPE: VariableInplaceIntroducer.getComponent)
This commit is contained in:
+3
-1
@@ -187,7 +187,9 @@ class InplaceIntroduceParameterPopup extends IntroduceParameterSettingsUI {
|
||||
|
||||
final JPanel wrapper = new JPanel(new BorderLayout());
|
||||
wrapper.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
||||
wrapper.add(myCanBeFinal, BorderLayout.NORTH);
|
||||
if (myCanBeFinal != null) {
|
||||
wrapper.add(myCanBeFinal, BorderLayout.NORTH);
|
||||
}
|
||||
panel.add(wrapper, BorderLayout.SOUTH);
|
||||
|
||||
return panel;
|
||||
|
||||
+3
-1
@@ -235,7 +235,9 @@ public class VariableInplaceIntroducer extends VariableInplaceRenamer {
|
||||
titlePanel.setText(IntroduceVariableBase.REFACTORING_NAME);
|
||||
panel.add(titlePanel, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0));
|
||||
|
||||
panel.add(myCanBeFinal, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
|
||||
if (myCanBeFinal != null) {
|
||||
panel.add(myCanBeFinal, new GridBagConstraints(0, 1, 1, 1, 1, 0, GridBagConstraints.NORTHWEST, GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0));
|
||||
}
|
||||
|
||||
panel.add(Box.createVerticalBox(), new GridBagConstraints(0, 2, 1, 1, 1, 1, GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(0,0,0,0), 0,0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user