Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
75,900
PsiElement () { PsiMethodCallExpression methodCallExpression = (PsiMethodCallExpression)getElement(); return methodCallExpression != null ? methodCallExpression.resolveMethod() : null; }
resolveRef
75,901
ApplicableType (@NotNull PsiMethod method, @NotNull PsiElement place) { ProgressManager.checkCanceled(); PsiExpressionList argumentList = ((PsiMethodCallExpression)place).getArgumentList(); MethodCandidateInfo candidateInfo = new MethodCandidateInfo(method, PsiSubstitutor.EMPTY, false, false, argumentList, null, argume...
isApplicable
75,902
boolean (@NotNull Project project, Editor editor, PsiFile file) { PsiInstanceOfExpression instanceOfExpression = getInstanceOfExpressionAtCaret(file, editor.getCaretModel().getOffset()); if (instanceOfExpression == null) return false; PsiTypeElement checkType = instanceOfExpression.getCheckType(); if (checkType == null...
isAvailable
75,903
boolean (final PsiType type, final PsiInstanceOfExpression instanceOfExpression, final PsiStatement statement) { boolean negated = isNegated(instanceOfExpression); PsiElement anchor = null; if (negated) { PsiElement parent = statement.getParent(); if (parent instanceof PsiCodeBlock) { PsiStatement[] statements = ((PsiC...
isAlreadyCastedTo
75,904
PsiInstanceOfExpression (PsiFile file, int caretOffset) { PsiElement element = file.findElementAt(caretOffset); if (element == null) return null; PsiInstanceOfExpression expression = PsiTreeUtil.getParentOfType(element, PsiInstanceOfExpression.class); if (expression != null) { return expression; } if (caretOffset > 0) ...
getInstanceOfExpressionAtCaret
75,905
PsiInstanceOfExpression (PsiElement element, PsiStatement statement, PsiExpression condition) { if (condition instanceof PsiInstanceOfExpression instanceOf) { if (insideEmptyBlockOrRef(statement, element, instanceOf)) { return instanceOf; } } else if (condition instanceof PsiPolyadicExpression polyadic) { final PsiExpr...
retrieveInstanceOfFromCondition
75,906
boolean (PsiStatement stmt, PsiElement elementAtCaret, PsiInstanceOfExpression instanceOfExpression) { PsiBlockStatement block = PsiTreeUtil.getParentOfType(elementAtCaret, PsiBlockStatement.class); if (block != null && block.getParent() == stmt) { final PsiStatement[] statements = block.getCodeBlock().getStatements();...
insideEmptyBlockOrRef
75,907
boolean (PsiInstanceOfExpression instanceOfExpression, PsiExpressionStatement statement) { if (isNegated(instanceOfExpression)) return false; final PsiExpression expression = statement.getExpression(); final PsiExpression operand = instanceOfExpression.getOperand(); if (operand instanceof PsiReferenceExpression && expr...
replaceReference
75,908
void (@NotNull final Project project, final Editor editor, final PsiFile file) { PsiInstanceOfExpression instanceOfExpression = getInstanceOfExpressionAtCaret(file, editor.getCaretModel().getOffset()); assert instanceOfExpression.getContainingFile() == file : instanceOfExpression.getContainingFile() + "; file="+file; t...
invoke
75,909
void (@NotNull TemplateState state, Template template) { final TextResult value = state.getVariableValue(""); assert value != null; final PsiResolveHelper resolveHelper = JavaPsiFacade.getInstance(project).getResolveHelper(); final PsiVariable target = resolveHelper.resolveAccessibleReferencedVariable(value.getText(), ...
beforeTemplateFinished
75,910
void (@NotNull PsiReferenceExpression expression) { final PsiExpression qualifierExpression = expression.getQualifierExpression(); if (qualifierExpression != null) { qualifierExpression.accept(this); } else if (expression.resolve() == variable) { RefactoringChangeUtil.qualifyReference(expression, field, field.hasModifi...
visitReferenceExpression
75,911
void (@NotNull Template template, boolean brokenOff) { Runnable action = () -> { PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument()); CaretModel caretModel = editor.getCaretModel(); PsiElement elementAt = file.findElementAt(caretModel.getOffset()); PsiDeclarationStatement declarationStatement =...
templateFinished
75,912
PsiStatement (Editor editor, @NotNull PsiExpression operand) { return getExpressionStatementInside(editor.getCaretModel().getOffset(), operand); }
getExpressionStatementInside
75,913
PsiStatement (int offset, @NotNull PsiExpression operand) { PsiElement elementAt = operand.getContainingFile().findElementAt(offset); PsiBlockStatement blockStatement = PsiTreeUtil.getParentOfType(elementAt, PsiBlockStatement.class); if (blockStatement == null) { final PsiIfStatement ifStm = PsiTreeUtil.getParentOfType...
getExpressionStatementInside
75,914
boolean (PsiElement nextSibling) { if (!(nextSibling instanceof PsiDeclarationStatement declarationStatement)) { return false; } final PsiElement[] elements = declarationStatement.getDeclaredElements(); if (elements.length == 0) { return false; } final PsiElement lastElement = elements[elements.length - 1]; return !(la...
isValidDeclarationStatement
75,915
boolean (final PsiInstanceOfExpression instanceOfExpression) { PsiElement element = instanceOfExpression.getParent(); while (element instanceof PsiParenthesizedExpression) { element = element.getParent(); } return element instanceof PsiPrefixExpression && ((PsiPrefixExpression)element).getOperationTokenType() == JavaTo...
isNegated
75,916
Template (Project project, List<String> names) { final TemplateManager templateManager = TemplateManager.getInstance(project); final Template template = templateManager.createTemplate("", ""); template.setToReformat(true); final Result result = new TextResult(names.get(0)); Expression expr = new ConstantNode(result).wi...
generateTemplate
75,917
String () { return QuickFixBundle.message("create.local.from.instanceof.usage.family"); }
getFamilyName
75,918
void (@NotNull Project project, @NotNull PsiFile file, @Nullable Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { super.invoke(project, file, editor, startElement, endElement); if (!myFromDefaultValue && startElement instanceof PsiAnnotationMethod) { WriteCommandAction.writeCommandActi...
invoke
75,919
void (@NotNull PsiMethod method, @NotNull PsiType type) { super.updateMethodType(method, type); if (!myFromDefaultValue && method instanceof PsiAnnotationMethod) { PsiAnnotationMemberValue value = ((PsiAnnotationMethod)method).getDefaultValue(); if (value != null) { new CommentTracker().deleteAndRestoreComments(value);...
updateMethodType
75,920
String () { return QuickFixBundle.message("move.class.to.separate.file.family"); }
getFamilyName
75,921
void (@NotNull ActionContext context, @NotNull PsiClass myClass, @NotNull ModPsiUpdater updater) { PsiDirectory dir = updater.getWritable(context.file().getContainingDirectory()); String name = myClass.getName(); if (name == null) return; JavaDirectoryService directoryService = JavaDirectoryService.getInstance(); PsiCl...
invoke
75,922
IntentionPreviewInfo (ActionContext context, PsiClass myClass) { return IntentionPreviewInfo.movePsi(myClass, myClass.getContainingFile().getContainingDirectory()); }
generatePreview
75,923
String () { return QuickFixBundle.message("access.static.via.class.reference.family"); }
getFamilyName
75,924
ModCommand (@NotNull ActionContext context, @NotNull PsiReferenceExpression ref) { final PsiExpression qualifierExpression = ref.getQualifierExpression(); List<PsiExpression> sideEffects = myKeepSideEffects == ThreeState.NO || qualifierExpression == null ? List.of() : SideEffectChecker.extractSideEffectExpressions(qual...
perform
75,925
void (@NotNull PsiReferenceExpression ref, @NotNull List<PsiExpression> sideEffects) { PsiElement element = ref.resolve(); if (!(element instanceof PsiMember member)) return; PsiClass containingClass = member.getContainingClass(); if (containingClass == null || containingClass instanceof PsiAnonymousClass) return; Proj...
invoke
75,926
CreateClassKind () { return CreateClassKind.RECORD; }
getKind
75,927
List<PsiClass> (PsiElement element, Project project) { return ContainerUtil.filter(super.filterTargetClasses(element, project), cls -> cls.getContainingClass() == null || cls.hasModifierProperty(PsiModifier.STATIC)); }
filterTargetClasses
75,928
String () { return QuickFixBundle.message("change.extends.list.family"); }
getFamilyName
75,929
void (@NotNull ActionContext context, @NotNull PsiClass myClass, @NotNull ModPsiUpdater updater) { PsiClass classToExtendFrom = myClassToExtendFromPointer != null ? myClassToExtendFromPointer.getElement() : null; PsiReferenceList extendsList = !(myClass instanceof PsiTypeParameter) && classToExtendFrom != null && myCla...
invoke
75,930
boolean (PsiElement element) { PsiReferenceExpression expression = (PsiReferenceExpression) element; return CreateFromUsageUtils.isValidReference(expression, false); }
isValidElement
75,931
boolean (PsiClass psiClass) { return false; }
canBeTargetClass
75,932
PsiElement () { if (!myReferenceExpression.isValid() || !canModify(myReferenceExpression)) return null; PsiElement parent = myReferenceExpression.getParent(); if (parent instanceof PsiMethodCallExpression) return null; if (myReferenceExpression.getReferenceNameElement() != null) { if (!CreateFromUsageUtils.isValidRefer...
getElement
75,933
boolean (int offset) { setText(getText(myReferenceExpression.getReferenceName())); return true; }
isAvailableImpl
75,934
CreateClassKind () { return CreateClassKind.RECORD; }
getKind
75,935
void (@Nullable PsiRecordHeader header, @NotNull TemplateBuilder builder, @NotNull PsiExpressionList list, @NotNull PsiSubstitutor substitutor) { if (header == null) return; setupRecordComponents(header, builder, substitutor, list.getExpressions()); }
setupRecordComponents
75,936
void (@Nullable PsiRecordHeader header, @NotNull TemplateBuilder builder, @NotNull PsiDeconstructionList list) { if (header == null) return; setupRecordComponents(header, builder, PsiSubstitutor.EMPTY, list.getDeconstructionComponents()); }
setupRecordComponentsFromPattern
75,937
void (@NotNull PsiRecordHeader header, @NotNull TemplateBuilder builder, @NotNull PsiSubstitutor substitutor, @NotNull PsiCaseLabelElement @NotNull [] elements) { final PsiManager psiManager = header.getManager(); final Project project = psiManager.getProject(); PsiElementFactory factory = JavaPsiFacade.getElementFacto...
setupRecordComponents
75,938
String () { return myType.getCanonicalText() + " " + myNames[0]; }
toString
75,939
SuggestedNameInfo (@NotNull Project project, @NotNull PsiCaseLabelElement element, @Nullable PsiType type) { if (element instanceof PsiExpression expression) { return JavaCodeStyleManager.getInstance(project).suggestVariableName(VariableKind.PARAMETER, null, expression, type); } PsiPatternVariable variable = JavaPsiPat...
suggestVariableName
75,940
String () { return QuickFixBundle.message("insert.sam.method.call.fix.family.name"); }
getFamilyName
75,941
void (@NotNull ActionContext context, @NotNull PsiMethodCallExpression call, @NotNull ModPsiUpdater updater) { PsiExpression methodExpression = call.getMethodExpression(); PsiElementFactory factory = JavaPsiFacade.getElementFactory(context.project()); String replacement = methodExpression.getText() + "." + myMethodName...
invoke
75,942
SmartPsiFileRange (@NotNull PsiReference reference) { PsiElement element = reference.getElement(); int offset = element.getTextRange().getStartOffset() + reference.getRangeInElement().getStartOffset(); PsiFile file = element.getContainingFile(); if (areReferencesEquivalent(reference, file.findReferenceAt(offset))) { re...
createReferencePointer
75,943
boolean (@NotNull PsiReference ref1, @Nullable PsiReference ref2) { if (ref2 == null) return false; if (ref1.getClass() != ref2.getClass()) return false; if (ref1.getElement() != ref2.getElement()) return false; return ref1.getRangeInElement().equals(ref2.getRangeInElement()); }
areReferencesEquivalent
75,944
boolean () { return false; }
startInWriteAction
75,945
String () { return getText(); }
getName
75,946
void (@NotNull final Project project, @NotNull final ProblemDescriptor descriptor) { invoke(project, null, descriptor.getPsiElement().getContainingFile()); }
applyFix
75,947
Priority () { return withTestScope.isEmpty() ? Priority.NORMAL : Priority.LOW; }
getPriority
75,948
String (@NotNull PsiJavaCodeReferenceElement reference, String shortReferenceName, PsiFile containingFile) { String qualifiedName = null; if (reference.isQualified()) { qualifiedName = reference.getQualifiedName(); } else if (containingFile instanceof PsiJavaFile) { PsiImportList list = ((PsiJavaFile)containingFile).ge...
getQualifiedName
75,949
void (@NotNull PsiJavaModuleReference reference, @NotNull Module currentModule, @NotNull DependencyScope scope, @NotNull List<? super @NotNull LocalQuickFix> result) { ProjectFileIndex index = ProjectRootManager.getInstance(currentModule.getProject()).getFileIndex(); List<PsiElement> targets = Stream.of(reference.multi...
createModuleFixes
75,950
void (@NotNull PsiReference reference, @NotNull PsiElement psiElement, @NotNull String shortReferenceName, @NotNull Module currentModule, @NotNull DependencyScope scope, @NotNull List<? super @NotNull IntentionAction> registrar, @NotNull List<? super @NotNull LocalQuickFix> result) { JavaPsiFacade facade = JavaPsiFacad...
registerExternalFixes
75,951
List<PsiClass> (@NotNull PsiElement element, PsiClass @NotNull [] classes) { DependencyValidationManager dependencyValidationManager = DependencyValidationManager.getInstance(element.getProject()); PsiFile fromFile = element.getContainingFile(); List<PsiClass> result = new ArrayList<>(); for (PsiClass psiClass : classe...
filterAllowedDependencies
75,952
ThreeState (final @NotNull PsiElement psiElement) { if (psiElement.getLanguage() == JavaLanguage.INSTANCE && !PsiUtil.isLanguageLevel5OrHigher(psiElement)) { return ThreeState.NO; } UElement uElement = UastContextKt.toUElement(psiElement); while (uElement != null) { if (uElement instanceof UAnnotation) { return ThreeSt...
isReferenceToAnnotation
75,953
void (@NotNull String jarPath, final @NotNull Module module, @Nullable PsiElement location) { addJarsToRoots(Collections.singletonList(jarPath), null, module, location); }
addJarToRoots
75,954
void (@NotNull List<String> jarPaths, @Nullable String libraryName, @NotNull Module module, @Nullable PsiElement location) { List<String> urls = refreshAndConvertToUrls(jarPaths); DependencyScope scope = suggestScopeByLocation(module, location); ModuleRootModificationUtil.addModuleLibrary(module, libraryName, urls, Col...
addJarsToRoots
75,955
List<String> (@NotNull List<String> jarPaths) { return ContainerUtil.map(jarPaths, OrderEntryFix::refreshAndConvertToUrl); }
refreshAndConvertToUrls
75,956
DependencyScope (@NotNull Module module, @Nullable PsiElement location) { if (location != null) { final VirtualFile vFile = location.getContainingFile().getVirtualFile(); if (vFile != null && ModuleRootManager.getInstance(module).getFileIndex().isInTestSourceContent(vFile)) { return DependencyScope.TEST; } } return Dep...
suggestScopeByLocation
75,957
String (String jarPath) { final File libraryRoot = new File(jarPath); LocalFileSystem.getInstance().refreshAndFindFileByIoFile(libraryRoot); return VfsUtil.getUrlForLibraryRoot(libraryRoot); }
refreshAndConvertToUrl
75,958
String () { PsiElement startElement = getStartElement(); String text = startElement == null ? "" : HighlightMessageUtil.getSymbolName(startElement, PsiSubstitutor.EMPTY, PsiFormatUtilBase.SHOW_TYPE | PsiFormatUtilBase.USE_INTERNAL_CANONICAL_TEXT); return QuickFixBundle.message("safe.delete.text", ObjectUtils.notNull(te...
getText
75,959
String () { return QuickFixBundle.message("safe.delete.family"); }
getFamilyName
75,960
void (@NotNull Project project, @NotNull PsiFile file, @Nullable Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { if (!FileModificationService.getInstance().prepareFileForWrite(file)) return; final PsiElement[] elements = {startElement}; if (startElement instanceof PsiParameter) { Safe...
invoke
75,961
IntentionPreviewInfo (@NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { PsiElement element = PsiTreeUtil.findSameElementInCopy(getStartElement(), file); if (element instanceof PsiClass && element.getParent() instanceof PsiJavaFile javaFile && javaFile.getClasses().length == 1) { var doc = file....
generatePreview
75,962
boolean () { return false; }
startInWriteAction
75,963
ModCommand (@NotNull ActionContext context) { int offset = context.offset(); PsiElement element = findElement(context.file(), offset); if (element == null) return ModCommand.nop(); PsiTryStatement tryStatement = (PsiTryStatement)element.getParent(); List<PsiClassType> unhandledExceptions = new ArrayList<>(getExceptions...
perform
75,964
void (@NotNull PsiTryStatement tryStatement, @NotNull List<PsiClassType> unhandledExceptions, @NotNull ModPsiUpdater updater) { PsiFile file = tryStatement.getContainingFile(); PsiCodeBlock catchBlockToSelect = null; try { if (tryStatement.getFinallyBlock() == null && tryStatement.getCatchBlocks().length == 0) { for (P...
invoke
75,965
Collection<PsiClassType> (PsiElement element, PsiElement topElement) { Collection<PsiClassType> exceptions = ExceptionUtil.collectUnhandledExceptions(element, topElement); if(!myUncaughtOnly && exceptions.isEmpty()) { exceptions = ExceptionUtil.getThrownExceptions(element); if (exceptions.isEmpty()) { PsiElementFactory...
getExceptions
75,966
void (PsiTryStatement tryStatement, PsiElementFactory factory) { PsiCodeBlock tryBlock = factory.createCodeBlock(); PsiElement anchor; PsiCatchSection[] catchSections = tryStatement.getCatchSections(); if (catchSections.length > 0) { anchor = catchSections[0]; } else { PsiCodeBlock finallyBlock = tryStatement.getFinall...
addTryBlock
75,967
PsiElement (@NotNull PsiCodeBlock finallyBlock) { PsiElement finallyElement = finallyBlock; while (!PsiUtil.isJavaToken(finallyElement, JavaTokenType.FINALLY_KEYWORD) && finallyElement != null) { finallyElement = finallyElement.getPrevSibling(); } assert finallyElement != null : finallyBlock.getParent().getText(); retu...
getFinallySectionStart
75,968
PsiElement (final PsiFile file, final int offset) { PsiElement element = file.findElementAt(offset); if (element instanceof PsiWhiteSpace) element = file.findElementAt(offset - 1); if (element == null) return null; PsiElement parentStatement = CommonJavaRefactoringUtil.getParentStatement(element, false); if (parentStat...
findElement
75,969
String () { return QuickFixBundle.message("add.catch.clause.family"); }
getFamilyName
75,970
void (@NotNull Project project, @NotNull PsiFile file, @Nullable Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) { RefactoringActionHandlerOnPsiElement<PsiClass> handler = JavaRefactoringActionHandlerFactory.getInstance().createAnonymousToInnerHandler(); handler.invoke(project, editor, ...
invoke
75,971
String () { PsiClass psiClass = (PsiClass)getStartElement(); return psiClass instanceof PsiAnonymousClass ? JavaRefactoringBundle.message("convert.anonymous.to.inner.fix.name") : JavaRefactoringBundle.message("convert.local.to.inner.fix.name"); }
getText
75,972
String () { return JavaRefactoringBundle.message("convert.anonymous.or.local.to.inner.fix.name"); }
getFamilyName
75,973
boolean () { return false; }
startInWriteAction
75,974
Result (ExpressionContext context) { return myItems == null || myItems.length == 0 ? new TextResult(myOldReferenceName) : new TextResult(myItems[0].getLookupString()); }
calculateResult
75,975
Result (ExpressionContext context) { return null; }
calculateQuickResult
75,976
LookupElement[] (ExpressionContext context) { return myItems == null || myItems.length == 1 ? null : myItems; }
calculateLookupItems
75,977
int (LookupElement lookupItem1, LookupElement lookupItem2) { String s1 = lookupItem1.getLookupString(); String s2 = lookupItem2.getLookupString(); int length = myOldReferenceName.length(); int length1 = s1.length(); int length2 = s2.length(); if (length < length1) s1 = s1.substring(0, length + 1); if (length < length2)...
compare
75,978
String () { return QuickFixBundle.message("add.constructor.parameters"); }
getFamilyName
75,979
ModCommand (@NotNull ActionContext context, @NotNull PsiField field) { PsiClass psiClass = Objects.requireNonNull(field.getContainingClass()); PsiMethod[] constructors = getNonSyntheticConstructors(psiClass); final List<PsiMethod> filtered = getFilteredConstructors(constructors, field); if (filtered.size() <= 1) { retu...
perform
75,980
ModCommand (@NotNull ActionContext context, @NotNull PsiField field, @NotNull List<PsiMethod> constructors) { if (!field.isValid() || ContainerUtil.exists(constructors, c -> !c.isValid())) return ModCommand.nop(); PsiClass psiClass = field.getContainingClass(); if (psiClass == null) return ModCommand.nop(); List<PsiFie...
performForConstructors
75,981
PsiMethod[] (@NotNull PsiClass psiClass) { return ContainerUtil.filter(psiClass.getConstructors(), c -> !(c instanceof SyntheticElement)).toArray(PsiMethod[]::new); }
getNonSyntheticConstructors
75,982
List<PsiMethod> (PsiMethod[] constructors, PsiField field) { Arrays.sort(constructors, new Comparator<>() { @Override public int compare(PsiMethod c1, PsiMethod c2) { final PsiMethod cc1 = CommonJavaRefactoringUtil.getChainedConstructor(c1); final PsiMethod cc2 = CommonJavaRefactoringUtil.getChainedConstructor(c2); if ...
getFilteredConstructors
75,983
int (PsiMethod c1, PsiMethod c2) { final PsiMethod cc1 = CommonJavaRefactoringUtil.getChainedConstructor(c1); final PsiMethod cc2 = CommonJavaRefactoringUtil.getChainedConstructor(c2); if (cc1 == c2) return 1; if (cc2 == c1) return -1; if (cc1 == null) { return cc2 == null ? 0 : compare(c1, cc2); } else { return cc2 ==...
compare
75,984
List<PsiField> (@NotNull PsiClass psiClass, @NotNull PsiField startField, @NotNull List<PsiMethod> constructors) { List<PsiField> fields = new ArrayList<>(); for (PsiField field : psiClass.getFields()) { if (field == startField || (!field.hasModifierProperty(PsiModifier.STATIC) && field.hasModifierProperty(PsiModifier....
getFieldsToFix
75,985
List<PsiMethod> (PsiMethod[] constructors, PsiField field) { final List<PsiMethod> result = new ArrayList<>(Arrays.asList(constructors)); result.removeIf(ctr -> isFieldAssignedInConstructor(field, ctr)); return result; }
filterConstructorsIfFieldAlreadyAssigned
75,986
PsiMethod (@NotNull PsiMethod constructor) { Set<PsiMethod> visited = null; while (true) { PsiMethodCallExpression constructorCall = JavaPsiConstructorUtil.findThisOrSuperCallInConstructor(constructor); if (constructorCall == null || JavaPsiConstructorUtil.isSuperConstructorCall(constructorCall)) return constructor; Ps...
getTargetConstructor
75,987
boolean (@NotNull PsiField field, @NotNull PsiMethod ctr) { return VariableAccessUtils.variableIsAssigned(field, getTargetConstructor(ctr)); }
isFieldAssignedInConstructor
75,988
ModCommand (ActionContext context, List<PsiField> fields, List<PsiMethod> constructors) { return ModCommand.psiUpdate(context, updater -> { List<PsiField> writableFields = ContainerUtil.map(fields, updater::getWritable); PsiClass psiClass = writableFields.get(0).getContainingClass(); if (psiClass == null) return; List<...
performForConstructorsAndFields
75,989
void (@NotNull ActionContext context, @NotNull PsiMethod constructor, @NotNull List<PsiField> fields, @NotNull ModPsiUpdater updater, @Nullable ChainedConstructorData chainedConstructorData) { final PsiParameterList parameterList = constructor.getParameterList(); final List<PsiVariable> params = fillVariables(fields, p...
addParameterToConstructor
75,990
List<PsiVariable> (@NotNull List<PsiField> fields, @NotNull PsiParameterList parameterList) { final List<PsiVariable> params = new ArrayList<>(Arrays.asList(parameterList.getParameters())); PsiMethod constructor = (PsiMethod)parameterList.getParent(); for (PsiField field : fields) { if (!isFieldAssignedInConstructor(fi...
fillVariables
75,991
String (PsiParameter[] parameters, PsiVariable variable, Map<PsiField, String> usedNames) { String name = variable.getName(); assert name != null : variable; JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(variable.getProject()); name = styleManager.variableNameToPropertyName(name, VariableKind.FIE...
getUniqueParameterName
75,992
boolean (PsiParameter[] params, String newName, Map<PsiField, String> usedNames) { if (usedNames.containsValue(newName)) return false; for (PsiParameter parameter : params) { if (Comparing.strEqual(parameter.getName(), newName)) { return false; } } return true; }
isUnique
75,993
PsiParameter (@NotNull String newName, @NotNull PsiParameter @NotNull [] newParameters) { for (PsiParameter newParameter : newParameters) { if (Comparing.strEqual(newName, newParameter.getName())) { return newParameter; } } return null; }
findParamByName
75,994
void (@NotNull PsiMethod constructor, @NotNull Map<PsiField, String> usedFields) { int index = 0; PsiExpressionList argumentList = methodCall.getArgumentList(); PsiExpression[] args = argumentList.getExpressions(); PsiElementFactory factory = JavaPsiFacade.getElementFactory(constructor.getProject()); for (PsiVariable v...
updateChainedCall
75,995
int (PsiVariable o1, PsiVariable o2) { if (o1 instanceof PsiParameter && ((PsiParameter)o1).isVarArgs()) return 1; if (o2 instanceof PsiParameter && ((PsiParameter)o2).isVarArgs()) return -1; if (o1 instanceof PsiField && o2 instanceof PsiField) { return o1.getTextOffset() - o2.getTextOffset(); } if (o1 instanceof PsiP...
compare
75,996
String () { return QuickFixBundle.message("delete.body.text"); }
getFamilyName
75,997
void (@NotNull ActionContext context, @NotNull PsiMethod method, @NotNull ModPsiUpdater updater) { final PsiCodeBlock body = method.getBody(); assert body != null; body.delete(); }
invoke
75,998
String () { AnAction action = ActionManager.getInstance().getAction(IdeActions.MODULE_SETTINGS); return action.getTemplatePresentation().getText(); }
getName
75,999
String () { return getName(); }
getText