Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
37,400 | void (@NotNull GrDocComment comment) { String text = comment.getText(); if (!text.endsWith("*/")) { TextRange range = comment.getTextRange(); myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("doc.end.expected")).range(new TextRange(range.getEndOffset() - 1, range.getEndOffset())).create(); } } | visitDocComment |
37,401 | void (@NotNull GrVariableDeclaration variableDeclaration) { checkDuplicateModifiers(myHolder, variableDeclaration.getModifierList(), null); if (variableDeclaration.isTuple()) { final GrModifierList list = variableDeclaration.getModifierList(); final PsiElement last = PsiUtil.skipWhitespacesAndComments(list.getLastChild... | visitVariableDeclaration |
37,402 | boolean (List<PsiType> usedExceptions, GrParameter parameter, GrTypeElement typeElement, PsiType type) { for (PsiType exception : usedExceptions) { if (exception.isAssignableFrom(type)) { myHolder.newAnnotation(HighlightSeverity.WARNING, GroovyBundle.message("exception.0.has.already.been.caught", type.getCanonicalText(... | checkExceptionUsed |
37,403 | void (@NotNull final GrReferenceExpression referenceExpression) { checkStringNameIdentifier(referenceExpression); checkThisOrSuperReferenceExpression(referenceExpression, myHolder); checkFinalFieldAccess(referenceExpression); checkFinalParameterAccess(referenceExpression); if (ResolveUtil.isKeyOfMap(referenceExpression... | visitReferenceExpression |
37,404 | void (GrReferenceExpression ref) { final PsiElement resolved = ref.resolve(); if (resolved instanceof GrParameter parameter) { if (parameter.isPhysical() && parameter.hasModifierProperty(PsiModifier.FINAL) && PsiUtil.isLValue(ref)) { if (parameter.getDeclarationScope() instanceof PsiMethod) { myHolder.newAnnotation(Hig... | checkFinalParameterAccess |
37,405 | void (@NotNull GrReferenceExpression ref) { final PsiElement resolved = ref.resolve(); if (resolved instanceof GrField field && resolved.isPhysical() && ((GrField)resolved).hasModifierProperty(PsiModifier.FINAL) && PsiUtil.isLValue(ref)) { final PsiClass containingClass = field.getContainingClass(); if (containingClass... | checkFinalFieldAccess |
37,406 | void (GrReferenceExpression ref) { final PsiElement nameElement = ref.getReferenceNameElement(); if (nameElement == null) return; final IElementType elementType = nameElement.getNode().getElementType(); if (GroovyTokenSets.STRING_LITERALS.contains(elementType)) { checkStringLiteral(nameElement); } else if (elementType ... | checkStringNameIdentifier |
37,407 | void (@NotNull GrTypeDefinition typeDefinition) { final PsiElement parent = typeDefinition.getParent(); if (!(typeDefinition.isAnonymous() || parent instanceof GrTypeDefinitionBody || parent instanceof GroovyFile || typeDefinition instanceof GrTypeParameter)) { final TextRange range = GrHighlightUtil.getClassHeaderText... | visitTypeDefinition |
37,408 | void (AnnotationHolder holder, GrTypeDefinition definition) { if (!(definition instanceof GrClassDefinition)) return; List<PsiClass> selfTypeClasses = GrTraitUtil.getSelfTypeClasses(definition); for (PsiClass selfClass : selfTypeClasses) { if (InheritanceUtil.isInheritorOrSelf(definition, selfClass, true)) continue; St... | checkInheritorOfSelfTypes |
37,409 | void (AnnotationHolder holder, GrMethod[] methods) { MultiMap<String, GrMethod> map = MultiMap.create(); for (GrMethod method : methods) { if (!method.isConstructor()) { map.putValue(method.getName(), method); } } for (Map.Entry<String, Collection<GrMethod>> entry : map.entrySet()) { Collection<GrMethod> collection = e... | checkSameNameMethodsWithDifferentAccessModifiers |
37,410 | boolean (Collection<GrMethod> collection) { Iterator<GrMethod> iterator = collection.iterator(); GrMethod method = iterator.next(); boolean privateAccess = PsiModifier.PRIVATE.equals(VisibilityUtil.getVisibilityModifier(method.getModifierList())); while (iterator.hasNext()) { GrMethod next = iterator.next(); if (privat... | sameAccessModifier |
37,411 | void (AnnotationHolder holder, GrTypeDefinition definition) { if (definition.isAnnotationType() && GrAnnotationCollector.findAnnotationCollector(definition) != null && definition.getCodeMethods().length > 0) { holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("annotation.collector.cannot.have.attribute... | checkAnnotationCollector |
37,412 | void (@NotNull AnnotationHolder holder, @NotNull GrTypeDefinition typeDefinition) { if (typeDefinition.isEnum() || typeDefinition.isInterface() || typeDefinition.isAnonymous() || typeDefinition instanceof GrTypeParameter) return; final PsiClass superClass = typeDefinition.getSuperClass(); if (superClass == null) return... | checkConstructors |
37,413 | void (@NotNull GrCallExpression callExpression) { if (callExpression.resolveMethod() == null && callExpression.getFirstChild() instanceof GrLiteral && callExpression.getExpressionArguments().length > 0 && callExpression.getExpressionArguments()[0] instanceof GrLiteral) { myHolder.newAnnotation(HighlightSeverity.WEAK_WA... | visitCallExpression |
37,414 | void (@NotNull AnnotationHolder holder, @NotNull GrTypeDefinition typeDefinition, @NotNull PsiClass superClass, PsiMethod @NotNull[] constructors) { PsiMethod defConstructor = getDefaultConstructor(superClass); boolean needExplicitSuperCall = superClass.getConstructors().length != 0 && (defConstructor == null || !PsiUt... | checkDefaultConstructors |
37,415 | void (@NotNull GrEnumConstant enumConstant) { super.visitEnumConstant(enumConstant); final GrArgumentList argumentList = enumConstant.getArgumentList(); if (argumentList != null && PsiImplUtil.hasNamedArguments(argumentList) && !PsiImplUtil.hasExpressionArguments(argumentList)) { final PsiMethod constructor = enumConst... | visitEnumConstant |
37,416 | void (AnnotationHolder holder, PsiMethod @NotNull[] constructors) { Map<PsiMethod, PsiMethod> nodes = new HashMap<>(constructors.length); Set<PsiMethod> set = Set.of(constructors); for (PsiMethod constructor : constructors) { if (!(constructor instanceof GrMethod)) continue; final GrOpenBlock block = ((GrMethod)constru... | checkRecursiveConstructors |
37,417 | void (@NotNull GrUnaryExpression expression) { if (expression.getOperationTokenType() == GroovyTokenTypes.mINC || expression.getOperationTokenType() == GroovyTokenTypes.mDEC) { GrExpression operand = expression.getOperand(); if (operand instanceof GrReferenceExpression && ((GrReferenceExpression)operand).getQualifier()... | visitUnaryExpression |
37,418 | void (@NotNull GrOpenBlock block) { PsiElement blockParent = block.getParent(); if (blockParent instanceof GrMethod method) { if (GrTraitUtil.isMethodAbstract(method)) { String message = GroovyBundle.message("abstract.methods.must.not.have.body"); AnnotationBuilder builder = myHolder.newAnnotation(HighlightSeverity.ERR... | visitOpenBlock |
37,419 | void (@NotNull GrField field) { super.visitField(field); if (field.getTypeElementGroovy() == null && field.getContainingClass() instanceof GrAnnotationTypeDefinition) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("annotation.field.should.have.type.declaration")).range(field.getNameIdentifierGro... | visitField |
37,420 | void (@NotNull GrField field) { PsiExpression initializer = field.getInitializer(); if (initializer == null) return; PsiClass containingClass = field.getContainingClass(); if (containingClass == null) return; PsiAnnotation tupleConstructor = containingClass.getAnnotation(GroovyCommonClassNames.GROOVY_TRANSFORM_TUPLE_CO... | checkInitializer |
37,421 | void (@NotNull GrMethod method) { checkDuplicateMethod(method); checkMethodWithTypeParamsShouldHaveReturnType(myHolder, method); checkInnerMethod(myHolder, method); checkOptionalParametersInAbstractMethod(myHolder, method); checkConstructorOfImmutableClass(myHolder, method); checkGetterOfImmutable(myHolder, method); fi... | visitMethod |
37,422 | void (AnnotationHolder holder, GrMethod method) { if (!GroovyPropertyUtils.isSimplePropertyGetter(method)) return; PsiClass aClass = method.getContainingClass(); if (aClass == null) return; if (!GrImmutableUtils.hasImmutableAnnotation(aClass)) return; PsiField field = GroovyPropertyUtils.findFieldForAccessor(method, fa... | checkGetterOfImmutable |
37,423 | void (AnnotationHolder holder, GrMethod method) { if (!method.isConstructor()) return; PsiClass aClass = method.getContainingClass(); if (aClass == null) return; if (!GrImmutableUtils.hasImmutableAnnotation(aClass)) return; holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("explicit.constructors.are.no... | checkConstructorOfImmutableClass |
37,424 | void (@NotNull AnnotationHolder holder, @NotNull GrMethod method) { final List<HierarchicalMethodSignature> signatures = method.getHierarchicalMethodSignature().getSuperSignatures(); for (HierarchicalMethodSignature signature : signatures) { final PsiMethod superMethod = signature.getMethod(); if (!GrTraitUtil.isTrait(... | checkOverridingMethod |
37,425 | void (AnnotationHolder holder, GrMethod method) { final PsiTypeParameterList parameterList = method.getTypeParameterList(); if (parameterList != null) { final GrTypeElement typeElement = method.getReturnTypeElementGroovy(); if (typeElement == null) { final TextRange parameterListTextRange = parameterList.getTextRange()... | checkMethodWithTypeParamsShouldHaveReturnType |
37,426 | void (AnnotationHolder holder, GrMethod method) { if (!method.hasModifierProperty(PsiModifier.ABSTRACT)) return; if (!(method.getContainingClass() instanceof GrInterfaceDefinition)) return; for (GrParameter parameter : method.getParameters()) { GrExpression initializerGroovy = parameter.getInitializerGroovy(); if (init... | checkOptionalParametersInAbstractMethod |
37,427 | PsiMethod (PsiClass clazz) { final String className = clazz.getName(); if (className == null) return null; final PsiMethod[] byName = clazz.findMethodsByName(className, true); if (byName.length == 0) return null; Outer: for (PsiMethod method : byName) { if (method.getParameterList().isEmpty()) return method; if (!(meth... | getDefaultConstructor |
37,428 | void (@NotNull GrVariable variable) { checkName(variable); PsiElement parent = variable.getParent(); if (parent instanceof GrForInClause) { PsiElement delimiter = ((GrForInClause)parent).getDelimiter(); if (delimiter.getNode().getElementType() == GroovyTokenTypes.mCOLON) { GrTypeElement typeElement = variable.getTypeEl... | visitVariable |
37,429 | TextRange (GrVariable variable) { if (variable instanceof GrParameter) { final PsiElement dots = ((GrParameter)variable).getEllipsisDots(); if (dots != null) { return dots.getTextRange(); } } return null; } | getEllipsisRange |
37,430 | TextRange (GrVariable variable) { GrTypeElement typeElement = variable.getTypeElementGroovy(); if (typeElement == null) return null; PsiElement sibling = typeElement.getNextSibling(); if (sibling != null && sibling.getNode().getElementType() == GroovyTokenTypes.mTRIPLE_DOT) { return new TextRange(typeElement.getTextRan... | getTypeRange |
37,431 | boolean (PsiVariable variable) { if (!(variable instanceof PsiParameter)) return false; PsiElement parent = variable.getParent(); if (!(parent instanceof PsiParameterList)) return false; PsiParameter[] parameters = ((PsiParameterList)parent).getParameters(); return parameters.length > 0 && parameters[parameters.length ... | isLastParameter |
37,432 | void (GrVariable variable) { if (!"$".equals(variable.getName())) return; myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("incorrect.variable.name")).range(variable.getNameIdentifierGroovy()).create(); } | checkName |
37,433 | void (@NotNull GrAssignmentExpression expression) { GrExpression lValue = expression.getLValue(); if (!PsiUtil.mightBeLValue(lValue)) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("invalid.lvalue")).range(lValue).create(); } } | visitAssignmentExpression |
37,434 | void (@NotNull GrReturnStatement returnStatement) { final GrExpression value = returnStatement.getReturnValue(); if (value != null) { final PsiType type = value.getType(); if (type != null) { final GrParameterListOwner owner = PsiTreeUtil.getParentOfType(returnStatement, GrParameterListOwner.class); if (owner instanceo... | visitReturnStatement |
37,435 | void (@NotNull GrTypeParameterList list) { final PsiElement parent = list.getParent(); if (parent instanceof GrMethod && ((GrMethod)parent).isConstructor() || parent instanceof GrEnumTypeDefinition || parent instanceof GrAnnotationTypeDefinition) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("t... | visitTypeParameterList |
37,436 | void (@NotNull GrListOrMap listOrMap) { final GroovyConstructorReference constructorReference = listOrMap.getConstructorReference(); if (constructorReference != null) { final PsiElement lBracket = listOrMap.getLBrack(); myHolder.newSilentAnnotation(HighlightSeverity.INFORMATION).range(lBracket).textAttributes(GroovySyn... | visitListOrMap |
37,437 | void (@NotNull GrClassTypeElement typeElement) { super.visitClassTypeElement(typeElement); final GrCodeReferenceElement ref = typeElement.getReferenceElement(); final GrTypeArgumentList argList = ref.getTypeArgumentList(); if (argList == null) return; final GrTypeElement[] elements = argList.getTypeArgumentElements(); ... | visitClassTypeElement |
37,438 | void (@NotNull GrCodeReferenceElement refElement) { if (refElement.getParent() instanceof GrAnnotation) { PsiElement resolved = refElement.resolve(); if (resolved instanceof PsiClass && !((PsiClass)resolved).isAnnotationType() && GrAnnotationCollector.findAnnotationCollector((PsiClass)resolved) != null) { myHolder.newS... | visitCodeReferenceElement |
37,439 | void (@NotNull GrTypeElement typeElement) { final PsiElement parent = typeElement.getParent(); if (!(parent instanceof GrMethod)) return; if (parent instanceof GrAnnotationMethod) { checkAnnotationAttributeType(typeElement, myHolder); } else if (((GrMethod)parent).isConstructor()) { myHolder.newAnnotation(HighlightSeve... | visitTypeElement |
37,440 | void (@NotNull GrArrayTypeElement typeElement) { GrTypeElement componentTypeElement = typeElement.getComponentTypeElement(); PsiType componentType = componentTypeElement.getType(); if (PsiTypes.voidType().equals(componentType)) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("illegal.type.void"))... | visitArrayTypeElement |
37,441 | void (@NotNull GrModifierList modifierList) { final PsiElement parent = modifierList.getParent(); if (parent instanceof GrMethod) { checkMethodDefinitionModifiers(myHolder, (GrMethod)parent); } else if (parent instanceof GrVariableDeclaration declaration) { if (isFieldDeclaration(declaration)) { checkFieldModifiers(myH... | visitModifierList |
37,442 | void (AnnotationHolder holder, GrModifierList modifierList) { for (GrAnnotation annotation : modifierList.getAnnotations()) { holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("initializer.cannot.have.annotations")).range(annotation).create(); } for (@GrModifier.GrModifierConstant String modifier : GrM... | checkClassInitializerModifiers |
37,443 | void (@NotNull GrClassInitializer initializer) { final PsiClass aClass = initializer.getContainingClass(); if (GrTraitUtil.isInterface(aClass)) { final TextRange range = GrHighlightUtil.getInitializerHeaderTextRange(initializer); myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("initializers.are.not... | visitClassInitializer |
37,444 | void (AnnotationHolder holder, GrVariableDeclaration fieldDeclaration) { GrVariable[] variables = fieldDeclaration.getVariables(); if (variables.length == 0) return; GrVariable variable = variables[0]; final GrField member = variable instanceof GrField ? (GrField)variable : findScriptField(variable); if (member == null... | checkFieldModifiers |
37,445 | void (GrTypeElement element, AnnotationHolder holder) { if (element instanceof GrBuiltInTypeElement) return; if (element instanceof GrArrayTypeElement) { checkAnnotationAttributeType(((GrArrayTypeElement)element).getComponentTypeElement(), holder); return; } else if (element instanceof GrClassTypeElement) { final PsiEl... | checkAnnotationAttributeType |
37,446 | void (PsiMethod method, PsiElement toHighlight, AnnotationHolder holder) { final HierarchicalMethodSignature signature = method.getHierarchicalMethodSignature(); final List<HierarchicalMethodSignature> superSignatures = signature.getSuperSignatures(); PsiType returnType = signature.getSubstitutor().substitute(method.ge... | checkMethodReturnType |
37,447 | String (@NotNull PsiMethod superMethod, @NotNull MethodSignatureBackedByPsiMethod superMethodSignature, @NotNull PsiType superReturnType, @NotNull PsiMethod method, @NotNull MethodSignatureBackedByPsiMethod methodSignature, @NotNull PsiType returnType) { PsiType substitutedSuperReturnType = substituteSuperReturnType(su... | checkSuperMethodSignature |
37,448 | PsiType (@NotNull MethodSignatureBackedByPsiMethod superMethodSignature, @NotNull MethodSignatureBackedByPsiMethod methodSignature, @NotNull PsiType superReturnType) { PsiType substitutedSuperReturnType; if (!superMethodSignature.isRaw() && superMethodSignature.equals(methodSignature)) { //see 8.4.5 PsiSubstitutor unif... | substituteSuperReturnType |
37,449 | String (@NotNull PsiMember member) { final PsiClass aClass = member.getContainingClass(); return getQName(aClass); } | getQNameOfMember |
37,450 | String (@Nullable PsiClass aClass) { if (aClass instanceof PsiAnonymousClass) { return GroovyBundle.message("anonymous.class.derived.from.0", ((PsiAnonymousClass)aClass).getBaseClassType().getCanonicalText()); } if (aClass != null) { final String qname = aClass.getQualifiedName(); if (qname != null) { return qname; } }... | getQName |
37,451 | void (@Nullable GrTypeElement element, @NotNull @InspectionMessage String message) { if (element == null || !(element.getType() instanceof PsiPrimitiveType)) return; AnnotationBuilder builder = myHolder.newAnnotation(HighlightSeverity.ERROR, message).range(element); builder = registerLocalFix(builder, new GrReplacePrim... | checkTypeArgForPrimitive |
37,452 | void (@NotNull GrWildcardTypeArgument wildcardTypeArgument) { super.visitWildcardTypeArgument(wildcardTypeArgument); checkTypeArgForPrimitive(wildcardTypeArgument.getBoundTypeElement(), GroovyBundle.message("primitive.bound.types.are.not.allowed")); } | visitWildcardTypeArgument |
37,453 | void (GrNamedArgument[] namedArguments) { for (GrNamedArgument namedArgument : namedArguments) { final GrArgumentLabel label = namedArgument.getLabel(); if (label != null && label.getExpression() == null && label.getNameElement().getNode().getElementType() != GroovyTokenTypes.mSTAR) { myHolder.newSilentAnnotation(Highl... | highlightNamedArgs |
37,454 | void (GrNamedArgument[] namedArguments, boolean forArgList) { highlightNamedArgs(namedArguments); Set<Object> existingKeys = new HashSet<>(); for (GrNamedArgument namedArgument : namedArguments) { GrArgumentLabel label = namedArgument.getLabel(); Object value = PsiUtil.getLabelValue(label); if (value == null) continue;... | checkNamedArgs |
37,455 | void (@NotNull GrNewExpression newExpression) { GrTypeArgumentList constructorTypeArguments = newExpression.getConstructorTypeArguments(); if (constructorTypeArguments != null) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("groovy.does.not.support.constructor.type.arguments")).range(constructor... | visitNewExpression |
37,456 | void (@NotNull GrArgumentList list) { checkNamedArgs(list.getNamedArguments(), true); } | visitArgumentList |
37,457 | void (@NotNull GrBreakStatement breakStatement) { checkFlowInterruptStatement(breakStatement, myHolder); } | visitBreakStatement |
37,458 | void (@NotNull GrContinueStatement continueStatement) { checkFlowInterruptStatement(continueStatement, myHolder); } | visitContinueStatement |
37,459 | void (@NotNull GrPackageDefinition packageDefinition) { final GrModifierList modifierList = packageDefinition.getAnnotationList(); checkAnnotationList(myHolder, modifierList, GroovyBundle.message("package.definition.cannot.have.modifiers")); } | visitPackageDefinition |
37,460 | void (@NotNull GrLambdaExpression expression) { super.visitLambdaExpression(expression); PsiElement arrow = expression.getArrow(); myHolder.newSilentAnnotation(HighlightSeverity.INFORMATION).range(arrow).textAttributes(GroovySyntaxHighlighter.LAMBDA_ARROW_AND_BRACES).create(); } | visitLambdaExpression |
37,461 | void (@NotNull GrBlockLambdaBody body) { super.visitBlockLambdaBody(body); PsiElement lBrace = body.getLBrace(); if (lBrace != null) { myHolder.newSilentAnnotation(HighlightSeverity.INFORMATION).range(lBrace).textAttributes(GroovySyntaxHighlighter.LAMBDA_ARROW_AND_BRACES).create(); } PsiElement rBrace = body.getRBrace(... | visitBlockLambdaBody |
37,462 | void (@NotNull GrClosableBlock closure) { super.visitClosure(closure); myHolder.newSilentAnnotation(HighlightSeverity.INFORMATION).range(closure.getLBrace()).textAttributes(GroovySyntaxHighlighter.CLOSURE_ARROW_AND_BRACES).create(); PsiElement rBrace = closure.getRBrace(); if (rBrace != null) { myHolder.newSilentAnnota... | visitClosure |
37,463 | void (@NotNull GrLiteral literal) { final IElementType elementType = literal.getFirstChild().getNode().getElementType(); if (GroovyTokenSets.STRING_LITERALS.contains(elementType)) { checkStringLiteral(literal); } else if (elementType == GroovyTokenTypes.mREGEX_LITERAL || elementType == GroovyTokenTypes.mDOLLAR_SLASH_RE... | visitLiteralExpression |
37,464 | void (@NotNull GrRegex regex) { checkRegexLiteral(regex); } | visitRegexExpression |
37,465 | void (PsiElement regex) { String[] parts; if (regex instanceof GrRegex) { parts = ((GrRegex)regex).getTextParts(); } else { parts = new String[]{regex.getFirstChild().getNextSibling().getText()}; } for (String part : parts) { if (!GrStringUtil.parseRegexCharacters(part, new StringBuilder(part.length()), null, regex.get... | checkRegexLiteral |
37,466 | void (@NotNull GrString gstring) { for (GrStringContent part : gstring.getContents()) { final String text = part.getText(); if (!GrStringUtil.parseStringCharacters(text, new StringBuilder(text.length()), null)) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("illegal.escape.character.in.string.li... | visitGStringExpression |
37,467 | void (@NotNull GrStringInjection injection) { if (((GrString)injection.getParent()).isPlainString()) { PsiElement lineFeed = getLineFeed(injection); if (lineFeed != null) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("injection.should.not.contain.line.feeds")) .range(lineFeed) .create(); } } } | visitGStringInjection |
37,468 | void (PsiElement literal) { InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.getInstance(literal.getProject()); String text; if (injectedLanguageManager.isInjectedFragment(literal.getContainingFile())) { text = injectedLanguageManager.getUnescapedText(literal); } else { text = literal.getText()... | checkStringLiteral |
37,469 | void (@NotNull GrForInClause forInClause) { final GrVariable var = forInClause.getDeclaredVariable(); if (var == null) return; final GrModifierList modifierList = var.getModifierList(); if (modifierList == null) return; final PsiElement[] modifiers = modifierList.getModifiers(); for (PsiElement modifier : modifiers) { ... | visitForInClause |
37,470 | void (@NotNull GroovyFileBase file) { final PsiClass scriptClass = file.getScriptClass(); if (scriptClass != null) { checkSameNameMethodsWithDifferentAccessModifiers(myHolder, file.getMethods()); } } | visitFile |
37,471 | void (@NotNull GrAnnotation annotation) { AnnotationChecker.checkApplicability(annotation, annotation.getOwner(), myHolder, annotation.getClassReference()); } | visitAnnotation |
37,472 | void (@NotNull GrAnnotationArgumentList annotationArgumentList) { GrAnnotation parent = (GrAnnotation)annotationArgumentList.getParent(); Pair<PsiElement, @InspectionMessage String> r = AnnotationChecker.checkAnnotationArgumentList(parent, myHolder); if (r != null && r.getFirst() != null && r.getSecond() != null) { myH... | visitAnnotationArgumentList |
37,473 | void (@NotNull GrAnnotationMethod annotationMethod) { super.visitAnnotationMethod(annotationMethod); final PsiReferenceList list = annotationMethod.getThrowsList(); if (list.getReferencedTypes().length > 0) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("throws.clause.is.not.allowed.in.at.interf... | visitAnnotationMethod |
37,474 | void (@NotNull GrAnnotationNameValuePair nameValuePair) { final PsiElement identifier = nameValuePair.getNameIdentifierGroovy(); if (identifier == null) { final PsiElement parent = nameValuePair.getParent(); if (parent instanceof GrAnnotationArgumentList) { final int count = ((GrAnnotationArgumentList)parent).getAttrib... | visitAnnotationNameValuePair |
37,475 | boolean (@Nullable GrAnnotationMemberValue value, @NotNull PsiElement toHighlight) { if (value == null) return false; if (value instanceof GrLiteral) return false; if (value instanceof GrFunctionalExpression) return false; if (value instanceof GrAnnotation) return false; if (value instanceof GrReferenceExpression) { Ps... | checkAnnotationAttributeValue |
37,476 | boolean (GrAnnotationMemberValue value) { if (value instanceof GrReferenceExpression) { final String referenceName = ((GrReferenceExpression)value).getReferenceName(); if ("class".equals(referenceName)) { final GrExpression qualifier = ((GrReferenceExpression)value).getQualifier(); if (qualifier instanceof GrReferenceE... | isClassReference |
37,477 | void (@NotNull GrImportStatement importStatement) { checkAnnotationList(myHolder, importStatement.getAnnotationList(), GroovyBundle.message("import.statement.cannot.have.modifiers")); } | visitImportStatement |
37,478 | void (@NotNull GrExtendsClause extendsClause) { GrTypeDefinition typeDefinition = (GrTypeDefinition)extendsClause.getParent(); if (typeDefinition.isAnnotationType()) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("annotation.types.may.not.have.extends.clause")).create(); } else if (typeDefinitio... | visitExtendsClause |
37,479 | void (@NotNull GrImplementsClause implementsClause) { GrTypeDefinition typeDefinition = (GrTypeDefinition)implementsClause.getParent(); if (typeDefinition.isAnnotationType()) { myHolder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("annotation.types.may.not.have.implements.clause")).create(); } else if (G... | visitImplementsClause |
37,480 | void (@NotNull AnnotationHolder holder, @NotNull GrReferenceList list, @NotNull Condition<? super PsiClass> applicabilityCondition, @NotNull @InspectionMessage String message, @Nullable IntentionAction fix) { for (GrCodeReferenceElement refElement : list.getReferenceElementsGroovy()) { final PsiElement psiClass = refEl... | checkReferenceList |
37,481 | void (GrFlowInterruptingStatement statement, AnnotationHolder holder) { final PsiElement label = statement.getLabelIdentifier(); if (label != null) { final GrLabeledStatement resolved = statement.resolveLabel(); if (resolved == null) { holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("undefined.label"... | checkFlowInterruptStatement |
37,482 | GrLoopStatement (GrFlowInterruptingStatement statement) { return PsiTreeUtil.getParentOfType(statement, GrLoopStatement.class, true, GrClosableBlock.class, GrMember.class, GroovyFile.class); } | findFirstLoop |
37,483 | void (final GrReferenceExpression ref, AnnotationHolder holder) { PsiElement nameElement = ref.getReferenceNameElement(); if (nameElement == null) return; IElementType elementType = nameElement.getNode().getElementType(); if (!(elementType == GroovyTokenTypes.kSUPER || elementType == GroovyTokenTypes.kTHIS)) return; fi... | checkThisOrSuperReferenceExpression |
37,484 | void (AnnotationHolder holder, PsiElement element) { ASTNode node = element.getNode(); if (node != null && TokenSets.BUILT_IN_TYPES.contains(node.getElementType())) { holder.newSilentAnnotation(HighlightSeverity.INFORMATION).textAttributes(GroovySyntaxHighlighter.KEYWORD).create(); } } | checkGrDocReferenceElement |
37,485 | void (AnnotationHolder holder, @NotNull GrModifierList modifierList, @NotNull @InspectionMessage String message) { final PsiElement[] modifiers = modifierList.getModifiers(); for (PsiElement modifier : modifiers) { if (!(modifier instanceof PsiAnnotation)) { holder.newAnnotation(HighlightSeverity.ERROR, message).range(... | checkAnnotationList |
37,486 | void (AnnotationHolder holder, GrTypeDefinition typeDefinition) { if (typeDefinition.hasModifierProperty(PsiModifier.ABSTRACT)) return; if (typeDefinition.isAnnotationType()) return; if (typeDefinition instanceof GrTypeParameter) return; PsiMethod abstractMethod = ClassUtil.getAnyAbstractMethod(typeDefinition); if (abs... | checkImplementedMethodsOfClass |
37,487 | AnnotationBuilder (@NotNull GrTypeDefinition typeDefinition, @NotNull PsiMethod abstractMethod, @NotNull AnnotationBuilder builder, @InspectionMessage String message, TextRange range) { if (!OverrideImplementExploreUtil.getMethodsToOverrideImplement(typeDefinition, true).isEmpty()) { builder = builder.withFix(QuickFixF... | registerImplementsMethodsFix |
37,488 | void (AnnotationHolder holder, GrMethod grMethod) { final PsiElement parent = grMethod.getParent(); if (parent instanceof GrOpenBlock || parent instanceof GrClosableBlock || parent instanceof GrBlockLambdaBody) { holder.newAnnotation(HighlightSeverity.ERROR, GroovyBundle.message("Inner.methods.are.not.supported")).rang... | checkInnerMethod |
37,489 | AnnotationBuilder (AnnotationBuilder builder, GrMethod method, boolean makeClassAbstract, @InspectionMessage String message, TextRange range) { if (method.getBlock() == null) { builder = builder.withFix(QuickFixFactory.getInstance().createAddMethodBodyFix(method)); } else { builder = builder.withFix(QuickFixFactory.get... | registerMakeAbstractMethodNotAbstractFix |
37,490 | void (AnnotationHolder holder, GrMethod method) { final GrModifierList modifiersList = method.getModifierList(); checkAccessModifiers(holder, modifiersList, method); checkDuplicateModifiers(holder, modifiersList, method); checkOverrideAnnotation(holder, modifiersList, method); checkModifierIsNotAllowed(modifiersList, P... | checkMethodDefinitionModifiers |
37,491 | void (AnnotationHolder holder, GrMember member, GrModifierList modifiersList) { if (member.hasModifierProperty(PsiModifier.FINAL) && member.hasModifierProperty(PsiModifier.ABSTRACT)) { String message = GroovyBundle.message("illegal.combination.of.modifiers.abstract.and.final"); AnnotationBuilder builder = holder.newAnn... | checkForAbstractAndFinalCombination |
37,492 | PsiElement (@NotNull GrModifierList modifiersList, @GrModifier.GrModifierConstant final String modifier) { PsiElement m = modifiersList.getModifier(modifier); return m != null ? m : modifiersList; } | getModifierOrList |
37,493 | void (AnnotationHolder holder, GrModifierList list, GrMethod method) { final PsiAnnotation overrideAnnotation = list.findAnnotation("java.lang.Override"); if (overrideAnnotation == null) { return; } try { MethodSignatureBackedByPsiMethod superMethod = SuperMethodsSearch.search(method, null, true, false).findFirst(); if... | checkOverrideAnnotation |
37,494 | void (AnnotationHolder holder, GrTypeDefinition typeDefinition) { GrModifierList modifiersList = typeDefinition.getModifierList(); if (modifiersList == null) return; checkAccessModifiers(holder, modifiersList, typeDefinition); checkDuplicateModifiers(holder, modifiersList, typeDefinition); PsiClassType[] extendsListTyp... | checkTypeDefinitionModifiers |
37,495 | void (AnnotationHolder holder, @NotNull GrModifierList list, PsiMember member) { final PsiElement[] modifiers = list.getModifiers(); Set<String> set = new HashSet<>(modifiers.length); for (PsiElement modifier : modifiers) { if (modifier instanceof GrAnnotation) continue; @GrModifier.GrModifierConstant String name = mod... | checkDuplicateModifiers |
37,496 | void (AnnotationHolder holder, @NotNull GrModifierList modifierList, PsiMember member) { boolean hasPrivate = modifierList.hasExplicitModifier(PsiModifier.PRIVATE); boolean hasPublic = modifierList.hasExplicitModifier(PsiModifier.PUBLIC); boolean hasProtected = modifierList.hasExplicitModifier(PsiModifier.PROTECTED); i... | checkAccessModifiers |
37,497 | void (@NotNull GrMethod method) { PsiClass clazz = method.getContainingClass(); if (clazz == null) return; GrReflectedMethod[] reflectedMethods = method.getReflectedMethods(); if (reflectedMethods.length == 0) { doCheckDuplicateMethod(method, clazz); } else { for (GrReflectedMethod reflectedMethod : reflectedMethods) {... | checkDuplicateMethod |
37,498 | void (@NotNull GrMethod method, @NotNull PsiClass clazz) { Set<MethodSignature> duplicatedSignatures = GrClassImplUtil.getDuplicatedSignatures(clazz); if (duplicatedSignatures.isEmpty()) return; // optimization PsiSubstitutor substitutor = JavaPsiFacade.getElementFactory(method.getProject()).createRawSubstitutor(method... | doCheckDuplicateMethod |
37,499 | void (AnnotationHolder holder, @NotNull GrTypeDefinition typeDefinition) { if (typeDefinition.isAnonymous()) { PsiClass superClass = ((PsiAnonymousClass)typeDefinition).getBaseClassType().resolve(); if (superClass instanceof GrTypeDefinition && !GroovyConfigUtils.getInstance().isVersionAtLeast(typeDefinition, GroovyCon... | checkTypeDefinition |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.