mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce variable: do not save final state it wasn't change
This commit is contained in:
+4
-6
@@ -118,7 +118,10 @@ public class VariableInplaceIntroducer extends AbstractInplaceVariableIntroducer
|
||||
return;
|
||||
}
|
||||
LOG.assertTrue(psiVariable.isValid());
|
||||
saveSettings(psiVariable);
|
||||
TypeSelectorManagerImpl.typeSelected(psiVariable.getType(), myDefaultType.getType());
|
||||
if (myCanBeFinalCb != null) {
|
||||
JavaRefactoringSettings.getInstance().INTRODUCE_LOCAL_CREATE_FINALS = psiVariable.hasModifierProperty(PsiModifier.FINAL);
|
||||
}
|
||||
adjustLine(psiVariable, document);
|
||||
|
||||
int startOffset = getExprMarker() != null && getExprMarker().isValid() ? getExprMarker().getStartOffset() : psiVariable.getTextOffset();
|
||||
@@ -178,11 +181,6 @@ public class VariableInplaceIntroducer extends AbstractInplaceVariableIntroducer
|
||||
}
|
||||
}
|
||||
|
||||
protected void saveSettings(PsiVariable psiVariable) {
|
||||
TypeSelectorManagerImpl.typeSelected(psiVariable.getType(), myDefaultType.getType());
|
||||
JavaRefactoringSettings.getInstance().INTRODUCE_LOCAL_CREATE_FINALS = psiVariable.hasModifierProperty(PsiModifier.FINAL);
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
protected JComponent getComponent() {
|
||||
|
||||
Reference in New Issue
Block a user