Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
30,900
void () { final GrVariable var = mySettings.getVar(); if (var != null && mySettings.removeLocalVariable()) { var.delete(); } }
processVar
30,901
void () { final StringPartInfo stringPartInfo = mySettings.getStringPartInfo(); if (stringPartInfo != null) { final GrExpression expr = mySettings.getStringPartInfo().replaceLiteralWithConcatenation(mySettings.getName()); final Editor editor = PsiEditorUtil.findEditor(expr); if (editor != null) { editor.getSelectionMod...
processStringPart
30,902
void (UsageInfo[] usages, GroovyPsiElementFactory factory) { // Replacing expression occurrences for (UsageInfo usage : usages) { if (usage instanceof ChangedMethodCallInfo) { PsiElement element = usage.getElement(); GroovyIntroduceParameterUtil.processChangedMethodCall(element, mySettings, myProject); } else if (usage...
processUsages
30,903
void (UsageInfo[] usages, GrMethod toReplaceIn, PsiMethod toSearchFor, boolean methodsToProcessAreDifferent) { IntroduceParameterUtil.changeMethodSignatureAndResolveFieldConflicts(new UsageInfo(toReplaceIn), usages, this); if (methodsToProcessAreDifferent) { IntroduceParameterUtil.changeMethodSignatureAndResolveFieldCo...
processMethodSignature
30,904
void (GrMethod toReplaceIn, PsiMethod toSearchFor, boolean methodsToProcessAreDifferent) { GroovyIntroduceParameterUtil.generateDelegate(toReplaceIn, myParameterInitializer, myProject); if (methodsToProcessAreDifferent) { final GrMethod method = GroovyIntroduceParameterUtil.generateDelegate(toSearchFor, myParameterInit...
generateDelegate
30,905
String () { return JavaRefactoringBundle.message("introduce.parameter.command", DescriptiveNameUtil.getDescriptiveName(mySettings.getToReplaceIn())); }
getCommandName
30,906
Project () { return mySettings.getProject(); }
getProject
30,907
PsiMethod () { return (PsiMethod)mySettings.getToReplaceIn(); }
getMethodToReplaceIn
30,908
PsiMethod () { return (PsiMethod)mySettings.getToSearchFor(); }
getMethodToSearchFor
30,909
String () { return mySettings.getName(); }
getParameterName
30,910
int () { return mySettings.replaceFieldsWithGetters(); }
getReplaceFieldsWithGetters
30,911
boolean () { return mySettings.declareFinal(); }
isDeclareFinal
30,912
boolean () { return mySettings.generateDelegate(); }
isGenerateDelegate
30,913
PsiType () { final PsiType selectedType = mySettings.getSelectedType(); if (selectedType != null) return selectedType; final PsiManager manager = PsiManager.getInstance(myProject); final GlobalSearchScope resolveScope = mySettings.getToReplaceIn().getResolveScope(); return PsiType.getJavaLangObject(manager, resolveScop...
getForcedType
30,914
IntList () { return mySettings.parametersToRemove(); }
getParameterListToRemove
30,915
String () { return "IntroduceParameter"; }
getActionName
30,916
JComponent () { JPanel previewPanel = new JPanel(new BorderLayout()); previewPanel.add(getPreviewEditor().getComponent(), BorderLayout.CENTER); previewPanel.setBorder(new EmptyBorder(2, 2, 6, 2)); myDelegateCB = new JBCheckBox(GroovyBundle.message("checkbox.delegate.via.overloading.method")); myDelegateCB.setMnemonic(K...
getComponent
30,917
void (@NotNull GrVariable variable) { }
saveSettings
30,918
void (@Nullable GrVariable variable) { if (variable == null) return; updateTitle(variable, variable.getName()); }
updateTitle
30,919
void (@Nullable GrVariable variable, String value) { if (getPreviewEditor() == null || variable == null) return; final PsiElement declarationScope = ((PsiParameter)variable).getDeclarationScope(); if (declarationScope instanceof PsiMethod psiMethod) { final StringBuilder buf = new StringBuilder(); buf.append(psiMethod....
updateTitle
30,920
TextAttributes () { final TextAttributes textAttributes = new TextAttributes(); textAttributes.setEffectType(EffectType.ROUNDED_BOX); textAttributes.setEffectColor(JBColor.RED); return textAttributes; }
getTextAttributesForAdd
30,921
TextAttributes () { final TextAttributes textAttributes = new TextAttributes(); textAttributes.setEffectType(EffectType.STRIKEOUT); textAttributes.setEffectColor(JBColor.BLACK); return textAttributes; }
getTestAttributesForRemoval
30,922
GrVariable (GrIntroduceContext context, GrIntroduceParameterSettings settings, boolean processUsages) { GrExpressionWrapper wrapper = createExpressionWrapper(context); if (processUsages) { GrIntroduceExpressionSettingsImpl patchedSettings = new GrIntroduceExpressionSettingsImpl(settings, settings.getName(), settings.de...
runRefactoring
30,923
GrExpressionWrapper (@NotNull GrIntroduceContext context) { GrExpression expression = context.getExpression(); GrVariable var = context.getVar(); assert expression != null || var != null ; GrExpression initializer = expression != null ? expression : var.getInitializerGroovy(); return new GrExpressionWrapper(initializer...
createExpressionWrapper
30,924
GrIntroduceParameterSettings (@NotNull GrIntroduceContext context, @NotNull OccurrencesChooser.ReplaceChoice choice, String[] names) { GrExpression expression = context.getExpression(); GrVariable var = context.getVar(); PsiType type = var != null ? var.getDeclaredType() : expression != null ? expression.getType() : nu...
getInitialSettingsForInplace
30,925
GrIntroduceParameterSettings () { return new GrIntroduceExpressionSettingsImpl(myInfo, getInputName(), false, myParametersToRemove, myDelegateCB.isSelected(), IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE, null, null, getSelectedType(), isReplaceAllOccurrences(), false, false); }
getSettings
30,926
GrVariable () { return myVar; }
getVar
30,927
GrExpression () { return myExpr; }
getExpression
30,928
PsiType () { return mySelectedType; }
getSelectedType
30,929
boolean () { return myRemoveLocalVar; }
removeLocalVariable
30,930
UsageViewDescriptor (final UsageInfo @NotNull [] usages) { return new UsageViewDescriptorAdapter() { @Override public PsiElement @NotNull [] getElements() { return new PsiElement[]{toSearchFor != null ? toSearchFor : toReplaceIn}; } @Override public String getProcessedElementsHeader() { return GroovyRefactoringBundle.m...
createUsageViewDescriptor
30,931
String () { return GroovyRefactoringBundle.message("introduce.closure.parameter.elements.header"); }
getProcessedElementsHeader
30,932
boolean (@NotNull Ref<UsageInfo[]> refUsages) { UsageInfo[] usagesIn = refUsages.get(); MultiMap<PsiElement, String> conflicts = new MultiMap<>(); if (!mySettings.generateDelegate()) { detectAccessibilityConflicts(usagesIn, conflicts); } final GrExpression expression = mySettings.getExpression(); if (expression != null...
preprocessUsages
30,933
void (final UsageInfo[] usageArray, MultiMap<PsiElement, String> conflicts) { //todo whole method final GrExpression expression = mySettings.getExpression(); if (expression == null) return; GroovyIntroduceParameterUtil.detectAccessibilityConflicts(expression, usageArray, conflicts, mySettings.replaceFieldsWithGetters()...
detectAccessibilityConflicts
30,934
Collection<PsiReference> (GrClosableBlock initializer, final GrVariable var) { GrControlFlowOwner owner = ControlFlowUtils.findControlFlowOwner(initializer); if (owner == null) return Collections.emptyList(); final GroovyControlFlow flow = ControlFlowUtils.getGroovyControlFlow(owner); final List<BitSet> writes = Contro...
findUsagesForLocal
30,935
void (UsageInfo @NotNull [] usages) { processExternalUsages(usages, mySettings, myParameterInitializer.getExpression()); processClosure(usages, mySettings); final GrVariable var = mySettings.getVar(); if (var != null && mySettings.removeLocalVariable()) { var.delete(); } }
performRefactoring
30,936
void (UsageInfo[] usages, GrIntroduceParameterSettings settings) { changeSignature((GrClosableBlock)settings.getToReplaceIn(), settings); processInternalUsages(usages, settings); }
processClosure
30,937
void (UsageInfo[] usages, GrIntroduceParameterSettings settings) { final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(settings.getProject()); // Replacing expression occurrences for (UsageInfo usage : usages) { if (usage instanceof ChangedMethodCallInfo) { PsiElement element = usage.getElement(...
processInternalUsages
30,938
void (UsageInfo[] usages, GrIntroduceParameterSettings settings, PsiElement expression) { for (UsageInfo usage : usages) { if (usage instanceof ExternalUsageInfo) { processExternalUsage(usage, settings, expression); } } }
processExternalUsages
30,939
void (GrClosableBlock block, GrIntroduceParameterSettings settings) { final String name = settings.getName(); final FieldConflictsResolver fieldConflictsResolver = new FieldConflictsResolver(name, block); final GrParameter[] parameters = block.getParameters(); for (int i = settings.parametersToRemove().size() - 1; i >=...
changeSignature
30,940
void (UsageInfo usage, GrIntroduceParameterSettings settings, PsiElement expression) { final PsiElement element = usage.getElement(); GrCall callExpression = GroovyRefactoringUtil.getCallExpressionByMethodReference(element); if (callExpression == null) { final PsiElement parent = element.getParent(); if (parent instanc...
processExternalUsage
30,941
GrExpression (GrExpression[] oldArgs, boolean isVarArg, PsiParameterList parameterList) { if (!isVarArg) return ArrayUtil.getLastElement(oldArgs); final PsiParameter[] parameters = parameterList.getParameters(); if (parameters.length > oldArgs.length) return ArrayUtil.getLastElement(oldArgs); final int lastNonVararg = ...
getAnchorForArgument
30,942
GrClosableBlock (GrClosableBlock originalClosure, GrVariable anchor, String newName) { GrClosableBlock result; if (originalClosure.hasParametersSection()) { result = myFactory.createClosureFromText("{->}", anchor); final GrParameterList parameterList = (GrParameterList)originalClosure.getParameterList().copy(); result....
generateDelegateClosure
30,943
GrVariableDeclaration (GrVariable original, GrVariableDeclaration declaration) { if (original instanceof GrField) { final PsiClass containingClass = ((GrField)original).getContainingClass(); LOG.assertTrue(containingClass != null); return (GrVariableDeclaration)containingClass.addBefore(declaration, original.getParent(...
insertDeclaration
30,944
void (PsiElement element, GrIntroduceParameterSettings settings) { if (element.getParent() instanceof GrMethodCallExpression methodCall) { final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(settings.getProject()); GrExpression expression = factory.createExpressionFromText(settings.getName(), nu...
processChangedMethodCall
30,945
void (GrMethodCallExpression methodCall, GrIntroduceParameterSettings settings) { final GroovyResolveResult resolveResult = methodCall.advancedResolve(); final PsiElement resolved = resolveResult.getElement(); LOG.assertTrue(resolved instanceof PsiMethod); final GrSignature signature = GrClosureSignatureUtil.createSign...
removeParametersFromCall
30,946
String () { return JavaRefactoringBundle.message("introduce.parameter.command", DescriptiveNameUtil.getDescriptiveName(mySettings.getToReplaceIn())); }
getCommandName
30,947
PsiField[] (GrStatement[] statements, PsiClass containingClass) { if (containingClass == null) return PsiField.EMPTY_ARRAY; final FieldSearcher searcher = new FieldSearcher(containingClass); for (GrStatement statement : statements) { statement.accept(searcher); } return searcher.getResult(); }
findUsedFieldsWithGetters
30,948
PsiParameter (PsiParameterList parameterList, boolean isVarArgs) { final PsiParameter[] parameters = parameterList.getParameters(); final int length = parameters.length; if (isVarArgs) { return length > 1 ? parameters[length - 2] : null; } else { return length > 0 ? parameters[length - 1] : null; } }
getAnchorParameter
30,949
void (final GrClosureSignatureUtil.ArgInfo<PsiElement>[] actualArgs, final IntList parametersToRemove) { parametersToRemove.forEach((IntConsumer)paramNum -> { try { final GrClosureSignatureUtil.ArgInfo<PsiElement> actualArg = actualArgs[paramNum]; for (PsiElement arg : actualArg.args) { arg.delete(); } } catch (Incorre...
removeParametersFromCall
30,950
void (GrCall callExpression, PsiParameter[] parameters, IntList parametersToRemove) { final GrExpression[] arguments = callExpression.getExpressionArguments(); final GrClosableBlock[] closureArguments = callExpression.getClosureArguments(); final GrNamedArgument[] namedArguments = callExpression.getNamedArguments(); fi...
removeParamsFromUnresolvedCall
30,951
void (@Nullable GroovyPsiElement elementToProcess, final UsageInfo[] usages, MultiMap<PsiElement, String> conflicts, boolean replaceFieldsWithGetters, Project project) { if (elementToProcess == null) return; final ReferencedElementsCollector collector = new ReferencedElementsCollector(); elementToProcess.accept(collect...
detectAccessibilityConflicts
30,952
void (PsiElement element, GrIntroduceParameterSettings settings, Project project) { if (!(element.getParent() instanceof GrMethodCallExpression methodCall)) { LOG.error("Unexpected parent type: " + element.getParent()); return; } GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(project); final Stri...
processChangedMethodCall
30,953
void (GrMethodCallExpression methodCall, GrIntroduceParameterSettings settings) { final GroovyResolveResult resolveResult = methodCall.advancedResolve(); final PsiElement resolved = resolveResult.getElement(); LOG.assertTrue(resolved instanceof PsiMethod); final GrSignature signature = GrClosureSignatureUtil.createSign...
removeParametersFromCall
30,954
GrMethod (PsiMethod prototype, IntroduceParameterData.ExpressionWrapper initializer, Project project) { final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(project); GrMethod result; if (prototype instanceof GrMethod) { result = (GrMethod)prototype.copy(); } else { StringBuilder builder = new St...
generateDelegate
30,955
Object2IntMap<GrParameter> (IntroduceParameterInfo helper) { final Object2IntMap<GrParameter> result = new Object2IntOpenHashMap<>(); final TextRange range = ExtractUtil.getRangeOfRefactoring(helper); GrParameter[] parameters = helper.getToReplaceIn().getParameters(); for (int i = 0; i < parameters.length; i++) { GrPar...
findParametersToRemove
30,956
boolean (GrParameter parameter, int start, int end) { for (PsiReference reference : ReferencesSearch.search(parameter)) { final PsiElement element = reference.getElement(); final int offset = element.getTextRange().getStartOffset(); if (offset < start || end <= offset) { return false; } } return true; }
shouldRemove
30,957
PsiElement[] (GrIntroduceParameterSettings settings) { final GrParameterListOwner scope = settings.getToReplaceIn(); final GrExpression expression = settings.getExpression(); if (expression != null) { final PsiElement expr = PsiUtil.skipParentheses(expression, false); if (expr == null) return PsiElement.EMPTY_ARRAY; fi...
getOccurrences
30,958
GrExpression (PsiElement initializer, GrArgumentList list) { if (!(initializer instanceof GrClosableBlock)) return null; final PsiElement parent = list.getParent(); if (!(parent instanceof GrMethodCallExpression)) return null; PsiElement anchor; final GrClosableBlock[] cls = ((GrMethodCallExpression)parent).getClosureA...
addClosureToCall
30,959
GrVariable (IntroduceParameterInfo info) { GrVariable variable = info.getVar(); if (variable != null) return variable; final GrStatement[] statements = info.getStatements(); if (statements.length != 1) return null; return GrIntroduceHandlerBase.findVariable(statements[0]); }
findVar
30,960
GrExpression (IntroduceParameterInfo info) { final GrStatement[] statements = info.getStatements(); if (statements.length != 1) return null; return GrIntroduceHandlerBase.findExpression(statements[0]); }
findExpr
30,961
LinkedHashSet<String> (GrVariable var, GrExpression expr, StringPartInfo stringPart, GrParameterListOwner scope, Project project) { if (expr != null) { final GrIntroduceContext introduceContext = new GrIntroduceContextImpl(project, null, expr, var, stringPart, PsiElement.EMPTY_ARRAY, scope); final GroovyFieldValidator ...
suggestNames
30,962
PsiField[] () { return result.toArray(PsiField.EMPTY_ARRAY); }
getResult
30,963
void (@NotNull GrReferenceExpression ref) { super.visitReferenceExpression(ref); final GrExpression qualifier = ref.getQualifier(); if (!PsiUtil.isThisReference(qualifier)) return; final PsiElement resolved = ref.resolve(); if (!(resolved instanceof PsiField)) return; final PsiMethod getter = GroovyPropertyUtils.findGe...
visitReferenceExpression
30,964
void (@NotNull GrReferenceExpression referenceExpression) { add(referenceExpression); }
visitReferenceExpression
30,965
void (GrReferenceElement referenceExpression) { final PsiElement resolved = referenceExpression.resolve(); if (resolved != null) { myResult.add(resolved); } }
add
30,966
void (@NotNull GrCodeReferenceElement refElement) { add(refElement); }
visitCodeReferenceElement
30,967
List<PsiElement> () { return myResult; }
getResult
30,968
boolean (UsageInfo usage) { final PsiElement el = usage.getElement(); return el != null && GroovyLanguage.INSTANCE.equals(el.getLanguage()); }
isGroovyUsage
30,969
boolean (UsageInfo usage) { return GroovyRefactoringUtil.isMethodUsage(usage.getElement()) && isGroovyUsage(usage); }
isMethodUsage
30,970
void (IntroduceParameterData data, UsageInfo[] usages, MultiMap<PsiElement, String> conflicts) { }
findConflicts
30,971
GrExpression (GrExpression[] oldArgs) { GrExpression anchor; if (oldArgs.length > 0) { anchor = oldArgs[oldArgs.length - 1]; } else { anchor = null; } return anchor; }
getLast
30,972
void (final GrClosureSignatureUtil.ArgInfo<PsiElement>[] actualArgs, IntList parametersToRemove) { parametersToRemove.forEach((IntConsumer)paramNum -> { try { final GrClosureSignatureUtil.ArgInfo<PsiElement> actualArg = actualArgs[paramNum]; if (actualArg == null) { return; } for (PsiElement arg : actualArg.args) { arg...
removeParametersFromCall
30,973
void (GrCall callExpression, IntroduceParameterData data) { final GrExpression[] arguments = callExpression.getExpressionArguments(); final GrClosableBlock[] closureArguments = callExpression.getClosureArguments(); final GrNamedArgument[] namedArguments = callExpression.getNamedArguments(); final boolean hasNamedArgs; ...
removeParamsFromUnresolvedCall
30,974
GrParameter (@NotNull GrParameterListOwner parametersOwner, @Nullable MethodJavaDocHelper javaDocHelper, @NotNull PsiType forcedType, @NotNull String parameterName, boolean isFinal, @NotNull Project project) { GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(project); final String typeText = forced...
addParameter
30,975
PsiParameter (GrParameterListOwner parametersOwner) { PsiParameterList parameterList = parametersOwner.getParameterList(); final PsiParameter anchorParameter; final PsiParameter[] parameters = parameterList.getParameters(); final int length = parameters.length; if (!parametersOwner.isVarArgs()) { anchorParameter = leng...
getAnchorParameter
30,976
boolean (IntroduceParameterData data, UsageInfo usage, UsageInfo[] usages) { if (!(usage.getElement() instanceof PsiClass aClass) || !isGroovyUsage(usage)) return true; final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(data.getProject()); GrMethod constructor = factory.createConstructorFromTex...
processAddDefaultConstructor
30,977
GrExpression (GrMethodCall methodExpression) { final GroovyResolveResult result = methodExpression.advancedResolve(); if (!(result.getElement() instanceof GrAccessorMethod) || result.isInvokedOnProperty()) return null; final GrExpression invoked = methodExpression.getInvokedExpression(); if (invoked instanceof GrRefere...
getQualifierFromGetterCall
30,978
PsiElement (PsiElement newExpr, GrExpression actualArg, PsiParameter parameter) { if (myParamsToNotInline.contains(parameter)) return newExpr; GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(myProject); if (myExpr instanceof GrClosableBlock) { int count = 0; for (PsiReference reference : Reference...
inlineParam
30,979
boolean (PsiElement oldExpr) { if (oldExpr instanceof GrReferenceExpression ref) { if (ref.getQualifier() == null) { PsiElement nameElement = ref.getReferenceNameElement(); if (nameElement != null) { return nameElement.getNode().getElementType() == GroovyTokenTypes.kSUPER; } } } return false; }
isSimpleSuperReference
30,980
boolean (PsiElement oldExpr) { if (!(oldExpr instanceof GrReferenceExpression && PsiUtil.isThisReference(oldExpr))) return false; final GrReferenceExpression qualifier = (GrReferenceExpression)((GrReferenceExpression)oldExpr).getQualifier(); if (qualifier == null) return true; final PsiClass contextClass = PsiUtil.getC...
isThisReferenceToContainingClass
30,981
GrExpression (int index) { if (myActualArgs == null || myActualArgs[index] == null) { final GrExpression[] arguments = myContext.getArgumentList().getExpressionArguments(); if (index < arguments.length) return arguments[index]; index -= arguments.length; final GrClosableBlock[] closureArguments = myContext.getClosureAr...
getActualArg
30,982
PsiElement (final GroovyResolveResult result) { final PsiElement elem = result.getElement(); if (elem != null) { if (elem instanceof PsiMember) { return ((PsiMember)elem).getContainingClass(); } else { return PsiUtil.getContextClass(elem); } } return null; }
getClassContainingResolve
30,983
boolean (GrReferenceExpression refExpr) { try { GrExpression qualifier = refExpr.getQualifier(); if (!(qualifier instanceof GrReferenceExpression)) return false; PsiElement qualifierRefElement = ((GrReferenceExpression)qualifier).resolve(); if (!(qualifierRefElement instanceof PsiClass)) return false; PsiElement refEle...
canRemoveQualifier
30,984
void (@NotNull GrExpression selectedExpr) { // Cannot perform refactoring in parameter default values PsiElement parent = selectedExpr.getParent(); while (!(parent == null || parent instanceof GroovyFileBase || parent instanceof GrParameter)) { parent = parent.getParent(); } if (checkInFieldInitializer(selectedExpr)) {...
checkExpression
30,985
void (PsiElement @NotNull [] occurrences) { //nothing to do }
checkOccurrences
30,986
boolean (@NotNull GrExpression expr) { PsiElement parent = expr.getParent(); if (parent instanceof GrClosableBlock) { return false; } if (parent instanceof GrField && expr == ((GrField)parent).getInitializerGroovy()) { return true; } if (parent instanceof GrExpression) { return checkInFieldInitializer(((GrExpression)pa...
checkInFieldInitializer
30,987
GrVariable (@NotNull final GrIntroduceContext context, @NotNull final GroovyIntroduceVariableSettings settings) { // Generating variable declaration GrVariable insertedVar = processExpression(context, settings); moveOffsetToPositionMarker(context.getEditor()); return insertedVar; }
runRefactoring
30,988
void (Editor editor) { if (editor != null && getPositionMarker() != null) { editor.getSelectionModel().removeSelection(); editor.getCaretModel().moveToOffset(getPositionMarker().getEndOffset()); } }
moveOffsetToPositionMarker
30,989
GrInplaceVariableIntroducer (@NotNull GrIntroduceContext context, @NotNull OccurrencesChooser.ReplaceChoice choice) { final Ref<GrIntroduceContext> contextRef = Ref.create(context); if (context.getStringPart() != null) { extractStringPart(contextRef); } context = contextRef.get(); final GrStatement anchor = findAnchor(...
getIntroducer
30,990
GrVariable (GrIntroduceContext context, GroovyIntroduceVariableSettings settings, boolean processUsages) { return refactorInWriteAction(() -> processUsages ? processExpression(context, settings) : addVariable(context, settings)); }
runRefactoring
30,991
void () { super.performPostIntroduceTasks(); moveOffsetToPositionMarker(contextRef.get().getEditor()); }
performPostIntroduceTasks
30,992
GrVariable (@NotNull GrIntroduceContext context, @NotNull GroovyIntroduceVariableSettings settings) { GrStatement anchor = findAnchor(context, settings.replaceAllOccurrences()); PsiElement parent = anchor.getParent(); assert parent instanceof GrStatementOwner; GrVariableDeclaration generated = generateDeclaration(conte...
addVariable
30,993
void (GrControlFlowOwner[] scopes, Consumer<? super GrControlFlowOwner> callback, Editor editor) { //todo do nothing right now }
showScopeChooser
30,994
GrVariableDeclaration (@NotNull GrIntroduceContext context, @NotNull GroovyIntroduceVariableSettings settings) { final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(context.getProject()); final String[] modifiers = settings.isDeclareFinal() ? new String[]{PsiModifier.FINAL} : null; final GrVaria...
generateDeclaration
30,995
GrVariable (@NotNull GrIntroduceContext context, @NotNull GroovyIntroduceVariableSettings settings) { GrVariableDeclaration varDecl = generateDeclaration(context, settings); if (context.getStringPart() != null) { final GrExpression ref = context.getStringPart().replaceLiteralWithConcatenation(DUMMY_NAME); return doProc...
processExpression
30,996
GrVariable (@NotNull final GrIntroduceContext context, @NotNull GroovyIntroduceVariableSettings settings, @NotNull GrVariableDeclaration varDecl, PsiElement @NotNull [] elements, @NotNull GrExpression expression, boolean processUsages) { return new GrIntroduceLocalVariableProcessor(context, settings, elements, expressi...
doProcessExpression
30,997
void (PsiElement e) { GrIntroduceVariableHandler.this.refreshPositionMarker(context.getEditor().getDocument().createRangeMarker(e.getTextRange())); }
refreshPositionMarker
30,998
GrExpression (@NotNull GrIntroduceContext context, @NotNull GrVariable variable) { final GrExpression initializer = context.getStringPart() != null ? context.getStringPart().createLiteralFromSelected() : context.getExpression(); final GrExpression dummyInitializer = variable.getInitializerGroovy(); assert dummyInitiali...
generateInitializer
30,999
RangeMarker () { return myPosition; }
getPositionMarker