AbstractInplaceIntroducer (MyIntroduceHandler introduceHandler) { final PsiExpression expression = getExpressionFromEditor(); if (expression != null) { introduceHandler.invokeImpl(getProject(), expression, getEditor()); } else { final PsiLocalVariable localVariable = getLocalVariableFromEditor(); introduceHandler.invokeImpl(getProject(), localVariable, getEditor()); } return introduceHandler.getInplaceIntroducer(); }