mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce: force dialogs for non-physical expressions as it is for introduce variable (IDEA-70845)
This commit is contained in:
+1
-1
@@ -145,7 +145,7 @@ public class IntroduceConstantHandler extends BaseExpressionToFieldHandler {
|
||||
}
|
||||
|
||||
final TypeSelectorManagerImpl typeSelectorManager = new TypeSelectorManagerImpl(project, type, containingMethod, expr, occurences);
|
||||
if (editor != null && editor.getSettings().isVariableInplaceRenameEnabled()) {
|
||||
if (editor != null && editor.getSettings().isVariableInplaceRenameEnabled() && (expr == null || expr.isPhysical())) {
|
||||
if (new InplaceIntroduceConstantPopup(project, editor, parentClass, expr, localVariable, occurences, typeSelectorManager,
|
||||
anchorElement, anchorElementIfAll,
|
||||
expr != null ? createOccurenceManager(expr, parentClass) : null).startInplaceIntroduceTemplate() ){
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ public class IntroduceFieldHandler extends BaseExpressionToFieldHandler {
|
||||
final boolean allowInitInMethodIfAll = (!currentMethodConstructor || !isInSuperOrThis) && anchorElementIfAll instanceof PsiStatement;
|
||||
final TypeSelectorManagerImpl typeSelectorManager = new TypeSelectorManagerImpl(project, type, containingMethod, expr, occurences);
|
||||
|
||||
if (editor != null && editor.getSettings().isVariableInplaceRenameEnabled()) {
|
||||
if (editor != null && editor.getSettings().isVariableInplaceRenameEnabled() && (expr == null || expr.isPhysical())) {
|
||||
myInplaceIntroduceFieldPopup =
|
||||
new InplaceIntroduceFieldPopup(localVariable, parentClass, declareStatic, currentMethodConstructor, occurences, expr, typeSelectorManager, editor,
|
||||
allowInitInMethod, allowInitInMethodIfAll, anchorElement, anchorElementIfAll, expr != null ? createOccurenceManager(expr, parentClass) : null,
|
||||
|
||||
+4
@@ -404,6 +404,10 @@ public class IntroduceParameterHandler extends IntroduceHandlerBase implements R
|
||||
NameSuggestionsGenerator nameSuggestionsGenerator = createNameSuggestionGenerator(myExpr, propName, myProject);
|
||||
boolean isInplaceAvailableOnDataContext = myEditor != null && myEditor.getSettings().isVariableInplaceRenameEnabled();
|
||||
|
||||
if (myExpr != null) {
|
||||
isInplaceAvailableOnDataContext &= myExpr.isPhysical();
|
||||
}
|
||||
|
||||
if (isInplaceAvailableOnDataContext) {
|
||||
myInplaceIntroduceParameterPopup =
|
||||
new InplaceIntroduceParameterPopup(myProject, myEditor, classMemberRefs,
|
||||
|
||||
Reference in New Issue
Block a user