Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
32,500
boolean (@NotNull PsiElement e) { return e instanceof GrTypeCastExpression; }
canSelect
32,501
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = super.select(e, editorText, cursorOffset, editor); if (e instanceof GrTypeCastExpression castExpression) { GrTypeElement type = castExpression.getCastTypeElement(); TextRange ra...
select
32,502
boolean (@NotNull PsiElement e) { return e instanceof GrIfStatement; }
canSelect
32,503
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { if (!(e instanceof GrIfStatement ifSt)) return null; GrStatement branch = ifSt.getElseBranch(); PsiElement elseKeyword = ifSt.getElseKeyword(); if (branch == null || elseKeyword == null) return null; re...
select
32,504
boolean (@NotNull PsiElement e) { return e instanceof GrTypeDefinitionBody; }
canSelect
32,505
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = super.select(e, editorText, cursorOffset, editor); if (e instanceof GrTypeDefinitionBody block) { int startOffset = findOpeningBrace(block); int endOffset = findClosingBrace(blo...
select
32,506
int (GrTypeDefinitionBody block) { PsiElement lbrace = block.getLBrace(); if (lbrace == null) return block.getTextRange().getStartOffset(); while (PsiImplUtil.isWhiteSpaceOrNls(lbrace.getNextSibling())) { lbrace = lbrace.getNextSibling(); } return lbrace.getTextRange().getEndOffset(); }
findOpeningBrace
32,507
int (GrTypeDefinitionBody block, int startOffset) { PsiElement rbrace = block.getRBrace(); if (rbrace == null) return block.getTextRange().getEndOffset(); while (PsiImplUtil.isWhiteSpaceOrNls(rbrace.getPrevSibling()) && rbrace.getPrevSibling().getTextRange().getStartOffset() > startOffset) { rbrace = rbrace.getPrevSibl...
findClosingBrace
32,508
boolean (@NotNull PsiElement e) { PsiElement parent = e.getParent(); return isLiteral(e) || isLiteral(parent); }
canSelect
32,509
boolean (PsiElement element) { return element instanceof GrListOrMap || element instanceof GrArgumentLabel || element instanceof GrLiteral && ((GrLiteral)element).isString(); }
isLiteral
32,510
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { List<TextRange> result = super.select(e, editorText, cursorOffset, editor); if (e instanceof GrListOrMap) return result; assert result != null; int startOffset = -1; int endOffset = -1; final String tex...
select
32,511
boolean (@NotNull PsiElement e) { return e instanceof GrExpression && PsiUtil.isExpressionStatement(e) || (e instanceof GrStatement && !(e instanceof GrExpression)) || e.getNode().getElementType() == GroovyTokenTypes.mSEMI; }
canSelect
32,512
List<TextRange> (@NotNull PsiElement e, @NotNull CharSequence editorText, int cursorOffset, @NotNull Editor editor) { TextRange originalRange; PsiElement first; PsiElement last; if (e instanceof GrStatement) { first = e; PsiElement next = e.getNextSibling(); next = skipWhitespacesForward(next); if (next != null && next...
select
32,513
TextRange (PsiElement first, PsiElement last) { while (true) { PsiElement prev = first.getPrevSibling(); prev = skipWhitespaceBack(prev); if (isOneLineFeed(prev)) prev = prev.getPrevSibling(); prev = skipWhitespaceBack(prev); if (prev != null && prev.getNode().getElementType() == GroovyTokenTypes.mSEMI || prev instance...
inferBlockRange
32,514
PsiElement (PsiElement next) { while (isSpaceWithoutLineFeed(next)) next = next.getNextSibling(); return next; }
skipWhitespacesForward
32,515
PsiElement (PsiElement prev) { while (isSpaceWithoutLineFeed(prev)) prev = prev.getPrevSibling(); return prev; }
skipWhitespaceBack
32,516
boolean (PsiElement e) { if (e == null) return false; if (!PsiImplUtil.isWhiteSpaceOrNls(e)) return false; final String text = e.getText(); final int i = text.indexOf('\n'); return i >= 0 && i == text.lastIndexOf('\n'); }
isOneLineFeed
32,517
boolean (PsiElement e) { return e instanceof PsiWhiteSpace && e.getText().indexOf('\n') == -1; }
isSpaceWithoutLineFeed
32,518
void (char c, PsiFile file, Editor editor) { if (c != '{') return; if (!(file instanceof GroovyFile)) return; final int offset = editor.getCaretModel().getOffset(); final EditorHighlighter highlighter = editor.getHighlighter(); if (offset < 1) return; HighlighterIterator iterator = highlighter.createIterator(offset); i...
beforeCharDeleted
32,519
boolean (char c, PsiFile file, Editor editor) { return false; }
charDeleted
32,520
Result (char c, @NotNull Project project, @NotNull Editor editor, @NotNull PsiFile file) { if (c != '{' || !HandlerUtils.canBeInvoked(editor, project)) { return Result.CONTINUE; } if (!(file instanceof GroovyFile)) return Result.CONTINUE; int caret = editor.getCaretModel().getOffset(); final EditorHighlighter highlight...
charTyped
32,521
void (char c, @NotNull PsiFile file, @NotNull Editor editor) { int offset = editor.getCaretModel().getOffset() - 1; myToDeleteGt = c =='<' && file instanceof GroovyFile && GroovyTypedHandler.isAfterClassLikeIdentifier(offset, editor); }
beforeCharDeleted
32,522
boolean (final char c, @NotNull final PsiFile file, @NotNull final Editor editor) { int offset = editor.getCaretModel().getOffset(); final CharSequence chars = editor.getDocument().getCharsSequence(); if (editor.getDocument().getTextLength() <= offset) return false; //virtual space after end of file char c1 = chars.cha...
charDeleted
32,523
void (Editor editor) { int indentSize = CodeStyle.getSettings(editor).getContinuationIndentSize(GroovyFileType.GROOVY_FILE_TYPE); EditorModificationUtilEx.insertStringAtCaret(editor, StringUtil.repeatSymbol(' ', indentSize)); }
insertSpacesByGroovyContinuationIndent
32,524
Result (@NotNull PsiFile file, @NotNull Editor editor, @NotNull Ref<Integer> caretOffset, @NotNull Ref<Integer> caretAdvance, @NotNull DataContext dataContext, EditorActionHandler originalHandler) { Document document = editor.getDocument(); Project project = file.getProject(); CaretModel caretModel = editor.getCaretMod...
preprocessEnter
32,525
boolean (Editor editor, DataContext dataContext, EditorActionHandler originalHandler) { if (HandlerUtils.isReadOnly(editor)) { return false; } int caretOffset = editor.getCaretModel().getOffset(); if (caretOffset < 1) return false; if (handleBetweenSquareBraces(editor, caretOffset, dataContext, originalHandler)) { retu...
handleEnter
32,526
boolean (Editor editor, int caretOffset, DataContext dataContext, EditorActionHandler originalHandler, PsiFile file) { Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return false; GroovyCodeStyleSettings codeStyleSettings = GroovyCodeStyleSettings.getInstance(editor); if (!codeStyle...
handleFlyingGeese
32,527
boolean (Editor editor, int caret, DataContext context, EditorActionHandler originalHandler) { String text = editor.getDocument().getText(); if (text.isEmpty()) return false; final EditorHighlighter highlighter = editor.getHighlighter(); if (caret < 1 || caret > text.length() - 1) { return false; } HighlighterIterator ...
handleBetweenSquareBraces
32,528
boolean (Editor editor, int caretOffset, DataContext dataContext, EditorActionHandler originalHandler) { Project project = CommonDataKeys.PROJECT.getData(dataContext); if (project == null) return false; final VirtualFile vfile = FileDocumentManager.getInstance().getFile(editor.getDocument()); assert vfile != null; PsiF...
handleInString
32,529
boolean (PsiElement element) { return "\"".equals(GrStringUtil.getStartQuote(element.getText())); }
isDoubleQuotedString
32,530
boolean (PsiElement element) { return "'".equals(GrStringUtil.getStartQuote(element.getText())); }
isSingleQuoteString
32,531
PsiElement (PsiFile file, int caretOffset) { PsiElement stringElement = file.findElementAt(caretOffset - 1); if (stringElement == null) return null; ASTNode node = stringElement.getNode(); if (node == null) return null; // For expression injection in GString like "abc ${}<caret> abc" if (!INNER_STRING_TOKENS.contains(n...
inferStringPair
32,532
boolean (int caretOffset, String fileText) { return caretOffset > 0 && fileText.charAt(caretOffset - 1) == '\\'; }
isSlashBeforeCaret
32,533
void (Editor editor, DataContext dataContext, EditorActionHandler originalHandler, boolean isInsertIndent) { if (isInsertIndent) { originalHandler.execute(editor, editor.getCaretModel().getCurrentCaret(), dataContext); } else { EditorModificationUtilEx.insertStringAtCaret(editor, "\n"); } }
insertLineFeedInString
32,534
boolean (int caret, int stringOffset, String text) { final int i = text.indexOf('\n', stringOffset); return stringOffset < i && i < caret; }
isInsertIndent
32,535
void (int caretOffset, Document document, String fileText, char c) { if (caretOffset < fileText.length() && fileText.charAt(caretOffset) == c || caretOffset > 0 && fileText.charAt(caretOffset - 1) == c) { document.insertString(caretOffset, new CharArrayCharSequence(c, c)); } else { document.insertString(caretOffset, ne...
convertEndToMultiline
32,536
boolean (Editor editor, int caret) { final GroovyLexer lexer = new GroovyLexer(); lexer.start(editor.getDocument().getText()); while (lexer.getTokenEnd() < caret) { lexer.advance(); } final IElementType leftToken = lexer.getTokenType(); if (lexer.getTokenEnd() <= caret) lexer.advance(); final IElementType rightToken = ...
checkStringApplicable
32,537
boolean (PsiElement element) { if (element != null && (element.getParent() instanceof GrReferenceExpression || element.getParent() instanceof GrClosableBlock)) { final PsiElement parent = element.getParent().getParent(); if (!(parent instanceof GrStringInjection)) return false; PsiElement nextSibling = parent.getNextSi...
checkGStringInjection
32,538
Result (final char c, @NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file, @NotNull final FileType fileType) { int offsetBefore = editor.getCaretModel().getOffset(); //important to calculate before inserting charTyped myJavaLTTyped = '<' == c && file instanceof GroovyFile && CodeIn...
beforeCharTyped
32,539
void (Project project, final Editor editor, Condition<PsiFile> condition) { AutoPopupController.getInstance(project).autoPopupMemberLookup(editor, condition); }
autoPopupMemberLookup
32,540
Result (final char c, @NotNull final Project project, @NotNull final Editor editor, @NotNull final PsiFile file) { if (myJavaLTTyped) { myJavaLTTyped = false; TypedHandlerUtil.handleAfterGenericLT(editor, GroovyTokenTypes.mLT, GroovyTokenTypes.mGT, INVALID_INSIDE_REFERENCE); return Result.STOP; } return Result.CONTINUE...
charTyped
32,541
boolean (final int offset, final Editor editor) { HighlighterIterator iterator = editor.getHighlighter().createIterator(offset); if (iterator.atEnd()) return false; if (iterator.getStart() > 0) iterator.retreat(); return TypedHandlerUtil.isClassLikeIdentifier(offset, editor, iterator, GroovyTokenTypes.mIDENT); }
isAfterClassLikeIdentifier
32,542
boolean (@NotNull Editor editor, @NotNull PsiFile file, @NotNull MoveInfo info, boolean down) { final Project project = file.getProject(); if (!HandlerUtils.canBeInvoked(editor, project) || !(file instanceof GroovyFileBase)) return false; LineRange range = getLineRangeFromSelection(editor); final Document document = ed...
checkAvailable
32,543
GroovyPsiElement (GroovyFileBase file, int offset) { offset = CharArrayUtil.shiftForward(file.getText(), offset, " \t"); PsiElement element = file.findElementAt(offset); final GrDocComment docComment = PsiTreeUtil.getParentOfType(element, GrDocComment.class); if (docComment != null) { final GrDocCommentOwner owner = do...
getElementToMove
32,544
List<LineRange> (final GroovyPsiElement scope, final boolean stmtLevel, final boolean topLevel) { final ArrayList<LineRange> result = new ArrayList<>(); scope.accept(new PsiRecursiveElementVisitor() { int lastStart = -1; private void addRange(int endLine) { if (lastStart >= 0) { result.add(new LineRange(lastStart, endL...
allRanges
32,545
void (int endLine) { if (lastStart >= 0) { result.add(new LineRange(lastStart, endLine)); } lastStart = endLine; }
addRange
32,546
void (@NotNull PsiElement element) { if (stmtLevel && element instanceof GrCodeBlock) { final PsiElement lBrace = ((GrCodeBlock)element).getLBrace(); if (nlsAfter(lBrace)) { addRange(new LineRange(lBrace).endLine); } addChildRanges(((GrCodeBlock)element).getStatements()); final PsiElement rBrace = ((GrCodeBlock)element...
visitElement
32,547
boolean (GroovyPsiElement statement) { if (stmtLevel && (statement instanceof GrMethod || statement instanceof GrTypeDefinition)) { return false; } if (statement instanceof GrVariableDeclaration && !stmtLevel) { return false; } return true; }
shouldDigInside
32,548
void (GroovyPsiElement[] statements) { for (int i = 0; i < statements.length; i++) { GroovyPsiElement statement = statements[i]; if (nlsAfter(statement)) { final LineRange range = getLineRange(statement); if ((i == 0 || isStatement(statements[i-1])) && isStatement(statement)) { for (int j = lastStart; j < range.startLi...
addChildRanges
32,549
boolean (@Nullable PsiElement element) { if (element == null) return false; PsiElement sibling = element; while (true) { sibling = PsiTreeUtil.nextLeaf(sibling); if (sibling == null) { return true; //eof } final String text = sibling.getText(); if (text.contains("\n")) { return text.charAt(CharArrayUtil.shiftForward(te...
nlsAfter
32,550
boolean (PsiElement element) { return isStatement(element) || isMemberDeclaration(element); }
isMovable
32,551
boolean (PsiElement element) { return element instanceof GrMembersDeclaration || element instanceof GrTypeDefinition; }
isMemberDeclaration
32,552
boolean (PsiElement element) { return element instanceof GrStatement && PsiUtil.isExpressionStatement(element); }
isStatement
32,553
LineRange (GroovyPsiElement pivot) { if (pivot instanceof GrDocCommentOwner) { final GrDocComment comment = ((GrDocCommentOwner)pivot).getDocComment(); if (comment != null) { return new LineRange(comment, pivot); } } else if (pivot instanceof GrVariableDeclaration && pivot.getParent() instanceof GrTypeDefinitionBody) {...
getLineRange
32,554
int (@NotNull GrStatement first, @NotNull GrStatement second) { if (first instanceof GrVariableDeclaration && !((GrVariableDeclaration)first).isTuple() && second instanceof GrAssignmentExpression) { final GrExpression lvalue = ((GrAssignmentExpression)second).getLValue(); final GrExpression rValue = ((GrAssignmentExpre...
tryJoinStatements
32,555
int (@NotNull Document document, @NotNull PsiFile file, int start, int end) { if (!(file instanceof GroovyFileBase)) return CANNOT_JOIN; final PsiElement startElement = file.findElementAt(start); if (startElement == null || startElement.getNode().getElementType() != GroovyTokenTypes.mLCURLY) return CANNOT_JOIN; final P...
tryJoinLines
32,556
int (@NotNull Document document, @NotNull PsiFile file, int start, int end) { if (!(file instanceof GroovyFileBase)) return CANNOT_JOIN; final PsiElement element = file.findElementAt(end); final GrStatementOwner statementOwner = PsiTreeUtil.getParentOfType(element, GrStatementOwner.class, true, GroovyFileBase.class); i...
tryJoinRawLines
32,557
int (@NotNull Document document, @NotNull PsiFile file, int start, int end) { return CANNOT_JOIN; }
tryJoinLines
32,558
GrStatement (PsiElement child, boolean forward) { while (child != null && !(child instanceof GrStatement)) { final IElementType type = child.getNode().getElementType(); if (type != GroovyTokenTypes.mSEMI && !(type == TokenType.WHITE_SPACE && !child.getText().contains("\n"))) return null; child = forward ? child.getNext...
skipSemicolonsAndWhitespaces
32,559
int (@NotNull GrStatement first, @NotNull GrStatement second) { final PsiElement semi = PsiImplUtil.findTailingSemicolon(first); final Document document = PsiDocumentManager.getInstance(first.getProject()).getDocument(first.getContainingFile()); if (document == null) return CANNOT_JOIN; final int endOffset = second.get...
tryJoinStatements
32,560
int (@NotNull Document document, @NotNull PsiFile file, int start, int end) { if (!(file instanceof GroovyFileBase)) return CANNOT_JOIN; final PsiElement startElement = file.findElementAt(start); if (startElement == null || !startElement.getNode().getElementType().equals(GroovyTokenTypes.mRPAREN)) return CANNOT_JOIN; f...
tryJoinLines
32,561
boolean (RegExpGroup group) { if (group.getType() == RegExpGroup.Type.NAMED_GROUP) { final String version = getGroovyVersion(group); return version != null && version.compareTo(GroovyConfigUtils.GROOVY2_0) >= 0; } return false; }
supportsNamedGroupSyntax
32,562
boolean (RegExpNamedGroupRef ref) { if (ref.isNamedGroupRef()) { final String version = getGroovyVersion(ref); return version != null && version.compareTo(GroovyConfigUtils.GROOVY2_0) >= 0; } return false; }
supportsNamedGroupRefSyntax
32,563
boolean (RegExpChar regExpChar) { final String version = getGroovyVersion(regExpChar); return version != null && version.compareTo(GroovyConfigUtils.GROOVY2_0) >= 0; }
supportsExtendedHexCharacter
32,564
String (PsiElement element) { final Module module = ModuleUtilCore.findModuleForPsiElement(element); if (module == null) { return null; } return GroovyConfigUtils.getInstance().getSDKVersion(module); }
getGroovyVersion
32,565
boolean (@NotNull Usage usage, @NotNull UsageTarget @NotNull [] targets) { if (usage instanceof PsiElementUsage) { final PsiElement psiElement = ((PsiElementUsage)usage).getElement(); if (psiElement != null) { final PsiFile containingFile = psiElement.getContainingFile(); if (containingFile instanceof GroovyFile) { // ...
isVisible
32,566
List<PsiElement> () { return Collections.singletonList(myTarget); }
getTargets
32,567
void (@NotNull List<? extends PsiElement> targets, @NotNull Consumer<? super List<? extends PsiElement>> selectionConsumer) { selectionConsumer.consume(targets); }
selectTargets
32,568
void (@NotNull List<? extends PsiElement> targets) { PsiElement parent = myTarget.getParent(); if (!(parent instanceof GrReturnStatement) && !(parent instanceof GrThrowStatement)) return; final GrControlFlowOwner flowOwner = ControlFlowUtils.findControlFlowOwner(parent); ControlFlowUtils.visitAllExitPoints(flowOwner, n...
computeUsages
32,569
boolean (Instruction instruction, @Nullable GrExpression returnValue) { final PsiElement returnElement = instruction.getElement(); if (returnElement != null && isCorrectReturn(returnElement)) { final TextRange range = returnElement.getTextRange(); myReadUsages.add(range); } return true; }
visitExitPoint
32,570
boolean (@Nullable PsiElement e) { return e instanceof GrReturnStatement || e instanceof GrThrowStatement || e instanceof GrExpression; }
isCorrectReturn
32,571
String () { return ProductivityFeatureNames.CODEASSISTS_HIGHLIGHT_RETURN; }
getFeatureId
32,572
HighlightUsagesHandlerBase (@NotNull Editor editor, @NotNull PsiFile file, @NotNull PsiElement target) { ASTNode node = target.getNode(); if (node == null) return null; IElementType type = node.getElementType(); if (!(type instanceof GroovyElementType)) return null; if (type == GroovyTokenTypes.kIMPLEMENTS || type == G...
createHighlightUsagesHandler
32,573
boolean (@NotNull PsiElement element) { return element instanceof GrField; }
canFindUsages
32,574
FindUsagesHandler (@NotNull PsiElement element, @NotNull OperationMode operationMode) { return new JavaFindUsagesHandler(element, this) { @Override public PsiElement @NotNull [] getSecondaryElements() { PsiElement element = getPsiElement(); final PsiField field = (PsiField)element; PsiClass containingClass = field.getC...
createFindUsagesHandler
32,575
boolean (PsiMethod[] methods) { for (PsiMethod method : methods) { if (method.isPhysical()) return true; } return false; }
arePhysical
32,576
List<PsiClass> () { GrReferenceList list = GroovyTokenTypes.kEXTENDS == myTarget.getNode().getElementType() ? myClass.getExtendsClause() : myClass.getImplementsClause(); if (list == null) return Collections.emptyList(); final PsiClassType[] classTypes = list.getReferencedTypes(); return ContainerUtil.mapNotNull(classTy...
getTargets
32,577
String (Object object) { return null; }
getPresentableText
32,578
PsiElement (@NotNull PsiElement psiElement) { final ProjectFileIndex index = ProjectRootManager.getInstance(psiElement.getProject()).getFileIndex(); final PsiFile containingFile = psiElement.getContainingFile(); if (containingFile instanceof GroovyFileBase) { final VirtualFile file = containingFile.getVirtualFile(); if...
adjustElement
32,579
PsiElement[] (GrString grString) { final ArrayList<PsiElement> operands = new ArrayList<>(); processGString(grString, operands); return operands.toArray(PsiElement.EMPTY_ARRAY); }
collectGStringOperands
32,580
void (GrString string, ArrayList<? super PsiElement> operands) { ContainerUtil.addAll(operands, string.getAllContentParts()); }
processGString
32,581
PsiElement[] (GrBinaryExpression expression) { final ArrayList<PsiElement> operands = new ArrayList<>(); processBinary(expression, operands); return operands.toArray(PsiElement.EMPTY_ARRAY); }
collectBinaryOperands
32,582
void (GrBinaryExpression expression, ArrayList<? super PsiElement> operands) { final GrExpression left = expression.getLeftOperand(); final GrExpression right = expression.getRightOperand(); if (left instanceof GrBinaryExpression) { processBinary((GrBinaryExpression)left, operands); } else if (left instanceof GrString)...
processBinary
32,583
int (PsiElement arg, GrCall call) { final GroovyResolveResult result = call.advancedResolve(); if (!(result.getElement() instanceof PsiMethod method)) return -1; final Map<GrExpression, Pair<PsiParameter, PsiType>> map = GrClosureSignatureUtil .mapArgumentsToParameters(result, call, false, false, call.getNamedArguments...
findParameterIndex
32,584
void (@Nullable PsiElement element, AnnotatedElementVisitor visitor) { if (element == null) return; for (PsiElement cur = ContextComputationProcessor.getTopLevelInjectionTarget(element); cur != null; cur = cur.getParent()) { if (!visitAnnotatedElementInner(cur, visitor)) return; } }
visitAnnotatedElements
32,585
boolean (PsiElement element, AnnotatedElementVisitor visitor) { final PsiElement parent = element.getParent(); if (element instanceof GrReferenceExpression) { if (!visitor.visitReference((GrReferenceExpression)element)) return false; } else if (element instanceof GrAnnotationNameValuePair && parent != null && parent.ge...
visitAnnotatedElementInner
32,586
void (@NotNull final MultiHostRegistrar registrar, final PsiElement @NotNull ... operands) { if (operands.length == 0) return; final PsiFile file = operands[0].getContainingFile(); if (!(file instanceof GroovyFileBase)) return; LanguageInjectionSupport support = InjectorUtils.findNotNullInjectionSupport(GroovyLanguageI...
getLanguagesToInject
32,587
void (Language language, List<InjectionInfo> list, boolean settingsAvailable, boolean unparsable) { InjectorUtils.registerInjection(language, file, list, registrar); InjectorUtils.registerSupport(support, settingsAvailable, list.get(0).host(), language); InjectorUtils.putInjectedFileUserData(list.get(0).host(), languag...
processInjection
32,588
boolean (String methodName, boolean annoOnly) { if (methodName == null) return false; if (getAnnotatedElementsValue(project).contains(methodName)) { return true; } if (!annoOnly && getXmlAnnotatedElementsValue(project).contains(methodName)) { return true; } return false; }
areThereInjectionsWithName
32,589
String (@Nullable PsiElement operand) { if (operand instanceof GrStringInjection) { return operand.getText(); } return "missingValue"; }
getStringPresentation
32,590
boolean (GrExpression expression, GrCall methodCall) { final GrArgumentList list = methodCall.getArgumentList(); assert list != null; final String methodName; if (methodCall instanceof GrMethodCall) { GrExpression invoked = ((GrMethodCall)methodCall).getInvokedExpression(); final String referenceName = invoked instance...
visitMethodParameter
32,591
boolean (GrReturnStatement parent, PsiMethod method) { if (areThereInjectionsWithName(method.getName(), false)) { process(method, method, -1); } return false; }
visitMethodReturnStatement
32,592
boolean (PsiVariable variable) { if (myConfiguration.getAdvancedConfiguration().getDfaOption() != Configuration.DfaOption.OFF && visitedVars.add(variable)) { ReferencesSearch.search(variable, searchScope).forEach(psiReference -> { final PsiElement element = psiReference.getElement(); if (element instanceof GrExpression...
visitVariable
32,593
boolean (GrAnnotationNameValuePair nameValuePair, PsiAnnotation psiAnnotation) { final String paramName = nameValuePair.getName(); final String methodName = paramName != null ? paramName : PsiAnnotation.DEFAULT_REFERENCED_METHOD_NAME; if (areThereInjectionsWithName(methodName, false)) { final PsiReference reference = n...
visitAnnotationParameter
32,594
boolean (GrReferenceExpression expression) { if (myConfiguration.getAdvancedConfiguration().getDfaOption() == Configuration.DfaOption.OFF) return true; final PsiElement e = expression.resolve(); if (e instanceof PsiVariable && !(e instanceof GrBindingVariable)) { if (e instanceof PsiParameter p) { final PsiElement decl...
visitReference
32,595
void (final PsiModifierListOwner owner, PsiMethod method, int paramIndex) { if (!processAnnotationInjections(owner)) { myShouldStop = true; } for (BaseInjection injection : myConfiguration.getInjections(JavaLanguageInjectionSupport.JAVA_SUPPORT_ID)) { if (injection.acceptsPsiElement(owner)) { if (!processXmlInjections(...
process
32,596
boolean (final PsiModifierListOwner annoElement) { if (annoElement instanceof PsiParameter) { final PsiElement scope = ((PsiParameter)annoElement).getDeclarationScope(); if (scope instanceof PsiMethod && !areThereInjectionsWithName(((PsiNamedElement)scope).getName(), true)) { return true; } } final PsiAnnotation[] anno...
processAnnotationInjections
32,597
boolean (GrExpression expression) { final PsiElement parent = expression.getParent(); if (parent instanceof GrAssignmentExpression assignmentExpression) { final IElementType operation = assignmentExpression.getOperationTokenType(); if (assignmentExpression.getLValue() == expression && operation == GroovyTokenTypes.mPLU...
checkUnparsableReference
32,598
boolean (String methodName, boolean annoOnly) { return true; }
areThereInjectionsWithName
32,599
boolean (PsiVariable owner, PsiElement comment, BaseInjection injection) { processInjectionWithContext(injection, false); return false; }
processCommentInjectionInner