Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
30,700 | List<GrParameterInfo> (@NotNull GrMethod sourceMethod) { return new GrMethodDescriptor(sourceMethod).getParameters(); } | getAllMethodParameters |
30,701 | GrParameterInfo (GroovyIntroduceObjectClassDescriptor descriptor, GrMethod method, List<? extends GrParameterInfo> oldMethodParameters) { final GroovyPsiElementFactory elementFactory = GroovyPsiElementFactory.getInstance(method.getProject()); PsiType classType = elementFactory.createTypeByFQClassName(StringUtil.getQual... | createMergedParameterInfo |
30,702 | PsiElement (PsiElement callExpression, Object substitutor) { final IntroduceParameterObjectDelegate<PsiNamedElement, ParameterInfo, IntroduceParameterObjectClassDescriptor<PsiNamedElement, ParameterInfo>> delegate = findDelegate(callExpression); return delegate != null ? delegate.createNewParameterInitializerAtCallSite... | getActualValue |
30,703 | PsiElement (PsiElement callExpression, IntroduceParameterObjectClassDescriptor descriptor, List<? extends ParameterInfo> oldMethodParameters, Object substitutor) { if (callExpression instanceof GrCallExpression) { final GrArgumentList list = ((GrCallExpression)callExpression).getArgumentList(); if (list == null) { retu... | createNewParameterInitializerAtCallSite |
30,704 | ChangeInfo (GrMethod method, List<? extends GrParameterInfo> newParameterInfos, boolean delegate) { final PsiType returnType = method.getReturnType(); return new GrChangeInfoImpl(method, VisibilityUtil.getVisibilityModifier(method.getModifierList()), returnType != null ? CanonicalTypes.createTypeWrapper(returnType) : n... | createChangeSignatureInfo |
30,705 | void (Collection<? super FixableUsageInfo> usages, GrMethod method, GroovyIntroduceObjectClassDescriptor descriptor, ReadWriteAccessDetector.Access[] accessors) { throw new UnsupportedOperationException(); } | collectUsagesToGenerateMissedFieldAccessors |
30,706 | void (Collection<? super FixableUsageInfo> usages, GrMethod method, GroovyIntroduceObjectClassDescriptor descriptor) { throw new UnsupportedOperationException(); } | collectAdditionalFixes |
30,707 | void (MultiMap<PsiElement, String> conflicts, UsageInfo[] infos, GrMethod method, GroovyIntroduceObjectClassDescriptor classDescriptor) { throw new UnsupportedOperationException(); } | collectConflicts |
30,708 | String (GrParameterInfo paramInfo, @NotNull PsiElement context) { throw new UnsupportedOperationException(); } | getSetterName |
30,709 | String (GrParameterInfo paramInfo, @NotNull PsiElement context, ReadWriteAccessDetector.Access access) { throw new UnsupportedOperationException(); } | getGetterName |
30,710 | GrMethod (GrMethod method) { throw new UnsupportedOperationException(); } | findCompatibleConstructorInExistingClass |
30,711 | PsiElement (GrMethod method, ReadWriteAccessDetector.Access[] accessors) { throw new UnsupportedOperationException(); } | createClass |
30,712 | void (@NotNull PsiElement location, @InspectionMessage @NotNull String description, @NotNull LocalQuickFix @Nullable [] fixes, @NotNull ProblemHighlightType highlightType) { if (highlightType == ProblemHighlightType.GENERIC_ERROR) { if (fixes != null && fixes.length > 0 && location.isPhysical()) { final InspectionManag... | registerError |
30,713 | List<ProblemFix> () { return toApply; } | getFixes |
30,714 | LocalQuickFix () { return fix; } | getFix |
30,715 | ProblemDescriptor () { return descriptor; } | getDescriptor |
30,716 | void () { fix.applyFix(descriptor.getPsiElement().getProject(), descriptor); } | apply |
30,717 | void (@NotNull GrReferenceExpression referenceExpression) { accessibilityChecker.visitReferenceExpression(referenceExpression); PsiElement resolved = referenceExpression.resolve(); if (resolved == null) { myCallback.trigger(referenceExpression, null); } else if (referenceExpression.getType() == null) { if (!(resolved i... | visitReferenceExpression |
30,718 | void (@NotNull GrCodeReferenceElement refElement) { accessibilityChecker.visitCodeReferenceElement(refElement); super.visitCodeReferenceElement(refElement); } | visitCodeReferenceElement |
30,719 | void (@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) { invokeInner(project, new PsiElement[]{file}); } | invoke |
30,720 | void (@NotNull Project project, PsiElement @NotNull [] elements, DataContext dataContext) { invokeInner(project, elements); } | invoke |
30,721 | void (Project project, PsiElement[] elements) { Set<GroovyFile> files = collectFilesForProcessing(elements); new ConvertToStaticProcessor(project, files.toArray(GroovyFile.EMPTY_ARRAY)).run(); } | invokeInner |
30,722 | Set<GroovyFile> (PsiElement @NotNull [] elements) { Set<GroovyFile> files = new HashSet<>(); for (PsiElement element : elements) { PsiFile containingFile = element.getContainingFile(); if (containingFile instanceof GroovyFile) { files.add((GroovyFile)containingFile); } } return files; } | collectFilesForProcessing |
30,723 | UsageViewDescriptor (UsageInfo @NotNull [] usages) { return new UsageViewDescriptorAdapter() { @Override public PsiElement @NotNull [] getElements() { return myFiles; } @Override public String getProcessedElementsHeader() { return GroovyRefactoringBundle.message("files.to.be.converted"); } }; } | createUsageViewDescriptor |
30,724 | String () { return GroovyRefactoringBundle.message("files.to.be.converted"); } | getProcessedElementsHeader |
30,725 | void (UsageInfo @NotNull [] usages) { int counter = 0; final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator(); LOG.assertTrue(progressIndicator != null); progressIndicator.setIndeterminate(false); for (GroovyFile file : myFiles) { counter++; commitFile(file); progressIndicator.... | performRefactoring |
30,726 | void (@NotNull GroovyFile file) { final Document document = PsiDocumentManager.getInstance(myProject).getDocument(file); PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(file.getProject()); LOG.assertTrue(document != null); psiDocumentManager.commitDocument(document); LOG.assertTrue(file.isValid()... | commitFile |
30,727 | void (@NotNull GroovyFile file) { Set<GrTypeDefinition> classesWithUnresolvedRef = new HashSet<>(); Set<GrMethod> methodsWithUnresolvedRef = new HashSet<>(); VisitorCallback callback = (element, info) -> { GrMethod containingMethod = PsiTreeUtil.getParentOfType(element, GrMethod.class); if (containingMethod != null) { ... | putCompileAnnotations |
30,728 | void (@NotNull GrTypeDefinition typeDef) { processDefinitions(typeDef, classesWithUnresolvedRef); super.visitTypeDefinition(typeDef); } | visitTypeDefinition |
30,729 | void (@NotNull GrMethod method) { processMethods(method, methodsWithUnresolvedRef); super.visitMethod(method); } | visitMethod |
30,730 | void (@NotNull GrMethod method, Set<GrMethod> dynamicMethods) { PsiElement containingClass = method.getContainingClass(); boolean isOuterStatic = containingClass != null && CompileStaticUtil.isCompileStatic(containingClass); boolean isStatic = dynamicMethods.stream().noneMatch(method::isEquivalentTo); if (isOuterStatic... | processMethods |
30,731 | void (GrTypeDefinition typeDef, Set<GrTypeDefinition> dynamicClasses) { PsiElement containingClass = typeDef.getContainingClass(); boolean isOuterStatic = containingClass != null && CompileStaticUtil.isCompileStatic(containingClass); boolean isStatic = !dynamicClasses.contains(typeDef); if (isOuterStatic && !isStatic) ... | processDefinitions |
30,732 | String () { return GroovyRefactoringBundle.message("converting.files.to.static"); } | getCommandName |
30,733 | boolean (@NotNull MoveMembersOptions options, @NotNull MoveMembersProcessor.MoveMembersUsageInfo usage) { final PsiElement element = usage.getElement(); if (element == null || !element.isValid()) return true; if (usage.reference instanceof GrReferenceExpression refExpr) { GrExpression qualifier = refExpr.getQualifierEx... | changeExternalUsage |
30,734 | PsiMember (@NotNull MoveMembersOptions options, @NotNull PsiMember member, PsiElement anchor, @NotNull PsiClass targetClass) { GroovyChangeContextUtil.encodeContextInfo(member); final PsiDocComment docComment; if (member instanceof PsiDocCommentOwner) { docComment = ((PsiDocCommentOwner)member).getDocComment(); } else ... | doMove |
30,735 | void (PsiElement prevSibling) { if (prevSibling == null) return; ASTNode node = prevSibling.getNode(); IElementType type = node.getElementType(); if (type == GroovyTokenTypes.mNLS) { String text = prevSibling.getText(); int lfCount = StringUtil.countChars(text, '\n'); if (lfCount < 2) { ASTNode parent = node.getTreePar... | addLineFeedIfNeeded |
30,736 | void (@NotNull PsiElement scope) { GroovyChangeContextUtil.decodeContextInfo(scope, null, null); } | decodeContextInfo |
30,737 | boolean (GrReferenceExpression refExpr, PsiMember member) { if (!(refExpr.getContainingFile() instanceof GroovyFile)) return false; final GrImportStatement[] imports = ((GroovyFile)refExpr.getContainingFile()).getImportStatements(); for (GrImportStatement stmt : imports) { if (!stmt.isOnDemand() && stmt.resolveTargetCl... | hasStaticImport |
30,738 | boolean (final PsiElement element, final PsiClass aClass) { if (element.getContainingFile() instanceof GroovyFile) { final GrImportStatement[] importStatements = ((GroovyFile)element.getContainingFile()).getImportStatements(); for (GrImportStatement stmt : importStatements) { final GrCodeReferenceElement ref = stmt.get... | hasOnDemandStaticImport |
30,739 | PsiElement (@NotNull final PsiMember member, @NotNull final PsiClass targetClass, Set<PsiMember> membersToMove) { if (member instanceof GrField && member.hasModifierProperty(PsiModifier.STATIC)) { final List<PsiField> referencedFields = new ArrayList<>(); final GrExpression psiExpression = ((GrField)member).getInitiali... | getAnchor |
30,740 | void (@NotNull final GrReferenceExpression expression) { super.visitReferenceExpression(expression); final PsiElement psiElement = expression.resolve(); if (psiElement instanceof GrField grField) { if (grField.getContainingClass() == targetClass && !referencedFields.contains(grField)) { referencedFields.add(grField); }... | visitReferenceExpression |
30,741 | PsiElement (PsiClass targetClass, GrEnumConstant constant, @Nullable PsiElement anchor) { if (targetClass instanceof GrEnumTypeDefinition enumeration) { final GrEnumConstantList constantList = enumeration.getEnumConstantList(); if (constantList != null) { ASTNode node = constantList.getNode(); node.addLeaf(GroovyTokenT... | addEnumConstant |
30,742 | void (@NotNull MoveMembersProcessor.MoveMembersUsageInfo usageInfo, @Nullable String newVisibility, @Nullable PsiModifierList modifierListCopy, @NotNull PsiClass targetClass, @NotNull Set<PsiMember> membersToMove, @NotNull MultiMap<PsiElement, String> conflicts) { final PsiElement element = usageInfo.getElement(); if (... | checkConflictsOnUsage |
30,743 | void (@NotNull PsiMember member, @Nullable String newVisibility, @Nullable PsiModifierList modifierListCopy, @NotNull PsiClass targetClass, @NotNull Set<PsiMember> membersToMove, @NotNull MultiMap<PsiElement, String> conflicts) { } | checkConflictsOnMember |
30,744 | PsiClass (@NotNull PsiClass aClass, @NotNull PsiClass targetClass) { if (!(aClass instanceof GrTypeDefinition)) return null; GroovyChangeContextUtil.encodeContextInfo(aClass); PsiDocComment doc = aClass.getDocComment(); PsiElement brace = targetClass.getRBrace(); PsiClass newClass = (PsiClass)targetClass.addBefore(aCla... | moveClass |
30,745 | List<PsiElement> (@NotNull List<UsageInfo> usageInfos, @NotNull Project project) { final List<PsiElement> importStatements = new ArrayList<>(); if (!CodeStyleSettingsManager.getSettings(project).getCustomSettings(GroovyCodeStyleSettings.class).INSERT_INNER_CLASS_IMPORTS) { filterUsagesInImportStatements(usageInfos, imp... | filterImports |
30,746 | void (final List<UsageInfo> usages, final List<PsiElement> importStatements) { for (Iterator<UsageInfo> iterator = usages.iterator(); iterator.hasNext(); ) { UsageInfo usage = iterator.next(); PsiElement element = usage.getElement(); if (element == null) continue; GrImportStatement stmt = PsiTreeUtil.getParentOfType(el... | filterUsagesInImportStatements |
30,747 | void (@NotNull final Map<PsiElement, PsiElement> oldToNewElementsMapping) { for (final PsiElement newClass : oldToNewElementsMapping.values()) { if (!(newClass instanceof GrTypeDefinition)) continue; ((GrTypeDefinition)newClass).accept(new GroovyRecursiveElementVisitor() { @Override public void visitReferenceExpression... | retargetClassRefsInMoved |
30,748 | void (@NotNull GrReferenceExpression reference) { if (visitRef(reference)) return; super.visitReferenceExpression(reference); } | visitReferenceExpression |
30,749 | void (@NotNull GrCodeReferenceElement refElement) { visitRef(refElement); super.visitCodeReferenceElement(refElement); } | visitCodeReferenceElement |
30,750 | boolean (GrReferenceElement reference) { PsiElement element = reference.resolve(); if (element instanceof PsiClass) { for (PsiElement oldClass : oldToNewElementsMapping.keySet()) { if (PsiTreeUtil.isAncestor(oldClass, element, false)) { PsiClass newInnerClass = findMatchingClass((PsiClass)oldClass, (PsiClass)oldToNewEl... | visitRef |
30,751 | PsiClass (final PsiClass classToMove, final PsiClass newClass, final PsiClass innerClass) { if (classToMove == innerClass) { return newClass; } PsiClass parentClass = findMatchingClass(classToMove, newClass, innerClass.getContainingClass()); PsiClass newInnerClass = parentClass.findInnerClassByName(innerClass.getName()... | findMatchingClass |
30,752 | void (@NotNull final Map<PsiElement, PsiElement> oldToNewElementMap, final NonCodeUsageInfo @NotNull [] nonCodeUsages) { for (PsiElement newClass : oldToNewElementMap.values()) { if (!(newClass instanceof GrTypeDefinition)) continue; newClass.accept(new PsiRecursiveElementVisitor() { @Override public void visitElement(... | retargetNonCodeUsages |
30,753 | void (@NotNull final PsiElement element) { super.visitElement(element); List<NonCodeUsageInfo> list = element.getCopyableUserData(MoveClassToInnerProcessor.ourNonCodeUsageKey); if (list != null) { for (NonCodeUsageInfo info : list) { for (int i = 0; i < nonCodeUsages.length; i++) { if (nonCodeUsages[i] == info) { nonCo... | visitElement |
30,754 | void (PsiFile targetClassFile) { if (!(targetClassFile instanceof GroovyFile file)) return; for (GrImportStatement unusedImport : unusedImports(file)) { file.removeImport(unusedImport); } } | removeRedundantImports |
30,755 | boolean (PsiFile element) { return element instanceof GroovyFile; } | canProcessElement |
30,756 | void (PsiFile file, PsiDirectory moveDestination, Map<PsiElement, PsiElement> oldToNewMap) { final GroovyFile groovyFile = (GroovyFile)file; GroovyChangeContextUtil.encodeContextInfo(groovyFile); for (PsiClass psiClass : groovyFile.getClasses()) { oldToNewMap.put(psiClass, MoveClassesOrPackagesUtil.doMoveClass(psiClass... | prepareMovedFile |
30,757 | List<UsageInfo> (PsiFile psiFile, PsiDirectory newParent, boolean searchInComments, boolean searchInNonJavaFiles) { final List<UsageInfo> result = new ArrayList<>(); final PsiPackage newParentPackage = JavaDirectoryService.getInstance().getPackage(newParent); final String qualifiedName = newParentPackage == null ? "" :... | findUsages |
30,758 | void (List<UsageInfo> usageInfos, Map<PsiElement, PsiElement> oldToNewMap) { for (UsageInfo usage : usageInfos) { if (usage instanceof MoveRenameUsageInfo moveRenameUsage) { final PsiElement oldElement = moveRenameUsage.getReferencedElement(); final PsiElement newElement = oldToNewMap.get(oldElement); final PsiReferenc... | retargetUsages |
30,759 | void (Collection<UsageInfo> results) { removeAllAliasImportedUsages(results); } | preprocessUsages |
30,760 | PsiClass (MoveInnerOptions options) { PsiClass innerClass = options.getInnerClass(); if (!(innerClass instanceof GrTypeDefinition)) { return super.createNewClass(options); } PsiDirectory dir = (PsiDirectory)options.getTargetContainer(); return CreateClassActionBase.createClassByType(dir, options.getNewClassName(), opti... | createNewClass |
30,761 | void (GroovyFile file, GroovyFile newFile, String newPackageName) { String modifiersText = null; final GrPackageDefinition packageDefinition = file.getPackageDefinition(); if (packageDefinition != null) { final PsiModifierList modifierList = packageDefinition.getModifierList(); if (modifierList != null) { modifiersText... | setPackageDefinition |
30,762 | GroovyFile (GroovyFile file, PsiPackage newPackage) { for (GrImportStatement importStatement : file.getImportStatements()) { importStatement.delete(); } final GroovyFile newFile = GroovyPsiElementFactory.getInstance(file.getProject()).createGroovyFile("", true, null); newFile.addRange(file.getFirstChild(), file.getLast... | generateNewScript |
30,763 | String (PsiClass clazz) { final PsiFile file = clazz.getContainingFile(); if (!(file instanceof GroovyFile)) return null; return ((GroovyFile)file).getClasses().length > 1 ? clazz.getName() + "." + GroovyFileType.DEFAULT_EXTENSION : file.getName(); } | getName |
30,764 | void (Collection<UsageInfo> results) { removeAllAliasImportedUsages(results); } | preprocessUsages |
30,765 | void (Collection<UsageInfo> results) { for (Iterator<UsageInfo> iterator = results.iterator(); iterator.hasNext(); ) { UsageInfo info = iterator.next(); if (info == null) continue; final PsiReference ref = info.getReference(); if (ref == null) continue; final PsiElement element = ref.getElement(); if (!(element instanc... | removeAllAliasImportedUsages |
30,766 | void (@NotNull PsiClass aClass) { if (aClass.getContainingFile() instanceof GroovyFileBase) { GroovyChangeContextUtil.encodeContextInfo(getRealElement(aClass)); } } | prepareMove |
30,767 | void (@NotNull PsiClass aClass) { if (aClass.getContainingFile() instanceof GroovyFileBase) { GroovyChangeContextUtil.decodeContextInfo(getRealElement(aClass), null, null); } } | finishMoveClass |
30,768 | PsiElement (PsiClass aClass) { return aClass instanceof GroovyScriptClass ? aClass.getContainingFile() : aClass; } | getRealElement |
30,769 | void (final PsiClass newClass, final PsiClass oldClass) { final Collection<PsiReference> all = ReferencesSearch.search(oldClass, new LocalSearchScope(newClass.getContainingFile())).findAll(); for (PsiReference reference : all) { final PsiElement element = reference.getElement(); final PsiElement parent = element.getPar... | correctOldClassReferences |
30,770 | void (final PsiClass aClass, final PsiPackage newContainingPackage) { final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(aClass.getContainingFile().getContainingDirectory()); if (aPackage == null) { return; } for (PsiReference reference : ReferencesSearch.search(aClass, new LocalSearchScope(aClas... | correctSelfReferences |
30,771 | TextRange (Object occurrence) { if (occurrence instanceof PsiElement) { return ((PsiElement)occurrence).getTextRange(); } else if (occurrence instanceof StringPartInfo) { return ((StringPartInfo)occurrence).getRange(); } else { return null; } } | getOccurrenceRange |
30,772 | Project () { return myProject; } | getProject |
30,773 | Editor () { return myEditor; } | getEditor |
30,774 | GrExpression () { return myExpression; } | getExpression |
30,775 | PsiElement () { return myScope; } | getScope |
30,776 | GrVariable () { return myVar; } | getVar |
30,777 | StringPartInfo () { return myStringPart; } | getStringPart |
30,778 | PsiElement () { return myPlace; } | getPlace |
30,779 | GrIntroduceContext () { return myContext; } | getContext |
30,780 | void (boolean allOccurrences) { throw new IncorrectOperationException("don't invoke this method"); } | setReplaceAllOccurrences |
30,781 | GrExpression (@NotNull PsiFile containingFile, @NotNull GrVariable variable, @NotNull RangeMarker marker, String exprText) { if (exprText == null) return null; if (!variable.isValid()) return null; final PsiElement refVariableElement = containingFile.findElementAt(marker.getStartOffset()); final PsiElement refVariableE... | restoreExpression |
30,782 | void (@Nullable GrVariable variable, String value) { if (variable == null) { super.updateTitle(variable, value); } else { final String variableText = variable.getParent().getText(); final PsiElement identifier = variable.getNameIdentifierGroovy(); final int startOffsetInParent = identifier.getStartOffsetInParent() + va... | updateTitle |
30,783 | void (@Nullable GrVariable variable) { if (variable == null) return; setPreviewText(variable.getParent().getText()); revalidate(); } | updateTitle |
30,784 | PsiElement () { return ((GrVariable)myElementToRename).getNameIdentifierGroovy(); } | getNameIdentifier |
30,785 | GrVariable () { if (myVarMarker == null) return null; int offset = myVarMarker.getStartOffset(); PsiElement at = myFile.findElementAt(offset); GrVariable var = PsiTreeUtil.getParentOfType(at, GrVariable.class); return var; } | getVariable |
30,786 | void () { runRefactoring(new IntroduceContextAdapter(), getSettings(), true); } | performIntroduce |
30,787 | GrVariable (boolean replaceAll, String @NotNull [] names) { final Settings settings = getInitialSettingsForInplace(myContext, myReplaceChoice, names); if (settings == null) return null; GrVariable var = runRefactoring(myContext, settings, false); if (var != null) { myVarMarker = myContext.getEditor().getDocument().crea... | createFieldToStartTemplateOn |
30,788 | GrVariable (Computable<? extends GrVariable> computable) { SmartPsiElementPointer<GrVariable> pointer = WriteAction.compute(() -> { GrVariable var = computable.compute(); return var != null ? SmartPointerManager.getInstance(myProject).createSmartPsiElementPointer(var) : null; }); return pointer != null ? pointer.getEle... | refactorInWriteAction |
30,789 | boolean () { return myReplaceChoice != OccurrencesChooser.ReplaceChoice.NO; } | isReplaceAllOccurrences |
30,790 | void (@NotNull GrVariable psiField) { PsiType declaredType = psiField.getDeclaredType(); myTypePointer = declaredType != null ? SmartTypePointerManager.getInstance(myProject).createSmartTypePointer(declaredType) : null; super.restoreState(psiField); } | restoreState |
30,791 | PsiType () { return myTypePointer != null ? myTypePointer.getType() : null; } | getSelectedType |
30,792 | Project () { return myProject; } | getProject |
30,793 | Editor () { return myEditor; } | getEditor |
30,794 | GrExpression () { return (GrExpression)getExpr(); } | getExpression |
30,795 | GrVariable () { return getLocalVariable(); } | getVar |
30,796 | StringPartInfo () { return null; } | getStringPart |
30,797 | PsiElement () { return myScope; } | getScope |
30,798 | PsiElement () { GrExpression expression = getExpression(); return expression != null ? expression : getLocalVariable(); } | getPlace |
30,799 | void (PsiClass[] scopes, final Consumer<? super PsiClass> callback, Editor editor) { PsiElementProcessor<PsiClass> processor = new PsiElementProcessor<>() { @Override public boolean execute(@NotNull PsiClass element) { callback.accept(element); return false; } }; NavigationUtil.getPsiElementPopup(scopes, new PsiClassLi... | showScopeChooser |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.