Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
32,900 | IntentionAction (GrReferenceExpression expression, PsiType[] types) { return QuickFixes.EMPTY_ACTION; } | createDynamicMethodFix |
32,901 | IntentionAction (GrReferenceExpression expression) { return QuickFixes.EMPTY_ACTION; } | createDynamicPropertyFix |
32,902 | IntentionAction (GrReferenceElement element) { return QuickFixes.EMPTY_ACTION; } | createGroovyAddImportAction |
32,903 | IntentionAction (GrNewExpression parent) { return QuickFixes.EMPTY_ACTION; } | createClassFromNewAction |
32,904 | IntentionAction (GrReferenceElement element, GrCreateClassKind anInterface) { return QuickFixes.EMPTY_ACTION; } | createClassFixAction |
32,905 | IntentionAction (GrReferenceExpression expr) { return QuickFixes.EMPTY_ACTION; } | createCreateFieldFromUsageFix |
32,906 | IntentionAction (GrReferenceExpression expr, PsiClass aClass) { return QuickFixes.EMPTY_ACTION; } | createCreateGetterFromUsageFix |
32,907 | IntentionAction (GrReferenceExpression expr) { return QuickFixes.EMPTY_ACTION; } | createCreateSetterFromUsageFix |
32,908 | IntentionAction (GrReferenceExpression expr) { return QuickFixes.EMPTY_ACTION; } | createCreateMethodFromUsageFix |
32,909 | IntentionAction (GrReferenceExpression expr, GrVariableDeclarationOwner owner) { return QuickFixes.EMPTY_ACTION; } | createCreateLocalVariableFromUsageFix |
32,910 | IntentionAction (GrReferenceExpression expr) { return QuickFixes.EMPTY_ACTION; } | createCreateParameterFromUsageFix |
32,911 | IntentionAction (GrMethodCall parent) { return QuickFixes.EMPTY_ACTION; } | createGroovyStaticImportMethodFix |
32,912 | GroovyFix () { return GroovyFix.EMPTY_FIX; } | createRenameFix |
32,913 | LocalQuickFix () { return GroovyFix.EMPTY_FIX; } | createReplaceWithImportFix |
32,914 | LocalQuickFix (String actual) { return QuickFixes.EMPTY_ACTION; } | createGrMoveToDirFix |
32,915 | LocalQuickFix (GrTypeDefinition element, GrNamedArgument argument) { return QuickFixes.EMPTY_ACTION; } | createCreateFieldFromConstructorLabelFix |
32,916 | LocalQuickFix (GrArgumentLabel label, PsiClass element) { return QuickFixes.EMPTY_ACTION; } | createDynamicPropertyFix |
32,917 | GroovyFix (String methodName, GrTypeDefinition aClass) { return GroovyFix.EMPTY_FIX; } | createAddMethodFix |
32,918 | GroovyFix (GrTypeDefinition aClass, String comparable) { return GroovyFix.EMPTY_FIX; } | createAddClassToExtendsFix |
32,919 | IntentionAction (boolean onTheFly) { return QuickFixes.EMPTY_ACTION; } | createOptimizeImportsFix |
32,920 | IntentionAction (GrParameter parameter) { return QuickFixes.EMPTY_ACTION; } | createRemoveUnusedGrParameterFix |
32,921 | IntentionAction (String reason) { return QuickFixes.EMPTY_ACTION; } | createInvestigateFix |
32,922 | LocalQuickFix (int size) { return GroovyFix.EMPTY_FIX; } | createMultipleAssignmentFix |
32,923 | LocalQuickFix (int size) { return GroovyFix.EMPTY_FIX; } | createSpreadArgumentFix |
32,924 | LocalQuickFix () { return GroovyFix.EMPTY_FIX; } | createMapConstructorFix |
32,925 | LocalQuickFix () { return GroovyFix.EMPTY_FIX; } | createQualifyExpressionFix |
32,926 | LocalQuickFix (List<? extends PsiElement> expressions, GrSwitchElement switchElement) { return null; } | createAddMissingCasesFix |
32,927 | void (@NotNull GrCall call, @NotNull GroovyResolveResult resolveResult, @Nullable String argumentName, boolean forCompletion, @NotNull Map<String, NamedArgumentDescriptor> result) { PsiElement resolve = resolveResult.getElement(); if (!forCompletion || !(resolve instanceof PsiMethod)) return; PsiType returnType = ((PsiMethod)resolve).getReturnType(); if (!(returnType instanceof PsiClassType)) return; Map<String, NamedArgumentDescriptor> map = new HashMap<>(); GroovyConstructorNamedArgumentProvider.processClass(call, (PsiClassType)returnType, argumentName, map); for (String name : map.keySet()) { result.put(name, NamedArgumentDescriptor.SIMPLE_UNLIKELY); } } | getNamedArguments |
32,928 | boolean () { return false; } | useFqClassNames |
32,929 | boolean () { return false; } | useFqClassNamesInJavadoc |
32,930 | int () { return 0; } | staticFieldsOrderWeight |
32,931 | int () { return 0; } | fieldsOrderWeight |
32,932 | int () { return 0; } | staticMethodsOrderWeight |
32,933 | int () { return 0; } | methodsOrderWeight |
32,934 | int () { return 0; } | staticInnerClassesOrderWeight |
32,935 | int () { return 0; } | innerClassesOrderWeight |
32,936 | int () { return 0; } | constructorsOrderWeight |
32,937 | boolean () { return false; } | insertInnerClassImports |
32,938 | void (@NotNull GrCall call, @NotNull GroovyResolveResult resolveResult, @Nullable String argumentName, boolean forCompletion, @NotNull Map<String, NamedArgumentDescriptor> result) { PsiElement resolve = resolveResult.getElement(); if (resolve instanceof GrMethod) { ((GrMethod)resolve).getNamedParameters().forEach((key, value) -> result.putIfAbsent(key, value)); } else if (resolve instanceof GrField) { ((GrField)resolve).getNamedParameters().forEach((key, value) -> result.putIfAbsent(key, value)); } else if (resolve instanceof GrVariable) { GrNamedArgumentSearchVisitor.find((GrVariable)resolve).forEach((key, value) -> result.putIfAbsent(key, value)); } } | getNamedArguments |
32,939 | TreeElement (TreeElement element, final Map<Object, Object> decodingState) { if (element instanceof CompositeElement) { if (element.getElementType() == GroovyElementTypes.REFERENCE_ELEMENT || element.getElementType() == GroovyElementTypes.REFERENCE_EXPRESSION) { GrReferenceElement ref = (GrReferenceElement)SourceTreeToPsiMap.treeElementToPsi(element); final PsiMember refMember = element.getCopyableUserData(REFERENCED_MEMBER_KEY); if (refMember != null) { element.putCopyableUserData(REFERENCED_MEMBER_KEY, null); PsiElement refElement1 = ref.resolve(); if (!refMember.getManager().areElementsEquivalent(refMember, refElement1)) { try { if (!(refMember instanceof PsiClass) || ref.getQualifier() == null) { // can restore only if short (otherwise qualifier should be already restored) ref = (GrReferenceElement)ref.bindToElement(refMember); } } catch (IncorrectOperationException ignored) { } return (TreeElement)SourceTreeToPsiMap.psiElementToTree(ref); } } return element; } } return null; } | decodeInformation |
32,940 | void (final TreeElement element, final ASTNode original, final Map<Object, Object> encodingState) { if (original instanceof CompositeElement && !isInsideImport(original)) { IElementType elementType = original.getElementType(); if (elementType == GroovyElementTypes.REFERENCE_ELEMENT || elementType == GroovyElementTypes.REFERENCE_EXPRESSION) { PsiElement psi = original.getPsi(); Project project = psi.getProject(); if (!PsiUtil.isThisOrSuperRef(psi) && project.isInitialized() && !DumbService.isDumb(project)) { final GroovyResolveResult result = ((GrReferenceElement<?>)psi).advancedResolve(); final PsiElement target = result.getElement(); if (target instanceof PsiClass || (target instanceof PsiMethod || target instanceof PsiField) && ((PsiMember)target).hasModifierProperty(PsiModifier.STATIC) && result.getCurrentFileResolveContext() instanceof GrImportStatement) { element.putCopyableUserData(REFERENCED_MEMBER_KEY, (PsiMember)target); } } } } } | encodeInformation |
32,941 | boolean (ASTNode node) { while (node != null && node.getElementType() == GroovyElementTypes.REFERENCE_ELEMENT) { node = node.getTreeParent(); } return node != null && node.getElementType() == GroovyStubElementTypes.IMPORT; } | isInsideImport |
32,942 | String () { return myDescription.get(); } | getDescription |
32,943 | Language () { return GroovyLanguage.INSTANCE; } | getLanguage |
32,944 | PsiMethod () { return myOriginalAccessor; } | getOriginalAccessor |
32,945 | int () { final int isStatic = hasModifierProperty(PsiModifier.STATIC) ? 1 : 0; final int visibilityModifier; visibilityModifier = getVisibilityCode(); return getName().hashCode() << 3 + isStatic << 2 + visibilityModifier; } | hashCode |
32,946 | int () { int visibilityModifier; if (hasModifierProperty(PsiModifier.PUBLIC)) { visibilityModifier = 3; } else if (hasModifierProperty(PsiModifier.PROTECTED)) { visibilityModifier = 2; } else if (hasModifierProperty(PsiModifier.PRIVATE)) { visibilityModifier = 1; } else { visibilityModifier = 0; } return visibilityModifier; } | getVisibilityCode |
32,947 | String () { return getName(); } | toString |
32,948 | boolean (PsiElement another) { if (!(another instanceof GrPropertyForCompletion)) return false; if (!((GrPropertyForCompletion)another).getName().equals(getName())) return false; if (hasModifierProperty(PsiModifier.STATIC) != ((GrPropertyForCompletion)another).hasModifierProperty(PsiModifier.STATIC)) return false; if (getVisibilityCode() != ((GrPropertyForCompletion)another).getVisibilityCode()) return false; /* final PsiClass containingClass = getContainingClass(); final PsiClass anotherClass = ((GrPropertyForCompletion)another).getContainingClass(); return containingClass == null && anotherClass == null || getManager().areElementsEquivalent(containingClass, anotherClass);*/ return true; } | isEquivalentTo |
32,949 | PsiElement (ASTNode node) { IElementType elem = node.getElementType(); if (elem instanceof GroovyElementType.PsiCreator) { return ((GroovyElementType.PsiCreator)elem).createPsi(node); } if (elem instanceof IGroovyDocElementType) { return GroovyDocPsiCreator.createElement(node); } if (elem == MODIFIER_LIST) return new GrModifierListImpl(node); if (elem == ANNOTATION) return new GrAnnotationImpl(node); if (elem == ANNOTATION_ARGUMENT_LIST) return new GrAnnotationArgumentListImpl(node); if (elem == ANNOTATION_ARRAY_VALUE) return new GrAnnotationArrayInitializerImpl(node); if (elem == ANNOTATION_MEMBER_VALUE_PAIR) return new GrAnnotationNameValuePairImpl(node); // Imports if (elem == IMPORT) return new GrImportStatementImpl(node); if (elem == IMPORT_ALIAS) return new GrImportAliasImpl(node); // Packaging if (elem == PACKAGE_DEFINITION) return new GrPackageDefinitionImpl(node); //statements if (elem == LABELED_STATEMENT) return new GrLabeledStatementImpl(node); if (elem == IF_STATEMENT) return new GrIfStatementImpl(node); if (elem == FOR_STATEMENT) return new GrForStatementImpl(node); if (elem == FOR_IN_CLAUSE) return new GrForInClauseImpl(node); if (elem == TRADITIONAL_FOR_CLAUSE) return new GrTraditionalForClauseImpl(node); if (elem == EXPRESSION_LIST) return new GrExpressionListImpl(node); if (elem == WHILE_STATEMENT) return new GrWhileStatementImpl(node); if (elem == DO_WHILE_STATEMENT) return new GrDoWhileStatementImpl(node); if (elem == TRY_STATEMENT) return new GrTryCatchStatementImpl(node); if (elem == TRY_RESOURCE_LIST) return new GrTryResourceListImpl(node); if (elem == CATCH_CLAUSE) return new GrCatchClauseImpl(node); if (elem == FINALLY_CLAUSE) return new GrFinallyClauseImpl(node); if (elem == SYNCHRONIZED_STATEMENT) return new GrSynchronizedStatementImpl(node); if (elem == SWITCH_STATEMENT) return new GrSwitchStatementImpl(node); if (elem == CASE_SECTION) return new GrCaseSectionImpl(node); if (elem == VARIABLE_DECLARATION) return new GrVariableDeclarationImpl(node); if (elem == TUPLE) return new GrTupleImpl(node); if (elem == VARIABLE) return new GrVariableImpl(node); //type definitions if (elem == CLASS_TYPE_DEFINITION) return new GrClassDefinitionImpl(node); if (elem == INTERFACE_TYPE_DEFINITION) return new GrInterfaceDefinitionImpl(node); if (elem == ENUM_TYPE_DEFINITION) return new GrEnumTypeDefinitionImpl(node); if (elem == ANNOTATION_TYPE_DEFINITION) return new GrAnnotationTypeDefinitionImpl(node); if (elem == TRAIT_TYPE_DEFINITION) return new GrTraitTypeDefinitionImpl(node); if (elem == RECORD_TYPE_DEFINITION) return new GrRecordDefinitionImpl(node); if (elem == ANNOTATION_METHOD) return new GrAnnotationMethodImpl(node); if (elem == ANONYMOUS_TYPE_DEFINITION) return new GrAnonymousClassDefinitionImpl(node); if (elem == CODE_REFERENCE) return new GrCodeReferenceElementImpl(node); //clauses if (elem == EXTENDS_CLAUSE) return new GrExtendsClauseImpl(node); if (elem == IMPLEMENTS_CLAUSE) return new GrImplementsClauseImpl(node); if (elem == PERMITS_CLAUSE) return new GrPermitsClauseImpl(node); if (elem == THROWS_CLAUSE) return new GrThrowsClauseImpl(node); //bodies if (elem == CLASS_BODY) return new GrTypeDefinitionBodyBase.GrClassBody(node); if (elem == ENUM_BODY) return new GrTypeDefinitionBodyBase.GrEnumBody(node); if (elem == BLOCK_STATEMENT) return new GrBlockStatementImpl(node); if (elem == CONSTRUCTOR_CALL_EXPRESSION) return new GrConstructorInvocationImpl(node); //enum if (elem == ENUM_CONSTANTS) return new GrEnumConstantListImpl(node); if (elem == ENUM_CONSTANT) return new GrEnumConstantImpl(node); //members if (elem == CLASS_INITIALIZER) return new GrClassInitializerImpl(node); if (elem == FIELD) return new GrFieldImpl(node); if (elem == CONSTRUCTOR) return new GrConstructorImpl(node); if (elem == METHOD) return new GrMethodImpl(node); //parameters if (elem == PARAMETER_LIST) return new GrParameterListImpl(node); if (elem == PARAMETER) return new GrParameterImpl(node); //type parameters if (elem == TYPE_PARAMETER_LIST) return new GrTypeParameterListImpl(node); if (elem == TYPE_PARAMETER) return new GrTypeParameterImpl(node); if (elem == TYPE_PARAMETER_BOUNDS_LIST) return new GrTypeParameterParameterExtendsListImpl(node); if (elem == TYPE_ARGUMENT_LIST) return new GrTypeArgumentListImpl(node); // types if (elem == PRIMITIVE_TYPE_ELEMENT) return new GrBuiltInTypeElementImpl(node); if (elem == CLASS_TYPE_ELEMENT) return new GrClassTypeElementImpl(node); if (elem == ARRAY_TYPE_ELEMENT) return new GrArrayTypeElementImpl(node); if (elem == DISJUNCTION_TYPE_ELEMENT) return new GrDisjunctionTypeElementImpl(node); if (elem == WILDCARD_TYPE_ELEMENT) return new GrWildcardTypeArgumentImpl(node); //Branch statements if (elem == RETURN_STATEMENT) return new GrReturnStatementImpl(node); if (elem == YIELD_STATEMENT) return new GrYieldStatementImpl(node); if (elem == THROW_STATEMENT) return new GrThrowStatementImpl(node); if (elem == ASSERT_STATEMENT) return new GrAssertStatementImpl(node); if (elem == BREAK_STATEMENT) return new GrBreakStatementImpl(node); if (elem == CONTINUE_STATEMENT) return new GrContinueStatementImpl(node); //expressions if (elem == LITERAL) return new GrLiteralImpl(node); if (elem == LIST_OR_MAP) return new GrListOrMapImpl(node); if (elem == ASSIGNMENT_EXPRESSION) return new GrAssignmentExpressionImpl(node); if (elem == TUPLE_ASSIGNMENT_EXPRESSION) return new GrTupleAssignmentExpressionImpl(node); if (elem == TERNARY_EXPRESSION) return new GrConditionalExprImpl(node); if (elem == ELVIS_EXPRESSION) return new GrElvisExprImpl(node); if (elem == LOR_EXPRESSION) return new GrLogicalExpressionImpl(node); if (elem == LAND_EXPRESSION) return new GrLogicalExpressionImpl(node); if (elem == XOR_EXPRESSION) return new GrBitwiseExpressionImpl(node); if (elem == BOR_EXPRESSION) return new GrBitwiseExpressionImpl(node); if (elem == BAND_EXPRESSION) return new GrBitwiseExpressionImpl(node); if (elem == REGEX_MATCH_EXPRESSION) return new GrLogicalExpressionImpl(node); if (elem == REGEX_FIND_EXPRESSION) return new GrRegexFindExpressionImpl(node); if (elem == EQUALITY_EXPRESSION) return new GrRelationalExpressionImpl(node); if (elem == RELATIONAL_EXPRESSION) return new GrRelationalExpressionImpl(node); if (elem == IN_EXPRESSION) return new GrInExpressionImpl(node); if (elem == SHIFT_EXPRESSION) return new GrShiftExpressionImpl(node); if (elem == RANGE_EXPRESSION) return new GrRangeExpressionImpl(node); if (elem == ADDITIVE_EXPRESSION) return new GrAdditiveExpressionImpl(node); if (elem == MULTIPLICATIVE_EXPRESSION) return new GrMultiplicativeExpressionImpl(node); if (elem == POWER_EXPRESSION) return new GrPowerExpressionImpl(node); if (elem == UNARY_EXPRESSION) return new GrUnaryExpressionImpl(node); if (elem == CAST_EXPRESSION) return new GrTypeCastExpressionImpl(node); if (elem == AS_EXPRESSION) return new GrSafeCastExpressionImpl(node); if (elem == INSTANCEOF_EXPRESSION) return new GrInstanceofExpressionImpl(node); if (elem == BUILT_IN_TYPE_EXPRESSION) return new GrBuiltinTypeClassExpressionImpl(node); if (elem == GSTRING) return new GrStringImpl(node); if (elem == REGEX) return new GrRegexImpl(node); if (elem == STRING_INJECTION) return new GrStringInjectionImpl(node); if (elem == STRING_CONTENT) return new GrStringContentImpl(node); if (elem == PARENTHESIZED_EXPRESSION) return new GrParenthesizedExpressionImpl(node); if (elem == NEW_EXPRESSION) return new GrNewExpressionImpl(node); if (elem == ENUM_CONSTANT_INITIALIZER) return new GrEnumConstantInitializerImpl(node); if (elem == ARRAY_DECLARATION) return new GrArrayDeclarationImpl(node); if (elem == ARRAY_INITIALIZER) return new GrArrayInitializerImpl(node); if (elem == LAMBDA_EXPRESSION) return new GrLambdaExpressionImpl(node); if (elem == EXPRESSION_LAMBDA_BODY) return new GrExpressionLambdaBodyImpl(node); if (elem == SWITCH_EXPRESSION) return new GrSwitchExpressionImpl(node); //Paths if (elem == REFERENCE_EXPRESSION) return new GrReferenceExpressionImpl(node); if (elem == ATTRIBUTE_EXPRESSION) return new GrAttributeExpressionImpl(node); if (elem == METHOD_REFERENCE_EXPRESSION) return new GrMethodReferenceExpressionImpl(node); if (elem == PROPERTY_EXPRESSION) return new GrPropertySelectionImpl(node); if (elem == METHOD_CALL_EXPRESSION) return new GrMethodCallExpressionImpl(node); if (elem == INDEX_EXPRESSION) return new GrIndexPropertyImpl(node); if (elem == APPLICATION_INDEX) return new GrIndexPropertyImpl(node); if (elem == APPLICATION_EXPRESSION) return new GrApplicationStatementImpl(node); if (elem == APPLICATION_ARGUMENT_LIST) return new GrCommandArgumentListImpl(node); // Arguments if (elem == ARGUMENT_LIST) return new GrArgumentListImpl(node); if (elem == NAMED_ARGUMENT) return new GrNamedArgumentImpl(node); if (elem == SPREAD_LIST_ARGUMENT) return new GrSpreadArgumentImpl(node); if (elem == ARGUMENT_LABEL) return new GrArgumentLabelImpl(node); if (elem == SLASHY_LITERAL) return new GroovyASTPsiElementImpl(node); if (elem == DOLLAR_SLASHY_LITERAL) return new GroovyASTPsiElementImpl(node); return new ASTWrapperPsiElement(node); } | createElement |
32,950 | GrBlockImpl (CharSequence text) { return new GrClosableBlockImpl(this, text); } | createNode |
32,951 | GrBlockImpl (CharSequence text) { return new GrOpenBlockImpl(this, text); } | createNode |
32,952 | boolean () { return false; } | parseDeep |
32,953 | boolean (@Nullable final IElementType tokenType) { return false; } | isExtendedSeparator |
32,954 | boolean (PsiBuilder builder) { return false; } | parseExtendedStatement |
32,955 | void (PsiBuilder b) { b = adapt_builder_(CODE_REFERENCE, b, this, EXTENDS_SETS_); doc_reference(b, 0); } | parseDocReference |
32,956 | GrBlockImpl (CharSequence text) { return new GrBlockLambdaBodyImpl(this, text); } | createNode |
32,957 | ASTNode () { return createNode(null); } | createCompositeNode |
32,958 | boolean (@NotNull CharSequence buffer, @NotNull Language fileLanguage, @NotNull Project project) { return GroovyParserUtils.isBlockParseable(buffer); } | isParsable |
32,959 | boolean () { return isInsideSwitch; } | isInsideSwitch |
32,960 | GrEnumDefinitionBody (@NotNull EmptyStub stub) { return new GrTypeDefinitionBodyBase.GrEnumBody(stub); } | createPsi |
32,961 | Lexer (Project project) { return new GroovyLexer(); } | createLexer |
32,962 | PsiParser (Project project) { return new GroovyParser(); } | createParser |
32,963 | IFileElementType () { return GROOVY_FILE; } | getFileNodeType |
32,964 | TokenSet () { return TokenSets.COMMENTS_TOKEN_SET; } | getCommentTokens |
32,965 | TokenSet () { return TokenSets.STRING_LITERALS; } | getStringLiteralElements |
32,966 | PsiElement (ASTNode node) { return GroovyPsiCreator.createElement(node); } | createElement |
32,967 | PsiFile (@NotNull FileViewProvider viewProvider) { return new GroovyFileImpl(viewProvider); } | createFile |
32,968 | SpaceRequirements (ASTNode left, ASTNode right) { final IElementType lType = left.getElementType(); final IElementType rType = right.getElementType(); if (rType == GroovyTokenTypes.kIMPORT && lType != TokenType.WHITE_SPACE) { return SpaceRequirements.MUST_LINE_BREAK; } else if (lType == MODIFIER_LIST && rType == MODIFIER_LIST) { return SpaceRequirements.MUST; } if (lType == GroovyTokenTypes.mSEMI) { return SpaceRequirements.MAY; } if (lType == GroovyTokenTypes.mSL_COMMENT) { return SpaceRequirements.MUST_LINE_BREAK; } if (lType == GroovyTokenTypes.mNLS || lType == GroovyDocTokenTypes.mGDOC_COMMENT_START) { return SpaceRequirements.MAY; } if (lType == GroovyTokenTypes.mGT) return SpaceRequirements.MUST; if (rType == GroovyTokenTypes.mLT) return SpaceRequirements.MUST; final ASTNode parent = TreeUtil.findCommonParent(left, right); if (parent == null || ArrayUtil.contains(parent.getElementType(), GSTRING, REGEX, GSTRING_INJECTION, GroovyTokenTypes.mREGEX_LITERAL, GroovyTokenTypes.mDOLLAR_SLASH_REGEX_LITERAL)) { return SpaceRequirements.MUST_NOT; } return LanguageUtil.canStickTokensTogetherByLexer(left, right, new GroovyLexer()); } | spaceExistenceTypeBetweenTokens |
32,969 | GrBlockImpl (CharSequence text) { return new GrOpenBlockImpl(this, text); } | createNode |
32,970 | void (PsiBuilder builder, IElementType elem, @ParsingError String errorMsg) { if (elem.equals(builder.getTokenType())) { builder.advanceLexer(); } else if (errorMsg != null) { builder.error(errorMsg); } } | getToken |
32,971 | boolean (PsiBuilder builder, IElementType elem) { if (elem.equals(builder.getTokenType())) { builder.advanceLexer(); return true; } return false; } | getToken |
32,972 | boolean (PsiBuilder builder, IElementType element1, IElementType element2) { if (element1 != builder.getTokenType()) return false; Marker rb = builder.mark(); builder.advanceLexer(); boolean res = (!builder.eof() && element2 == builder.getTokenType()); rb.rollbackTo(); return res; } | lookAhead |
32,973 | GrBlockElementType (String debugName) { return new GrBlockElementType(debugName, true); } | getSwitchAwareBlockElementType |
32,974 | GrBlockLambdaBodyElementType (String debugName) { return new GrBlockLambdaBodyElementType(debugName, true); } | getSwitchAwareLambdaBlockElementType |
32,975 | GrClosureElementType (String debugName) { return new GrClosureElementType(debugName, true); } | getSwitchAwareClosureBlockElementType |
32,976 | boolean (GrClosableBlock closure, PsiScopeProcessor processor, GrReferenceExpression refExpr, ResolveState state) { PsiElement parent = closure.getParent(); if (parent instanceof GrArgumentList) parent = parent.getParent(); if (!(parent instanceof GrMethodCall)) return true; PsiMethod psiMethod = ((GrMethodCall)parent).resolveMethod(); if (psiMethod == null) return true; List<GroovyMethodInfo> infos = GroovyMethodInfo.getInfos(psiMethod); if (infos.isEmpty()) return true; int index = PsiUtil.getArgumentIndex((GrMethodCall)parent, closure); if (index == -1) return true; for (GroovyMethodInfo info : infos) { GroovyMethodDescriptor.ClosureArgument[] closureArguments = info.getDescriptor().myClosureArguments; if (closureArguments != null) { for (GroovyMethodDescriptor.ClosureArgument argument : closureArguments) { if (argument.index == index && argument.methodContributor != null) { ClosureMissingMethodContributor instance = SingletonInstancesCache.getInstance(argument.methodContributor, info.getPluginClassLoader()); if (!instance.processMembers(closure, processor, refExpr, state)) return false; } } } } return true; } | processMembers |
32,977 | Boolean (@NotNull GroovyMethodResult result1, @NotNull GroovyMethodResult result2, @NotNull Context context) { for (GrMethodComparator comparator : EP_NAME.getExtensions()) { Boolean result = comparator.dominated(result1, result2, context); if (result != null) { return result; } } return true; } | checkDominated |
32,978 | int (@NotNull GroovyMethodResult result1, @NotNull GroovyMethodResult result2, @NotNull Context context) { final PsiMethod method1 = result1.getElement(); final PsiMethod method2 = result2.getElement(); if (!method1.getName().equals(method2.getName())) return 0; boolean firstIsPreferable = checkDominated(result2, result1, context); boolean secondIsPreferable = checkDominated(result1, result2, context); if (firstIsPreferable == secondIsPreferable) { if (method1 instanceof GrGdkMethod && !(method2 instanceof GrGdkMethod)) { return 1; } if (!(method1 instanceof GrGdkMethod) && method2 instanceof GrGdkMethod) { return -1; } if (secondIsPreferable) { return 1; } else { return 0; } } else if (firstIsPreferable) { return -1; } else { return 1; } } | compareMethods |
32,979 | GlobalSearchScope (@NotNull VirtualFile file, @NotNull Project project) { FileType fileType = file.getFileType(); if (!(fileType instanceof LanguageFileType) || ((LanguageFileType)fileType).getLanguage() != GroovyLanguage.INSTANCE) { return null; } ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); Module module = projectFileIndex.getModuleForFile(file); if (module == null) return null; //groovy files are only in modules boolean includeTests = projectFileIndex.isInTestSourceContent(file) || !projectFileIndex.isInSourceContent(file); final GlobalSearchScope scope; if (projectFileIndex.isUnderSourceRootOfType(file, JavaModuleSourceRootTypes.RESOURCES)) { scope = GlobalSearchScope.moduleRuntimeScope(module, includeTests); } else { scope = GlobalSearchScope.moduleWithDependenciesAndLibrariesScope(module, includeTests); } final PsiFile psi = PsiManager.getInstance(project).findFile(file); if (psi instanceof GroovyFile && ((GroovyFile)psi).isScript()) { return GroovyScriptTypeDetector.patchResolveScope((GroovyFile)psi, scope); } else { return scope; } } | getResolveScope |
32,980 | boolean (GrReferenceExpression ref, PsiScopeProcessor processor) { if (!ResolveUtilKt.shouldProcessMethods(processor)) return true; for (PsiElement e = ref.getContext(); e != null; e = e.getContext()) { if (e instanceof GrClosableBlock) { ResolveState state = ResolveState.initial().put(ClassHint.RESOLVE_CONTEXT, e); for (ClosureMissingMethodContributor contributor : EP_NAME.getExtensions()) { if (!contributor.processMembers((GrClosableBlock)e, processor, ref, state)) { return false; } } } } return true; } | processMethodsFromClosures |
32,981 | Boolean (@NotNull GroovyMethodResult result1, @NotNull GroovyMethodResult result2, @NotNull Context context) { final PsiMethod method1 = result1.getElement(); final PsiSubstitutor substitutor1 = result1.getContextSubstitutor(); final PsiElement resolveContext1 = result1.getCurrentFileResolveContext(); final PsiMethod method2 = result2.getElement(); final PsiSubstitutor substitutor2 = result2.getContextSubstitutor(); final PsiElement resolveContext2 = result2.getCurrentFileResolveContext(); final List<Argument> arguments = context.getArguments(); if (context.isConstructor() && arguments != null && arguments.size() == 1) { if (method1.getParameterList().isEmpty()) return true; if (method2.getParameterList().isEmpty()) return false; } PsiParameter[] params1 = method1.getParameterList().getParameters(); PsiParameter[] params2 = method2.getParameterList().getParameters(); if (arguments != null && arguments.size() == 0) { if (params2.length == 1 && params2[0].getType() instanceof PsiArrayType) return true; } if (arguments == null && params1.length != params2.length) return false; if (params1.length < params2.length) { PsiParameter last = ArrayUtil.getLastElement(params1); return last != null && last.getType() instanceof PsiArrayType; } else if (params1.length > params2.length) { PsiParameter last = ArrayUtil.getLastElement(params2); return !(last != null && last.getType() instanceof PsiArrayType); } final PsiElement myPlace = context.getPlace(); for (int i = 0; i < params2.length; i++) { final PsiType pType1 = params1[i].getType(); final PsiType pType2 = params2[i].getType(); PsiType type1 = substitutor1.substitute(pType1); PsiType type2 = substitutor2.substitute(pType2); if (arguments != null && arguments.size() > i) { PsiType argType = arguments.get(i).getType(); if (argType != null) { final boolean converts1 = TypesUtil.isAssignableWithoutConversions(TypeConversionUtil.erasure(type1), argType); final boolean converts2 = TypesUtil.isAssignableWithoutConversions(TypeConversionUtil.erasure(type2), argType); if (converts1 != converts2) { return converts2; } // see groovy.lang.GroovyCallable if (TypesUtil.resolvesTo(type1, CommonClassNames.JAVA_UTIL_CONCURRENT_CALLABLE) && TypesUtil.resolvesTo(type2, CommonClassNames.JAVA_LANG_RUNNABLE)) { if (InheritanceUtil.isInheritor(argType, GroovyCommonClassNames.GROOVY_LANG_GROOVY_CALLABLE)) return true; } } } if (!typesAgree(TypeConversionUtil.erasure(pType1), TypeConversionUtil.erasure(pType2), context)) return false; if (resolveContext1 != null && resolveContext2 == null) { return !(TypesUtil.resolvesTo(type1, CommonClassNames.JAVA_LANG_OBJECT) && TypesUtil.resolvesTo(type2, CommonClassNames.JAVA_LANG_OBJECT)); } if (resolveContext1 == null && resolveContext2 != null) { return true; } } if (!(method1 instanceof SyntheticElement) && !(method2 instanceof SyntheticElement)) { final PsiType returnType1 = substitutor1.substitute(method1.getReturnType()); final PsiType returnType2 = substitutor2.substitute(method2.getReturnType()); if (!TypesUtil.isAssignableWithoutConversions(returnType1, returnType2) && TypesUtil.isAssignableWithoutConversions(returnType2, returnType1)) { return false; } } if (method1 instanceof GrGdkMethod && method2 instanceof GrGdkMethod) { PsiType firstReceiverType = ((GrGdkMethod)method1).getReceiverType(); PsiType secondReceiverType = ((GrGdkMethod)method2).getReceiverType(); if (!typesAgree(TypeConversionUtil.erasure(firstReceiverType), TypeConversionUtil.erasure(secondReceiverType), context)) return false; } return true; } | dominated |
32,982 | boolean (@NotNull PsiType type1, @NotNull PsiType type2, @NotNull Context context) { final boolean hasArguments = context.getArguments() != null; return hasArguments ? //resolve, otherwise same_name_variants TypesUtil.isAssignableWithoutConversions(type1, type2) : type1.equals(type2); } | typesAgree |
32,983 | ClassMembers (@NotNull PsiClass aClass, boolean includeSynthetic) { CachedValue<ClassMembers> cached = aClass.getUserData(getMemberCacheKey(includeSynthetic)); if (cached != null && cached.hasUpToDateValue()) { return cached.getValue(); } return buildCache(aClass, includeSynthetic && checkClass(aClass)); } | getCachedMembers |
32,984 | boolean (@NotNull PsiClass aClass) { Set<PsiClass> visited = new HashSet<>(); Queue<PsiClass> queue = ContainerUtil.newLinkedList(aClass); while (!queue.isEmpty()) { PsiClass current = queue.remove(); if (current instanceof ClsClassImpl) continue; if (visited.add(current)) { for (PsiClass superClass : getSupers(current, false)) { queue.offer(superClass); } } else if (!current.isInterface() && !CommonClassNames.JAVA_LANG_OBJECT.equals(current.getQualifiedName())) { return false; } } return true; } | checkClass |
32,985 | ClassMembers (@NotNull final PsiClass aClass, final boolean includeSynthetic) { return CachedValuesManager.getCachedValue(aClass, getMemberCacheKey(includeSynthetic), () -> { ClassMembers result = new ClassMembers(); processClass(aClass, result.fields, result.methods, result.innerClasses, new HashSet<>(), PsiSubstitutor.EMPTY, includeSynthetic); return CachedValueProvider.Result.create(result, PsiModificationTracker.MODIFICATION_COUNT); }); } | buildCache |
32,986 | Key<CachedValue<ClassMembers>> (boolean includeSynthetic) { return includeSynthetic ? CACHED_MEMBERS_INCLUDING_SYNTHETIC : CACHED_MEMBERS; } | getMemberCacheKey |
32,987 | void (@NotNull PsiClass aClass, @NotNull Map<String, CandidateInfo> allFields, @NotNull Map<String, List<CandidateInfo>> allMethods, @NotNull Map<String, CandidateInfo> allInnerClasses, @NotNull Set<? super PsiClass> visitedClasses, @NotNull PsiSubstitutor substitutor, boolean includeSynthetic) { PsiUtilCore.ensureValid(aClass); if (!visitedClasses.add(aClass)) return; if (visitedClasses.size() == 1 || !GrTraitUtil.isTrait(aClass)) { for (PsiField field : getFields(aClass, includeSynthetic)) { String name = field.getName(); if (!allFields.containsKey(name)) { allFields.put(name, new CandidateInfo(field, substitutor)); } } } for (PsiMethod method : getMethods(aClass, includeSynthetic)) { addMethod(allMethods, method, substitutor); } for (final PsiClass inner : getInnerClasses(aClass, includeSynthetic)) { final String name = inner.getName(); if (name != null && !allInnerClasses.containsKey(name)) { allInnerClasses.put(name, new CandidateInfo(inner, substitutor)); } } for (PsiClass superClass : getSupers(aClass, includeSynthetic)) { final PsiSubstitutor superSubstitutor = includeSynthetic ? TypeConversionUtil.getSuperClassSubstitutor(superClass, aClass, substitutor) : PsiSubstitutor.EMPTY; processClass(superClass, allFields, allMethods, allInnerClasses, visitedClasses, superSubstitutor, includeSynthetic); } } | processClass |
32,988 | boolean (@NotNull PsiField field) { if (field instanceof GrField) { final GrModifierList list = (GrModifierList)field.getModifierList(); return list == null || list.hasExplicitVisibilityModifiers(); } else { return true; } } | hasExplicitVisibilityModifiers |
32,989 | void (@NotNull Map<String, List<CandidateInfo>> allMethods, @NotNull PsiMethod method, @NotNull PsiSubstitutor substitutor) { String name = method.getName(); List<CandidateInfo> methods = allMethods.get(name); if (methods == null) { methods = new ArrayList<>(); allMethods.put(name, methods); } methods.add(new CandidateInfo(method, substitutor)); } | addMethod |
32,990 | void (String className, GdslMembersHolderConsumer consumer) { processCategoryMethods(className, consumer, false); } | category |
32,991 | void (String className, final boolean isStatic, GdslMembersHolderConsumer consumer) { processCategoryMethods(className, consumer, isStatic); } | category |
32,992 | void (final String className, final GdslMembersHolderConsumer consumer, final boolean isStatic) { final GlobalSearchScope scope = consumer.getResolveScope(); final PsiClass categoryClass = JavaPsiFacade.getInstance(consumer.getProject()).findClass(className, scope); if (categoryClass == null) { return; } NotNullLazyValue<GdkMethodHolder> methodsMap = NotNullLazyValue.volatileLazy(() -> { return GdkMethodHolder.getHolderForClass(categoryClass, isStatic); }); consumer.addMemberHolder(new CustomMembersHolder() { @Override public boolean processMembers(GroovyClassDescriptor descriptor, PsiScopeProcessor processor, ResolveState state) { return !ResolveUtil.shouldProcessMethods(processor.getHint(ElementClassHint.KEY)) || methodsMap.getValue().processMethods(processor, state, descriptor.getPsiType(), descriptor.getProject()); } @Override public void consumeClosureDescriptors(GroovyClassDescriptor descriptor, Consumer<? super ClosureDescriptor> consumer) {} }); } | processCategoryMethods |
32,993 | boolean (GroovyClassDescriptor descriptor, PsiScopeProcessor processor, ResolveState state) { return !ResolveUtil.shouldProcessMethods(processor.getHint(ElementClassHint.KEY)) || methodsMap.getValue().processMethods(processor, state, descriptor.getPsiType(), descriptor.getProject()); } | processMembers |
32,994 | void (GroovyClassDescriptor descriptor, Consumer<? super ClosureDescriptor> consumer) {} | consumeClosureDescriptors |
32,995 | boolean (@NotNull PsiElement place, @NotNull PsiScopeProcessor processor, boolean processNonCodeMembers) { return ResolveUtilKt.treeWalkUp(place, processor, initialState(processNonCodeMembers)); } | treeWalkUp |
32,996 | boolean (final @NotNull PsiElement place, final @NotNull PsiElement originalPlace, final @NotNull PsiScopeProcessor processor, final @NotNull ResolveState state) { PsiElement maxScope = null; if (ResolveUtilKt.processNonCodeMembers(state)) { maxScope = PsiTreeUtil.getParentOfType(place, GrFunctionalExpression.class); } return PsiTreeUtil.treeWalkUp(place, maxScope, (scope, lastParent) -> { ProgressManager.checkCanceled(); if (!doProcessDeclarations(originalPlace, lastParent, scope, substituteProcessor(processor, scope), state)) { return false; } issueLevelChangeEvents(processor, scope); return true; }); } | treeWalkUp |
32,997 | boolean (@NotNull PsiElement place, @Nullable PsiElement lastParent, @NotNull PsiElement scope, @NotNull PsiScopeProcessor processor, @NotNull ResolveState state) { boolean processNonCodeMembers = ResolveUtilKt.processNonCodeMembers(state); if (scope instanceof GrFunctionalExpression && processNonCodeMembers) { if (!processDeclarationsWithCallsite((GrFunctionalExpression)scope, processor, state, lastParent, place)) return false; } else { if (scope instanceof PsiClass) { if (!processClassDeclarations((PsiClass)scope, processor, state, lastParent, place)) return false; } else { if (!scope.processDeclarations(processor, state, lastParent, place)) return false; } if (scope instanceof GrTypeDefinition) { if (!processStaticImports(processor, place.getContainingFile(), state, place)) return false; } } if (processNonCodeMembers) { if (!processScopeNonCodeMembers(place, lastParent, processor, scope, state)) return false; } return true; } | doProcessDeclarations |
32,998 | void (PsiScopeProcessor processor, PsiElement run) { processor.handleEvent(JavaScopeProcessorEvent.CHANGE_LEVEL, null); if (run instanceof GrFunctionalExpression && GrClosableBlock.OWNER_NAME.equals(getNameHint(processor)) || run instanceof PsiClass && !(run instanceof PsiAnonymousClass) || run instanceof GrMethod && run.getParent() instanceof GroovyFile) { processor.handleEvent(DECLARATION_SCOPE_PASSED, run); } } | issueLevelChangeEvents |
32,999 | PsiScopeProcessor (PsiScopeProcessor processor, PsiElement scope) { //hack for walking up in java code //java's processDeclarations don't check names so we should do it manually if (scope.getLanguage() != GroovyLanguage.INSTANCE && processor.getHint(NameHint.KEY) != null) { return new JavaResolverProcessor(processor); } return processor; } | substituteProcessor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.