Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
35,400 | String () { return "Class initializer"; } | toString |
35,401 | GrOpenBlock () { return findNotNullChildByClass(GrOpenBlock.class); } | getBlock |
35,402 | boolean () { return getModifierList().hasExplicitModifier(PsiModifier.STATIC); } | isStatic |
35,403 | PsiClass () { PsiElement parent = getParent(); if (parent instanceof GrTypeDefinitionBody) { final PsiElement pparent = parent.getParent(); if (pparent instanceof PsiClass) { return (PsiClass) pparent; } } return null; } | getContainingClass |
35,404 | GrMember[] () { return new GrMember[]{this}; } | getMembers |
35,405 | GrModifierList () { return findNotNullChildByClass(GrModifierList.class); } | getModifierList |
35,406 | boolean (@GrModifier.GrModifierConstant @NonNls @NotNull String name) { return getModifierList().hasModifierProperty(name); } | hasModifierProperty |
35,407 | PsiCodeBlock () { return PsiImplUtil.getOrCreatePsiCodeBlock(getBlock()); } | getBody |
35,408 | Icon (int flags) { return IconManager .getInstance().createLayeredIcon(this, JetgroovyIcons.Groovy.ClassInitializer, ElementPresentationUtil.getFlags(this, false)); } | getElementIcon |
35,409 | PsiType () { return TypeInferenceHelper.getCurrentContext().getExpressionType(this, GrBinaryExpressionTypeCalculators::computeType); } | getType |
35,410 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitField(this); } | accept |
35,411 | String () { return "Field"; } | toString |
35,412 | PsiExpression () { return org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil.getOrCreatePisExpression(getInitializerGroovy()); } | getInitializer |
35,413 | boolean () { final GrFieldStub stub = getStub(); if (stub != null) { return stub.isDeprecatedByDocTag() || PsiImplUtil.isDeprecatedByAnnotation(this); } return PsiImplUtil.isDeprecatedByDocTag(this) || PsiImplUtil.isDeprecatedByAnnotation(this); } | isDeprecated |
35,414 | PsiType () { PsiType type = TypeInferenceHelper.inTopContext(() -> getEnhancedType()); if (type != null) { return type; } return TypeInferenceHelper.inTopContext(() -> super.getTypeGroovy()); } | getTypeGroovy |
35,415 | PsiClass () { PsiElement parent = getParent().getParent(); if (parent instanceof GrTypeDefinitionBody) { final PsiElement pparent = parent.getParent(); if (pparent instanceof PsiClass) { return (PsiClass)pparent; } } final PsiFile file = getContainingFile(); if (file instanceof GroovyFileBase) { return ((GroovyFileBase... | getContainingClass |
35,416 | boolean () { final GrFieldStub stub = getStub(); if (stub != null) { return stub.isProperty(); } return PsiUtil.isProperty(this); } | isProperty |
35,417 | GrAccessorMethod () { return GrClassImplUtil.findSetter(this); } | getSetter |
35,418 | SearchScope () { if (isProperty()) { return ResolveScopeManager.getElementUseScope(this); //maximal scope } return PsiImplUtil.getMemberUseScope(this); } | getUseScope |
35,419 | ItemPresentation () { return JavaPresentationUtil.getFieldPresentation(this); } | getPresentation |
35,420 | PsiElement () { final PsiClass containingClass = getContainingClass(); if (containingClass == null) return this; PsiClass originalClass = (PsiClass)containingClass.getOriginalElement(); PsiField originalField = originalClass.findFieldByName(getName(), false); return originalField != null ? originalField : this; } | getOriginalElement |
35,421 | Icon (@IconFlags int flags) { boolean isAbstract = hasModifierProperty(PsiModifier.ABSTRACT); Icon fieldIcon = isProperty() ? isAbstract ? JetgroovyIcons.Groovy.AbstractProperty : JetgroovyIcons.Groovy.Property : isAbstract ? JetgroovyIcons.Groovy.AbstractField : JetgroovyIcons.Groovy.Field; return IconManager.getInsta... | getElementIcon |
35,422 | GrDocComment () { return GrDocCommentUtil.findDocComment(this); } | getDocComment |
35,423 | GrModifierList () { return getRequiredStubOrPsiChild(GroovyStubElementTypes.MODIFIER_LIST); } | getModifierList |
35,424 | boolean (@NotNull String name) { return getModifierList().hasModifierProperty(name); } | hasModifierProperty |
35,425 | void (@Nullable PsiType type) { final GrTypeElement typeElement = getTypeElementGroovy(); if (type == null) { if (typeElement == null) return; if (getModifierList().getModifiers().length == 0) { getModifierList().setModifierProperty(GrModifier.DEF, true); } typeElement.delete(); return; } type = TypesUtil.unboxPrimitiv... | setType |
35,426 | boolean () { return findChildByType(GroovyTokenTypes.mLPAREN) != null; } | isTuple |
35,427 | GrExpression () { return GroovyPsiElementImpl.findExpressionChild(this); } | getTupleInitializer |
35,428 | void (@NotNull ASTNode child) { final PsiElement psi = child.getPsi(); if (psi == getTupleInitializer()) { deleteChildInternal(findNotNullChildByType(GroovyTokenTypes.mASSIGN).getNode()); } super.deleteChildInternal(child); } | deleteChildInternal |
35,429 | GrTypeElement (GrVariable var) { if (isTuple()) { final PsiElement psiElement = PsiUtil.skipWhitespacesAndComments(var.getPrevSibling(), false); if (psiElement instanceof GrTypeElement) { return (GrTypeElement)psiElement; } return null; } else { return getTypeElementGroovy(); } } | getTypeElementGroovyForVariable |
35,430 | GrTypeElement () { GrVariableDeclarationStub stub = getStub(); if (stub != null) { return stub.getTypeElement(); } if (isTuple()) return null; return findChildByClass(GrTypeElement.class); } | getTypeElementGroovy |
35,431 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitVariableDeclaration(this); } | accept |
35,432 | String () { return "Variable definitions"; } | toString |
35,433 | GrMember[] () { return findChildrenByClass(GrMember.class); } | getMembers |
35,434 | boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @Nullable PsiElement lastParent, @NotNull PsiElement place) { if (!shouldProcessLocals(processor)) return true; if (lastParent != null && !(getParent() instanceof GrTypeDefinitionBody) && lastParent == getTupleInitializer()) { return true; } fo... | processDeclarations |
35,435 | PsiReference () { if (getTypeElementGroovy() != null) return null; TextRange range = getRangeForReference(); if (range == null) return null; return new GrTypeReference(range); } | getReference |
35,436 | TextRange () { PsiElement modifier = findSuitableModifier(); if (modifier == null) return null; return modifier.getTextRange().shiftRight(-getTextRange().getStartOffset()); } | getRangeForReference |
35,437 | PsiElement () { final GrModifierList list = getModifierList(); PsiElement defModifier = list.getModifier(GrModifier.DEF); if (defModifier != null) return defModifier; PsiElement finalModifier = list.getModifier(PsiModifier.FINAL); if (finalModifier != null) return finalModifier; for (PsiElement element : list.getModifi... | findSuitableModifier |
35,438 | PsiElement () { GrVariable[] variables = getVariables(); if (variables.length == 0) return null; GrVariable resolved = variables[0]; PsiType typeGroovy = resolved.getTypeGroovy(); if (typeGroovy instanceof PsiClassType) { return ((PsiClassType)typeGroovy).resolve(); } else { return resolved; } } | resolve |
35,439 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitConstructorInvocation(this); } | accept |
35,440 | String () { return "Constructor invocation"; } | toString |
35,441 | GroovyConstructorReference () { return myConstructorReference; } | getConstructorReference |
35,442 | boolean () { return getKeywordType() == GroovyTokenTypes.kSUPER; } | isSuperCall |
35,443 | boolean () { return getKeywordType() == GroovyTokenTypes.kTHIS; } | isThisCall |
35,444 | IElementType () { GrReferenceExpression keyword = getInvokedExpression(); PsiElement refElement = keyword.getReferenceNameElement(); if (refElement == null) return null; return refElement.getNode().getElementType(); } | getKeywordType |
35,445 | GrReferenceExpression () { return findNotNullChildByClass(GrReferenceExpression.class); } | getInvokedExpression |
35,446 | GroovyResolveResult[] () { PsiClass aClass = getDelegatedClass(); if (aClass == null) return GroovyResolveResult.EMPTY_ARRAY; return new GroovyResolveResult[]{new GroovyResolveResultImpl(aClass, this, null, PsiSubstitutor.EMPTY, true, true)}; } | multiResolveClass |
35,447 | PsiClass () { PsiClass typeDefinition = PsiUtil.getContextClass(this); if (typeDefinition != null) { return isThisCall() ? typeDefinition : typeDefinition.getSuperClass(); } return null; } | getDelegatedClass |
35,448 | GrArgumentList () { return findNotNullChildByClass(GrArgumentList.class); } | getArgumentList |
35,449 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitCaseSection(this); } | accept |
35,450 | String () { return "Case section"; } | toString |
35,451 | boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, @Nullable PsiElement lastParent, @NotNull PsiElement place) { return processLocals(this, processor, state, lastParent, place); } | processDeclarations |
35,452 | void (GrVariable variable) { PsiImplUtil.removeVariable(variable); } | removeVariable |
35,453 | boolean () { PsiElement label = getFirstChild(); return org.jetbrains.plugins.groovy.lang.psi.GroovyElementTypes.KW_DEFAULT.equals(label.getNode().getElementType()); } | isDefault |
35,454 | boolean () { PsiElement parent = this; while (parent != null) { if (parent instanceof GrString grString) { return !grString.isPlainString(); } parent = parent.getParent(); } return true; } | mayUseNewLinesAsSeparators |
35,455 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitForInClause(this); } | accept |
35,456 | String () { return "In clause"; } | toString |
35,457 | GrParameter () { return findChildByClass(GrParameter.class); } | getDeclaredVariable |
35,458 | GrExpression () { return findExpressionChild(this); } | getIteratedExpression |
35,459 | PsiElement () { PsiElement in = findChildByType(GroovyTokenTypes.kIN); if (in != null) return in; PsiElement colon = findChildByType(GroovyTokenTypes.mCOLON); return Objects.requireNonNull(colon); } | getDelimiter |
35,460 | boolean (@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) { if (lastParent != null) return true; GrParameter variable = getDeclaredVariable(); if (variable == null) return true; return ResolveUtil.processElement(processor, variable, state); } | processDeclarations |
35,461 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitReturnStatement(this); } | accept |
35,462 | String () { return "RETURN statement"; } | toString |
35,463 | GrExpression () { return findExpressionChild(this); } | getReturnValue |
35,464 | PsiElement () { return findNotNullChildByType(GroovyTokenTypes.kRETURN); } | getReturnWord |
35,465 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitAssertStatement(this); } | accept |
35,466 | String () { return "ASSERT statement"; } | toString |
35,467 | GrExpression () { return findExpressionChild(this); } | getAssertion |
35,468 | GrExpression () { GrExpression[] exprs = findChildrenByClass(GrExpression.class); return exprs.length >= 2 ? exprs[1] : null; } | getErrorMessage |
35,469 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitYieldStatement(this); } | accept |
35,470 | String () { return "YIELD statement"; } | toString |
35,471 | GrExpression () { return findExpressionChild(this); } | getYieldedValue |
35,472 | PsiElement () { return findNotNullChildByType(GroovyTokenTypes.kYIELD); } | getYieldKeyword |
35,473 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitThrowStatement(this); } | accept |
35,474 | String () { return "THROW statement"; } | toString |
35,475 | GrExpression () { return findExpressionChild(this); } | getException |
35,476 | PsiElement () { return findChildByType(GroovyTokenTypes.mIDENT); } | getLabelIdentifier |
35,477 | String () { final PsiElement id = getLabelIdentifier(); return id != null ? id.getText() : null; } | getLabelName |
35,478 | PsiReference () { final PsiElement label = getLabelIdentifier(); if (label == null) return null; return new GrLabelReference(this); } | getReference |
35,479 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitContinueStatement(this); } | accept |
35,480 | String () { return "CONTINUE statement"; } | toString |
35,481 | GrStatement () { return ResolveUtil.resolveLabelTargetStatement(getLabelName(), this, false); } | findTargetStatement |
35,482 | GrLabeledStatement () { return ResolveUtil.resolveLabeledStatement(getLabelName(), this, false); } | resolveLabel |
35,483 | String () { return "continue"; } | getStatementText |
35,484 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitBreakStatement(this); } | accept |
35,485 | String () { return "BREAK statement"; } | toString |
35,486 | GrStatement () { return ResolveUtil.resolveLabelTargetStatement(getLabelName(), this, true); } | findTargetStatement |
35,487 | GrLabeledStatement () { return ResolveUtil.resolveLabeledStatement(getLabelName(), this, true); } | resolveLabel |
35,488 | String () { return "break"; } | getStatementText |
35,489 | void (@NotNull GroovyElementVisitor visitor) { visitor.visitParameter(this); } | accept |
35,490 | String () { return "Parameter"; } | toString |
35,491 | PsiType () { final PsiType declaredType = getDeclaredType(); if (declaredType != null) return declaredType; if (isVarArgs()) { PsiClassType type = TypesUtil.getJavaLangObject(this); return new PsiEllipsisType(type); } PsiElement parent = getParent(); if (parent instanceof GrForInClause) { GrExpression iteratedExpressio... | getTypeGroovy |
35,492 | PsiType () { PsiType type = super.getDeclaredType(); if (isVarArgs()) { if (type == null) type = TypesUtil.getJavaLangObject(this); return new PsiEllipsisType(type); } return type; } | getDeclaredType |
35,493 | PsiType () { if (isMainMethodFirstUntypedParameter()) { return GroovyPsiElementFactory.getInstance(getProject()).createTypeElement(CommonClassNames.JAVA_LANG_STRING + "[]", this).getType(); } else { return super.getType(); } } | getType |
35,494 | boolean () { if (getTypeElementGroovy() != null) return false; if (!(getParent() instanceof GrParameterList parameterList)) return false; if (isOptional()) return false; if (!(parameterList.getParent() instanceof GrMethod method)) return false; return PsiImplUtil.isMainMethod(method); } | isMainMethodFirstUntypedParameter |
35,495 | void (@Nullable PsiType type) { final GrTypeElement typeElement = getTypeElementGroovy(); if (type == null) { if (typeElement != null) typeElement.delete(); return; } GrTypeElement newTypeElement; try { newTypeElement = GroovyPsiElementFactory.getInstance(getProject()).createTypeElement(type); } catch (IncorrectOperati... | setType |
35,496 | boolean () { final GrParameterStub stub = getStub(); if (stub != null) { return GrParameterStub.hasInitializer(stub.getFlags()); } return getInitializerGroovy() != null; } | isOptional |
35,497 | PsiElement () { return findChildByType(GroovyTokenTypes.mTRIPLE_DOT); } | getEllipsisDots |
35,498 | SearchScope () { if (!isPhysical()) { final PsiFile file = getContainingFile(); final PsiElement context = file.getContext(); if (context != null) return new LocalSearchScope(context); return super.getUseScope(); } final PsiElement scope = getDeclarationScope(); if (scope instanceof GrDocCommentOwner owner) { final GrD... | getUseScope |
35,499 | GrModifierList () { return getRequiredStubOrPsiChild(GroovyStubElementTypes.MODIFIER_LIST); } | getModifierList |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.