use of org.jetbrains.plugins.groovy.refactoring.introduce.variable.GrIntroduceVariableHandler in project intellij-community by JetBrains.
the class GrIntroduceParameterHandler method createContext.
private static GrIntroduceContext createContext(@NotNull IntroduceParameterInfo info, @NotNull Editor editor) {
GrExpression expr = GroovyIntroduceParameterUtil.findExpr(info);
GrVariable var = GroovyIntroduceParameterUtil.findVar(info);
StringPartInfo stringPart = info.getStringPartInfo();
return new GrIntroduceVariableHandler().getContext(info.getProject(), editor, expr, var, stringPart, info.getToReplaceIn());
}
use of org.jetbrains.plugins.groovy.refactoring.introduce.variable.GrIntroduceVariableHandler in project intellij-community by JetBrains.
the class GrIntroduceLocalVariableIntention method processIntention.
@Override
protected void processIntention(@NotNull final PsiElement element, @NotNull final Project project, final Editor editor) throws IncorrectOperationException {
setSelection(editor, getTargetExpression(element));
final PsiFile file = element.getContainingFile();
new GrIntroduceVariableHandler().invoke(project, editor, file, null);
}
Aggregations