final enable/disable state update: popup [spleaner]

(cherry picked from commit 72aaa395981cd64aaf0ab33a17100a6ed001cdd8)
This commit is contained in:
Roman Shevchenko
2011-05-10 22:16:53 +04:00
parent 9e06ff1fa2
commit 4a6fc31399
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2011 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -476,7 +476,7 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase impleme
final PsiVariable elementToRename = variable.get().getElement();
if (elementToRename != null) {
editor.getCaretModel().moveToOffset(elementToRename.getTextOffset());
final boolean cantChangeFinalModifier = hasWriteAccess || (inFinalContext && choice == OccurrencesChooser.ReplaceChoice.ALL);
final boolean cantChangeFinalModifier = (hasWriteAccess || inFinalContext) && choice == OccurrencesChooser.ReplaceChoice.ALL;
final VariableInplaceRenamer renamer =
new VariableInplaceIntroducer(project, expression, editor, elementToRename, cantChangeFinalModifier,
typeSelectorManager.getTypesForAll().length > 1, exprMarker, occurrenceMarkers, IntroduceVariableBase.REFACTORING_NAME);