Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
30,000 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.INTERFACE_NAME); } | getInterfaceNameAttributes |
30,001 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.ENUM_NAME); } | getEnumNameAttributes |
30,002 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.ANONYMOUS_CLASS_NAME); } | getAnonymousClassNameAttributes |
30,003 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.ABSTRACT_CLASS_NAME); } | getAbstractClassNameAttributes |
30,004 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.CLASS_REFERENCE); } | getClassNameAttributes |
30,005 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.KEYWORD); } | getKeywordAttributes |
30,006 | TextAttributes () { return resolveAttributes(JavaHighlightingColors.COMMA); } | getCommaAttributes |
30,007 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.PARAMETER); } | getParameterAttributes |
30,008 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.TYPE_PARAMETER); } | getTypeParameterNameAttributes |
30,009 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.STATIC_FIELD); } | getStaticFieldAttributes |
30,010 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.INSTANCE_FIELD); } | getInstanceFieldAttributes |
30,011 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.OPERATION_SIGN); } | getOperationSignAttributes |
30,012 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.LOCAL_VARIABLE); } | getLocalVariableAttributes |
30,013 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.CONSTRUCTOR_DECLARATION); } | getConstructorDeclarationAttributes |
30,014 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.METHOD_DECLARATION); } | getMethodDeclarationAttributes |
30,015 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.PARENTHESES); } | getParenthesesAttributes |
30,016 | TextAttributes () { return resolveAttributes(JavaHighlightingColors.DOT); } | getDotAttributes |
30,017 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.BRACKETS); } | getBracketsAttributes |
30,018 | TextAttributes () { return resolveAttributes(GroovySyntaxHighlighter.METHOD_CALL); } | getMethodCallAttributes |
30,019 | PsiDocCommentOwner (@NotNull PsiMember member) { if (!(member instanceof PsiMethod) || member.isPhysical()) return null; String data = member.getUserData(ResolveUtil.DOCUMENTATION_DELEGATE_FQN); if (StringUtil.isEmptyOrSpaces(data)) return null; PsiClass clazz = JavaPsiFacade.getInstance(member.getProject()).findClass(... | computeDocumentationDelegate |
30,020 | void ( @NotNull StringBuilder buffer, @NotNull TextAttributes attributes, @Nullable String value ) { if (DocumentationSettings.isHighlightingOfQuickDocSignaturesEnabled()) { HtmlSyntaxInfoUtil.appendStyledSpan(buffer, attributes, value, DocumentationSettings.getHighlightingSaturation(false)); } else { buffer.append(val... | appendStyledSpan |
30,021 | void ( @NotNull StringBuilder buffer, @Nullable String value, String @NotNull ... properties ) { if (DocumentationSettings.isHighlightingOfQuickDocSignaturesEnabled()) { HtmlSyntaxInfoUtil.appendStyledSpan(buffer, value, properties); } else { buffer.append(value); } } | appendStyledSpan |
30,022 | PsiSubstitutor (PsiElement originalElement) { PsiSubstitutor substitutor = PsiSubstitutor.EMPTY; if (originalElement instanceof GrReferenceExpression) { substitutor = ((GrReferenceExpression)originalElement).advancedResolve().getSubstitutor(); } return substitutor; } | calcSubstitutor |
30,023 | void (PsiElement originalElement, @Nls StringBuilder buffer, PsiVariable variable) { if (variable instanceof PsiField) { final PsiClass parentClass = ((PsiField)variable).getContainingClass(); if (parentClass != null) { appendElementLink(buffer, parentClass, JavaDocUtil.getShortestClassName(parentClass, variable)); new... | generateVariableInfo |
30,024 | void (PsiElement originalElement, GrVariable variable, @Nls StringBuilder buffer, boolean isRendered) { PsiType inferredType = null; if (PsiImplUtil.isWhiteSpaceOrNls(originalElement)) { originalElement = PsiTreeUtil.prevLeaf(originalElement); } if (originalElement != null && originalElement.getNode().getElementType() ... | appendInferredType |
30,025 | void (@Nls StringBuilder buffer, PsiModifierListOwner element) { String modifiers = PsiFormatUtil.formatModifiers(element, PsiFormatUtilBase.JAVADOC_MODIFIERS_ONLY); if (!modifiers.isEmpty()) { appendStyledSpan(buffer, GroovyDocHighlightingManager.getInstance().getKeywordAttributes(), modifiers); buffer.append(" "); } ... | generateModifiers |
30,026 | void (StringBuilder buffer) { buffer.append(LINE_SEPARATOR); } | newLine |
30,027 | void (@Nls @NotNull StringBuilder buffer, @Nullable PsiType type, PsiElement context, boolean isRendered) { if (type instanceof GrTraitType) { generateTraitType(buffer, ((GrTraitType)type), context, isRendered); } else if (type != null) { JavaDocInfoGeneratorFactory.getBuilder(context.getProject()) .setHighlightingMana... | appendTypeString |
30,028 | void (@NotNull StringBuilder buffer, @NotNull GrTraitType type, PsiElement context, boolean isRendered) { appendTypeString(buffer, type.getExprType(), context, isRendered); appendStyledSpan(buffer, GroovyDocHighlightingManager.getInstance().getKeywordAttributes(), " as "); // <- Groovy keyword @NotNull List<PsiType> ty... | generateTraitType |
30,029 | List<String> (PsiElement element, PsiElement originalElement) { List<String> result = new ArrayList<>(); PsiElement docElement = getDocumentationElement(element, originalElement); if (docElement != null) { ContainerUtil.addIfNotNull(result, docElement.getUserData(NonCodeMembersHolder.DOCUMENTATION_URL)); } List<String>... | getUrlFor |
30,030 | GroovyDocInfoGenerator (@NotNull PsiElement element, boolean isGenerationForRenderedDoc) { return new GroovyDocInfoGenerator( element, isGenerationForRenderedDoc, DocumentationSettings.isHighlightingOfQuickDocSignaturesEnabled(), DocumentationSettings.isHighlightingOfCodeBlocksEnabled(), DocumentationSettings.getInline... | getDocInfoGenerator |
30,031 | PsiElement (PsiElement element, PsiElement originalElement) { if (element instanceof GrGdkMethod method) { element = method.getStaticMethod(); } final GrDocComment doc = PsiTreeUtil.getParentOfType(originalElement, GrDocComment.class); if (doc != null) { element = GrDocCommentUtil.findDocOwner(doc); } if (element insta... | getDocumentationElement |
30,032 | boolean (PsiElement element, PsiElement originalElement) { return CompositeDocumentationProvider.hasUrlsFor(this, element, originalElement); } | hasDocumentationFor |
30,033 | boolean (PsiElement element) { return false; } | canPromptToConfigureDocumentation |
30,034 | void (PsiElement element) { } | promptToConfigureDocumentation |
30,035 | void (@NonNls StringBuilder sb, PsiElement element, String label) { getDocInfoGenerator(element, false) .appendMaybeUnresolvedLink(sb, element, label, element.getProject(), false); } | appendElementLink |
30,036 | PsiElement (PsiManager psiManager, Object object, PsiElement element) { if (object instanceof GroovyResolveResult) { return ((GroovyResolveResult)object).getElement(); } if (object instanceof NamedArgumentDescriptor) { return ((NamedArgumentDescriptor)object).getNavigationElement(); } if (object instanceof GrPropertyFo... | getDocumentationElementForLookupItem |
30,037 | PsiElement (PsiManager psiManager, String link, PsiElement context) { return JavaDocUtil.findReferenceTarget(psiManager, link, context); } | getDocumentationElementForLink |
30,038 | PsiComment (PsiComment contextElement) { if (contextElement instanceof GrDocComment) { final GrDocCommentOwner owner = GrDocCommentUtil.findDocOwner((GrDocComment)contextElement); if (owner != null) { return owner.getDocComment(); } } return null; } | findExistingDocComment |
30,039 | String (PsiComment contextComment) { if (!(contextComment instanceof GrDocComment)) { return null; } final GrDocCommentOwner owner = GrDocCommentUtil.findDocOwner((GrDocComment)contextComment); if (owner == null) return null; final CodeDocumentationAwareCommenter commenter = (CodeDocumentationAwareCommenter)LanguageCom... | generateDocumentationContentStub |
30,040 | void (@NotNull PsiFile file, @NotNull Consumer<? super @NotNull PsiDocCommentBase> sink) { if (!(file instanceof GroovyFile groovyFile)) { return; } List<GrDocCommentOwner> owners = PsiTreeUtil.getChildrenOfTypeAsList(groovyFile, GrDocCommentOwner.class); List<GrDocComment> comments = PsiTreeUtil.getChildrenOfTypeAsLis... | collectDocComments |
30,041 | void (@NotNull List<GrDocCommentOwner> owners, @NonNls List<GrDocComment> danglingDocComments, @NotNull Consumer<? super @NotNull PsiDocCommentBase> sink) { for (var docComment : danglingDocComments) { if (docComment != null) { sink.accept(docComment); } } for (var owner : owners) { if (owner == null) { continue; } GrD... | processDocComments |
30,042 | boolean (@Nullable PsiElement element) { return element != null && element.getNode().getElementType() == mGDOC_ASTERISKS; } | isLeadingAsterisks |
30,043 | void (StringBuilder buffer, PsiElement element) { element.accept(new PsiRecursiveElementWalkingVisitor() { @Override public void visitElement(@NotNull PsiElement element) { super.visitElement(element); IElementType type = element.getNode().getElementType(); if (type == mGDOC_TAG_VALUE_LPAREN || type == mGDOC_TAG_VALUE_... | collectElementText |
30,044 | void (@NotNull PsiElement element) { super.visitElement(element); IElementType type = element.getNode().getElementType(); if (type == mGDOC_TAG_VALUE_LPAREN || type == mGDOC_TAG_VALUE_RPAREN || type == mGDOC_TAG_VALUE_SHARP_TOKEN || type == mGDOC_TAG_VALUE_TOKEN || type == mGDOC_TAG_VALUE_COMMA || type == mGDOC_COMMENT... | visitElement |
30,045 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.closure"); } | getTemplateDescription |
30,046 | TextRange (GroovyPsiElement element) { element.accept(new MyRestoringVisitor()); assert element instanceof GrMethodCallExpression; final int offset = element.getTextRange().getEndOffset(); return new TextRange(offset, offset); } | getSurroundSelectionRange |
30,047 | void (@NotNull GrReferenceExpression ref) { if (ref.getQualifierExpression() == null) { //only unqualified references could change their targets final GroovyResolveResult resolveResult = ref.advancedResolve(); ref.putCopyableUserData(REF_RESOLVE_RESULT_KEY, resolveResult); } super.visitReferenceExpression(ref); } | visitReferenceExpression |
30,048 | void (@NotNull GrReferenceExpression ref) { final GroovyResolveResult oldResult = ref.getCopyableUserData(REF_RESOLVE_RESULT_KEY); if (oldResult != null) { assert ref.getQualifierExpression() == null; final GroovyResolveResult newResult = ref.advancedResolve(); final PsiElement oldElement = oldResult.getElement(); fina... | visitReferenceExpression |
30,049 | TextRange (GroovyPsiElement element) { assert element instanceof GrForStatement; GrForClause clause = ((GrForStatement) element).getClause(); int endOffset = element.getTextRange().getEndOffset(); if (clause != null) { endOffset = clause.getTextRange().getStartOffset(); clause.getParent().getNode().removeChild(clause.g... | getSurroundSelectionRange |
30,050 | String () { return GroovyBundle.message("surround.with.for"); } | getTemplateDescription |
30,051 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.try.catch.finally"); } | getTemplateDescription |
30,052 | TextRange (@NotNull GrExpression expression, PsiElement context) { GrParenthesizedExpression parenthesized = (GrParenthesizedExpression) GroovyPsiElementFactory.getInstance(expression.getProject()).createExpressionFromText("((Type)a)", context); GrTypeCastExpression typeCast = (GrTypeCastExpression) parenthesized.getOp... | surroundExpression |
30,053 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.cast"); } | getTemplateDescription |
30,054 | String () { return "with(a){\n}"; } | getReplacementTokens |
30,055 | String () { return GroovyBundle.message("surround.with.with"); } | getTemplateDescription |
30,056 | TextRange (@NotNull GrExpression expression, PsiElement context) { GrParenthesizedExpression result = (GrParenthesizedExpression) GroovyPsiElementFactory.getInstance(expression.getProject()).createExpressionFromText("(a)", context); replaceToOldExpression(result.getOperand(), expression); result = (GrParenthesizedExpre... | surroundExpression |
30,057 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.parentheses"); } | getTemplateDescription |
30,058 | String () { return "shouldFail(a){\n}"; } | getReplacementTokens |
30,059 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.shouldFail"); } | getTemplateDescription |
30,060 | TextRange (GroovyPsiElement element) { assert element instanceof GrIfStatement; GrCondition condition = ((GrIfStatement)element).getCondition(); int endOffset = element.getTextRange().getEndOffset(); if (condition != null) { PsiElement child = condition.getFirstChild(); assert child != null; endOffset = child.getTextRa... | getSurroundSelectionRange |
30,061 | String () { return GroovyBundle.message("surround.with.if"); } | getTemplateDescription |
30,062 | TextRange (@NotNull GrExpression expression, @Nullable PsiElement context) { final GroovyPsiElementFactory factory = GroovyPsiElementFactory.getInstance(expression.getProject()); final GrUnaryExpression template = (GrUnaryExpression)factory.createExpressionFromText("!(a)", context); assert template.getOperand() != null... | surroundExpression |
30,063 | String () { return "!(expr)"; } | getTemplateDescription |
30,064 | TextRange (@NotNull GrExpression expression, PsiElement context) { GrWhileStatement whileStatement = (GrWhileStatement) GroovyPsiElementFactory.getInstance(expression.getProject()).createStatementFromText("while(a){4\n}", context); replaceToOldExpression(whileStatement.getCondition(), expression); whileStatement = expr... | surroundExpression |
30,065 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.while.expr"); } | getTemplateDescription |
30,066 | String () { return "{}"; } | getTemplateDescription |
30,067 | TextRange (GroovyPsiElement element) { final int offset = element.getTextRange().getEndOffset(); return new TextRange(offset, offset); } | getSurroundSelectionRange |
30,068 | TextRange (GroovyPsiElement element) { assert element instanceof GrMethodCallExpression; GrMethodCallExpression withCall = (GrMethodCallExpression) element; GrCondition condition = withCall.getExpressionArguments()[0]; int endOffset = condition.getTextRange().getStartOffset(); condition.getParent().getNode().removeChil... | getSurroundSelectionRange |
30,069 | TextRange (GroovyPsiElement element) { assert element instanceof GrWhileStatement; GrCondition condition = ((GrWhileStatement) element).getCondition(); int endOffset = element.getTextRange().getEndOffset(); if (condition != null) { endOffset = condition.getTextRange().getStartOffset(); condition.getParent().getNode().r... | getSurroundSelectionRange |
30,070 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.while"); } | getTemplateDescription |
30,071 | boolean (PsiElement @NotNull [] elements) { if (elements.length == 0) return false; for (PsiElement element : elements) { if (!isStatement(element)) return false; } if (elements[0] instanceof GrBlockStatement) { return false; } return true; } | isApplicable |
30,072 | boolean (@NotNull PsiElement element) { return ";".equals(element.getText()) || element instanceof PsiComment || StringUtil.isEmptyOrSpaces(element.getText()) || PsiUtil.isExpressionStatement(element); } | isStatement |
30,073 | boolean () { return false; } | isExclusive |
30,074 | TextRange (@NotNull GrExpression expression, PsiElement context) { GrMethodCallExpression call = (GrMethodCallExpression) GroovyPsiElementFactory.getInstance(expression.getProject()).createStatementFromText("with(a){4\n}", context); replaceToOldExpression(call.getExpressionArguments()[0], expression); call = expression... | surroundExpression |
30,075 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.with.expr"); } | getTemplateDescription |
30,076 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.try.finally"); } | getTemplateDescription |
30,077 | boolean (@NotNull PsiElement element) { if (!GroovyManyStatementsSurrounder.isStatement(element) || !(element instanceof GrExpression)) return false; PsiType type = ((GrExpression)element).getType(); return PsiTypes.booleanType().equals(type) || PsiTypes.booleanType().equals(PsiPrimitiveType.getUnboxedType(type)); } | isApplicable |
30,078 | TextRange (@NotNull GrExpression expression, PsiElement context) { GrIfStatement ifStatement = (GrIfStatement) GroovyPsiElementFactory.getInstance(expression.getProject()).createStatementFromText("if(a){4\n} else{\n}", context); replaceToOldExpression(ifStatement.getCondition(), expression); ifStatement = expression.re... | surroundExpression |
30,079 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.if.else.expr"); } | getTemplateDescription |
30,080 | TextRange (@NotNull GrExpression expression, PsiElement context) { GrIfStatement ifStatement = (GrIfStatement) GroovyPsiElementFactory.getInstance(expression.getProject()).createStatementFromText("if(a){4\n}", context); replaceToOldExpression(ifStatement.getCondition(), expression); ifStatement = expression.replaceWith... | surroundExpression |
30,081 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.if.expr"); } | getTemplateDescription |
30,082 | TextRange (GroovyPsiElement element) { assert element instanceof GrTryCatchStatement; int endOffset = element.getTextRange().getEndOffset(); GrTryCatchStatement tryCatchStatement = (GrTryCatchStatement) element; GrCatchClause[] catchClauses = tryCatchStatement.getCatchClauses(); if (catchClauses.length > 0) { GrParamet... | getSurroundSelectionRange |
30,083 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.try"); } | getTemplateDescription |
30,084 | boolean (@NotNull PsiElement element) { return element instanceof GrExpression; } | isApplicable |
30,085 | boolean (PsiElement @NotNull [] elements) { return elements.length == 1 && isApplicable(elements[0]); } | isApplicable |
30,086 | void (GrExpression oldExpr, GrExpression replacement) { oldExpr.replaceWithExpression(replacement, false); } | replaceToOldExpression |
30,087 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.try.catch"); } | getTemplateDescription |
30,088 | String () { //noinspection DialogTitleCapitalization return GroovyBundle.message("surround.with.if.else"); } | getTemplateDescription |
30,089 | void (@NotNull GroovyFile file, @NotNull GroovyScriptRunConfiguration configuration, Location location) { } | tuneConfiguration |
30,090 | GroovyScriptRunner () { return null; } | getRunner |
30,091 | boolean (@NotNull GroovyScriptRunConfiguration existing, @NotNull Location location) { return true; } | isConfigurationByLocation |
30,092 | void (@NotNull GroovyMapContentProvider contentProvider, @NotNull GrExpression qualifier, @Nullable PsiElement resolve, @NotNull CompletionResultSet result) { for (String key : contentProvider.getKeyVariants(qualifier, resolve)) { LookupElement lookup = LookupElementBuilder.create(key); lookup = PrioritizedLookupElemen... | addKeyVariants |
30,093 | boolean (@NotNull String runtimeName) { return false; } | isAppropriateRuntimeName |
30,094 | String (@NotNull ReferenceType refType, @NotNull final String runtimeName) { return null; } | getOriginalScriptName |
30,095 | boolean (@NotNull GroovyFile scriptFile) { return false; } | isAppropriateScriptFile |
30,096 | String (@NotNull GroovyFile groovyFile) { return null; } | getRuntimeScriptName |
30,097 | PsiFile (@NotNull ReferenceType refType, @NotNull String runtimeName, @NotNull Project project, @NotNull GlobalSearchScope scope) { return null; } | getExtraScriptIfNotFound |
30,098 | String (@NotNull PsiClass psiClass) { return null; } | customizeClassName |
30,099 | boolean (@NotNull final String runtimeName) { return true; } | isAppropriateRuntimeName |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.