Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
251,500
void (@NotNull HighlightInfo fileLevelHighlightInfo) { Project project = getProject(); DaemonCodeAnalyzerEx codeAnalyzer = DaemonCodeAnalyzerEx.getInstanceEx(project); Future<?> future = EdtExecutorService.getInstance().submit(() -> { if (!project.isDisposed() && !isCanceled()) { codeAnalyzer.removeFileLevelHighlight(g...
removeFileLevelHighlight
251,501
void (@NotNull HighlightInfo fileLevelHighlightInfo, @Nullable RangeHighlighterEx toReuse) { Project project = getProject(); DaemonCodeAnalyzerEx codeAnalyzer = DaemonCodeAnalyzerEx.getInstanceEx(project); Future<?> future = EdtExecutorService.getInstance().submit(() -> { if (!project.isDisposed() && !isCanceled()) { c...
addFileLevelHighlight
251,502
DaemonCodeAnalyzerEx (Project project) { return (DaemonCodeAnalyzerEx)DaemonCodeAnalyzer.getInstance(project); }
getInstanceEx
251,503
boolean (@NotNull Document document, @NotNull Project project, int startOffset, int endOffset, @NotNull Processor<? super HighlightInfo> processor) { LOG.assertTrue(ApplicationManager.getApplication().isReadAccessAllowed()); MarkupModelEx model = (MarkupModelEx)DocumentMarkupModel.forDocument(document, project, true); ...
processHighlightsOverlappingOutside
251,504
void (@NotNull Document document, @NotNull Object reason) { getFileStatusMap().markFileScopeDirty(document, new TextRange(0, document.getTextLength()), document.getTextLength(), reason); }
markDocumentDirty
251,505
boolean (@NotNull FileEditor fileEditor, @NotNull Project project) { return fileEditor instanceof TextEditor textEditor && getInstanceEx(project).getFileStatusMap().allDirtyScopesAreNull(textEditor.getEditor().getDocument()); }
isHighlightingCompleted
251,506
record (@NotNull PsiFile psiRoot, long modificationStamp, long restrictRange, long priorityRange, @NotNull List<? extends @NotNull PsiElement> inside, @NotNull LongList insideRanges, @NotNull List<? extends @NotNull PsiElement> outside, @NotNull LongList outsideRanges, @NotNull List<? extends @NotNull PsiElement> paren...
DividedElements
251,507
void (@NotNull PsiFile file, @NotNull TextRange restrictRange, @NotNull TextRange priorityRange, @Nullable Predicate<? super PsiFile> rootFilter, @NotNull Processor<? super DividedElements> processor) { FileViewProvider viewProvider = file.getViewProvider(); for (Language language : viewProvider.getLanguages()) { PsiFi...
divideInsideAndOutsideAllRoots
251,508
void (@NotNull PsiFile root, long restrictRange, long priorityRange, @NotNull Processor<? super DividedElements> processor) { long modificationStamp = root.getModificationStamp(); DividedElements cached = SoftReference.dereference(root.getUserData(DIVIDED_ELEMENTS_KEY)); DividedElements elements; if (cached != null && ...
divideInsideAndOutsideInOneRoot
251,509
void (@NotNull PsiFile root, long restrictRange, long priorityRange, @NotNull List<PsiElement> inside, @NotNull LongList insideRanges, @NotNull List<PsiElement> outside, @NotNull LongList outsideRanges, @NotNull List<? super PsiElement> outParents, @NotNull LongList outParentRanges) { int startOffset = TextRangeScalarU...
divideInsideAndOutsideInOneRoot
251,510
ThreeState (@NotNull Project project, @NotNull VirtualFile virtualFile) { // might access indexes (to determine the relevant VCS) so it must run in BGT ApplicationManager.getApplication().assertIsNonDispatchThread(); for (SilentChangeVetoer extension : EP_NAME.getExtensionList()) { ThreeState override = extension.canCh...
extensionsAllowToChangeFileSilently
251,511
void (@NotNull ThreeState shouldBeAppliedToInjectionHost) { myShouldBeAppliedToInjectionHost = shouldBeAppliedToInjectionHost; }
setShouldBeAppliedToInjectionHost
251,512
ThreeState () { return myShouldBeAppliedToInjectionHost; }
isShouldBeAppliedToInjectionHost
251,513
String () { return getText(); }
getName
251,514
Icon (int flags) { return AllIcons.Ide.HectorOff; }
getIcon
251,515
void (@IntentionName @NotNull String text) { myText = text; }
setText
251,516
String () { return getText(); }
toString
251,517
boolean () { return SuppressionUtil.ALL.equalsIgnoreCase(myID); }
isSuppressAll
251,518
void (@NotNull PsiElement comment) { SuppressionUtil.replaceSuppressionComment(comment, myID, myReplaceOtherSuppressionIds, getCommentLanguage(comment)); }
replaceSuppressionComment
251,519
Language (@NotNull PsiElement element) { return element.getLanguage(); }
getCommentLanguage
251,520
boolean (@NotNull Project project, @NotNull PsiElement context) { return context.isValid() && getContainer(context) != null; }
isAvailable
251,521
void (@NotNull Project project, @NotNull PsiElement element) { if (!isAvailable(project, element)) return; PsiElement container = getContainer(element); if (container == null) return; if (replaceSuppressionComments(container)) return; createSuppression(project, element, container); }
invoke
251,522
void (@NotNull Project project, @NotNull PsiElement element, @NotNull ModPsiUpdater updater) { invoke(project, element); }
applyFix
251,523
boolean (@NotNull PsiElement container) { List<? extends PsiElement> comments = getCommentsFor(container); if (comments != null) { for (PsiElement comment : comments) { if (comment instanceof PsiComment && SuppressionUtil.isSuppressionComment(comment)) { replaceSuppressionComment(comment); return true; } } } return fal...
replaceSuppressionComments
251,524
String () { String text = getText(); return StringUtil.isEmpty(text) ? AnalysisBundle.message("suppress.inspection.family") : text; }
getFamilyName
251,525
String () { return AnalysisBundle.message("intention.family.name.disable.highlighting.keep.fix"); }
getFamilyName
251,526
boolean (@NotNull Project project, Editor editor, PsiFile file) { InspectionProfileImpl profile = InspectionProjectProfileManager.getInstance(project).getCurrentProfile(); HighlightSeverity usedSeverity = profile.getErrorLevel(HighlightDisplayKey.find(myShortName), file).getSeverity(); return usedSeverity.compareTo(Hig...
isAvailable
251,527
String () { return getFamilyName(); }
getName
251,528
void (@NotNull Project project, PsiFile file, @Nullable Editor editor) { InspectionProfileModifiableModelKt.modifyAndCommitProjectProfile(project, it -> { ToolsImpl tools = it.getToolsOrNull(myShortName, project); if (tools != null) { tools.setLevel(HighlightDisplayLevel.DO_NOT_SHOW); } }); }
applyFix
251,529
boolean () { return false; }
startInWriteAction
251,530
String () { return myAction.getFixAllText(); }
getText
251,531
String () { return AnalysisBundle.message("intention.family.name.fix.all.problems.like.this"); }
getFamilyName
251,532
boolean (@NotNull Project project, Editor editor, PsiFile file) { return true; }
isAvailable
251,533
boolean () { return false; }
startInWriteAction
251,534
void (@NotNull ThreeState shouldBeAppliedToInjectionHost) { myShouldBeAppliedToInjectionHost = shouldBeAppliedToInjectionHost; }
setShouldBeAppliedToInjectionHost
251,535
ThreeState () { return myShouldBeAppliedToInjectionHost; }
isShouldBeAppliedToInjectionHost
251,536
String () { return getText(); }
getName
251,537
Icon (int flags) { return AllIcons.Ide.HectorOff; }
getIcon
251,538
void (@IntentionName @NotNull String text) { myText = text; }
setText
251,539
String () { return getText(); }
toString
251,540
void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { PsiElement element = descriptor.getStartElement(); if (element == null) return; invoke(project, element); }
applyFix
251,541
boolean () { return SuppressionUtil.ALL.equalsIgnoreCase(myID); }
isSuppressAll
251,542
void (@NotNull PsiElement comment) { if (!FileModificationService.getInstance().preparePsiElementsForWrite(comment)) return; WriteAction.run(() -> SuppressionUtil.replaceSuppressionComment(comment, myID, myReplaceOtherSuppressionIds, getCommentLanguage(comment))); }
replaceSuppressionComment
251,543
Language (@NotNull PsiElement element) { return element.getLanguage(); }
getCommentLanguage
251,544
boolean (@NotNull Project project, @NotNull PsiElement context) { return context.isValid() && getContainer(context) != null; }
isAvailable
251,545
boolean (@NotNull PsiElement container) { List<? extends PsiElement> comments = getCommentsFor(container); if (comments != null) { for (PsiElement comment : comments) { if (comment instanceof PsiComment && SuppressionUtil.isSuppressionComment(comment)) { replaceSuppressionComment(comment); return true; } } } return fal...
replaceSuppressionComments
251,546
IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { // Suppression actions have no preview return IntentionPreviewInfo.EMPTY; }
generatePreview
251,547
String () { String text = getText(); return StringUtil.isEmpty(text) ? AnalysisBundle.message("suppress.inspection.family") : text; }
getFamilyName
251,548
void (@Nullable HighlightInfo info, @Nullable IntentionAction action) { if (info != null) { info.registerFix(action, null, null, null, null); } }
registerQuickFixAction
251,549
void (@Nullable HighlightInfo info, @Nullable IntentionAction action, @Nullable List<? extends IntentionAction> options, @Nullable @Nls String displayName) { if (info != null) { info.registerFix(action, options, displayName, null, null); } }
registerQuickFixAction
251,550
void (@Nullable HighlightInfo.Builder builder, @Nullable TextRange fixRange, @NotNull Iterable<? extends IntentionAction> actions) { if (builder != null) { for (IntentionAction action : actions) { builder.registerFix(action, null, null, fixRange, null); } } }
registerQuickFixActions
251,551
void (@Nullable HighlightInfo info, @Nullable TextRange fixRange, @NotNull Iterable<? extends IntentionAction> actions) { if (info != null) { for (IntentionAction action : actions) { info.registerFix(action, null, null, fixRange, null); } } }
registerQuickFixActions
251,552
HighlightingLevelManager (Project project) { return project.getService(HighlightingLevelManager.class); }
getInstance
251,553
AnnotationSession () { return myAnnotationSession; }
getAnnotationSession
251,554
boolean (@Nullable HighlightInfo info) { if (info == null || !accepted(info)) return false; HighlightSeverity severity = info.getSeverity(); if (severity == HighlightSeverity.ERROR) { myErrorCount++; } return myInfos.add(info); }
add
251,555
void () { myErrorCount = 0; myInfos.clear(); }
clear
251,556
boolean () { return myErrorCount != 0; }
hasErrorResults
251,557
int () { return myInfos.size(); }
size
251,558
HighlightInfo (int i) { return myInfos.get(i); }
get
251,559
Project () { return myContextFile.getProject(); }
getProject
251,560
PsiFile () { return myContextFile; }
getContextFile
251,561
boolean (@NotNull HighlightInfo info) { for (HighlightInfoFilter filter : myFilters) { if (!filter.accept(info, getContextFile())) return false; } return true; }
accepted
251,562
TextAttributesScheme () { return key -> key.getDefaultAttributes(); }
getColorsScheme
251,563
TextRange () { return Objects.requireNonNullElseGet(myPriorityRange, ()->getFile().getTextRange()); }
getPriorityRange
251,564
void (@NotNull TextRange range) { myPriorityRange = range; }
setVR
251,565
void (@Nullable HighlightSeverity severity) { myMinimumSeverity = severity; }
setMinimumSeverity
251,566
HighlightSeverity () { return myMinimumSeverity; }
getMinimumSeverity
251,567
boolean (@NotNull IntentionAction intentionAction, @Nullable PsiFile file) { if (!(file instanceof IntentionFilterOwner)) return true; final IntentionFilterOwner.IntentionActionsFilter actionsFilter = ((IntentionFilterOwner)file).getIntentionActionsFilter(); if (actionsFilter == null || actionsFilter == IntentionFilter...
accept
251,568
String () { return myName; }
getName
251,569
boolean (@NotNull String name, boolean isDirectory) { return FileUtil.namesEqual(myName, name); }
acceptItem
251,570
List<NamedScope> (@NotNull Project project) { Set<NamedScope> allScopes = new LinkedHashSet<>(); for (CustomScopesProvider scopesProvider : CustomScopesProvider.CUSTOM_SCOPES_PROVIDER.getExtensions(project)) { List<NamedScope> customScopes = scopesProvider.getFilteredScopes(); if (customScopes.contains(null)) { throw P...
getAllCustomScopes
251,571
boolean (Class hintClass) { return true; }
isClassAcceptable
251,572
boolean (Object element, PsiElement context) { return true; }
isAcceptable
251,573
String () { return "true"; }
toString
251,574
void (@NotNull TextRange newRange) { addOuterRange(newRange, false); }
addOuterRange
251,575
void (@NotNull TextRange newRange, boolean isInsertion) { if (newRange.isEmpty()) { return; } assertRangeOrder(newRange); if (!myOuterAndRemoveRanges.isEmpty()) { int lastItemIndex = myOuterAndRemoveRanges.size() - 1; TextRange lastRange = myOuterAndRemoveRanges.get(lastItemIndex); if (lastRange.getEndOffset() == newRa...
addOuterRange
251,576
void (@NotNull TextRange rangeToRemove) { if (rangeToRemove.isEmpty()) { return; } assertRangeOrder(rangeToRemove); myOuterAndRemoveRanges.add(new RangeToRemove(rangeToRemove.getStartOffset(), rangeToRemove.getEndOffset())); }
addRangeToRemove
251,577
void (@NotNull TextRange newRange) { TextRange range = ContainerUtil.getLastItem(myOuterAndRemoveRanges); assert range == null || newRange.getStartOffset() >= range.getStartOffset(); }
assertRangeOrder
251,578
void (@NotNull CharSequence generatedText) { int shift = 0; ListIterator<TextRange> iterator = myOuterAndRemoveRanges.listIterator(); while (iterator.hasNext()) { TextRange range = iterator.next(); if (range instanceof RangeToRemove) { CharSequence insertedString = generatedText.subSequence(range.getStartOffset() - shi...
addDummyStringsToRangesToRemove
251,579
void (@NotNull OuterLanguageRangePatcher patcher, @NotNull CharSequence originalSourceCode, @NotNull StringBuilder modifiedText) { if (myOuterAndRemoveRanges.isEmpty()) return; int shift = 0; ListIterator<TextRange> iterator = myOuterAndRemoveRanges.listIterator(); while (iterator.hasNext()) { TextRange outerElementRan...
insertDummyStringIntoInsertionRanges
251,580
void (@NotNull TreeElement leafOrLazyParseable, @NotNull TextRange rangeWithinLazyParseable) { if (rangeWithinLazyParseable instanceof RangeToRemove && ((RangeToRemove)rangeWithinLazyParseable).myTextToRemove == null) return; RangeCollectorImpl lazyParseableCollector = leafOrLazyParseable.getUserData(OUTER_ELEMENT_RANG...
addRangeToLazyParseableCollector
251,581
boolean (@NotNull ASTNode element) { return element instanceof LeafElement || TreeUtil.isCollapsedChameleon(element) && element.getElementType() instanceof TemplateDataElementType.TemplateAwareElementType; }
isSuitableElement
251,582
void (@NotNull CompositeElement templateFileElement, @NotNull TextRange outerElementRange, @NotNull CharSequence sourceCode, @NotNull CharTable charTable) { assert isLastRange(myOuterAndRemoveRanges, outerElementRange) : "This should only happen for the last inserted range. Got " + myOuterAndRemoveRanges.lastIndexOf(ou...
insertLastOuterElementForRange
251,583
boolean (@NotNull List<TextRange> outerElementsRanges, @NotNull TextRange outerElementRange) { return outerElementsRanges.get(outerElementsRanges.size() - 1) == outerElementRange; }
isLastRange
251,584
TreeElement (@NotNull TreeElement currentLeaf, int currentLeafOffset, @NotNull TextRange outerElementRange, @NotNull CharSequence sourceCode, @NotNull TreePatcher templateTreePatcher, @NotNull CharTable charTable) { CharSequence outerElementText = outerElementRange.subSequence(sourceCode); if (currentLeaf instanceof La...
insertOuterElementFromRange
251,585
TreeElement (@NotNull TreeElement currentLeaf, @NotNull CharSequence text) { TemplateDataElementType.TemplateAwareElementType elementType = (TemplateDataElementType.TemplateAwareElementType)currentLeaf.getElementType(); TreeElement newElement = elementType.createTreeElement(text); RangeCollectorImpl collector = current...
newLazyParseable
251,586
TreeElement (@NotNull TreeElement currentLeafOrLazyParseable, int currentLeafOffset, @NotNull TextRange rangeToProcess, @NotNull CharTable charTable) { TextRange intersection = rangeToProcess.intersection(TextRange.from(currentLeafOffset, currentLeafOrLazyParseable.getTextLength())); assert intersection != null; TextRa...
cutPartOfLeaf
251,587
ASTNode (@NotNull ASTNode chameleon, @NotNull Language language, @NotNull Function<? super @NotNull CharSequence, ? extends @NotNull ASTNode> parser) { CharSequence chars = chameleon.getChars(); if (myOuterAndRemoveRanges.isEmpty()) return parser.apply(chars); StringBuilder stringBuilder = applyOuterAndRemoveRanges(cha...
applyRangeCollectorAndExpandChameleon
251,588
StringBuilder (CharSequence chars) { StringBuilder stringBuilder = new StringBuilder(chars); int shift = 0; for (TextRange outerElementRange : myOuterAndRemoveRanges) { if (outerElementRange instanceof RangeToRemove) { CharSequence textToRemove = ((RangeToRemove)outerElementRange).myTextToRemove; if (textToRemove != nu...
applyOuterAndRemoveRanges
251,589
TreeElement (@NotNull TreeElement leaf, @NotNull TextRange rangeToRemove, @NotNull CharTable table) { CharSequence chars = leaf.getChars(); String res = rangeToRemove.replace(chars.toString(), ""); TreeElement newLeaf = leaf instanceof LeafElement ? ASTFactory.leaf(leaf.getElementType(), table.intern(res)) : newLazyPar...
removeRange
251,590
CharSequence (@NotNull CharSequence sourceCode, @NotNull TemplateDataModifications modifications) { assert myOuterAndRemoveRanges.isEmpty(); List<TextRange> ranges = modifications.myOuterAndRemoveRanges; if (ranges.isEmpty()) return sourceCode; for (TextRange range : ranges) { if (range instanceof RangeToRemove) { if (...
applyTemplateDataModifications
251,591
TextRange (int delta) { if (delta == 0) return this; return myTextToRemove != null ? new RangeToRemove(getStartOffset() - delta, myTextToRemove) : new RangeToRemove(getStartOffset() - delta, getEndOffset() - delta); }
shiftLeft
251,592
TextRange (@NotNull TextRange range) { int newStart = Math.max(getStartOffset(), range.getStartOffset()); int newEnd = Math.min(getEndOffset(), range.getEndOffset()); assertProperRange(newStart, newEnd, "Invalid range"); return myTextToRemove != null ? new RangeToRemove(newStart, myTextToRemove.subSequence(newStart - g...
intersection
251,593
String () { return "RangeToRemove" + super.toString(); }
toString
251,594
TextRange (int delta) { if (delta == 0) return this; return new InsertionRange(getStartOffset() - delta, getEndOffset() - delta); }
shiftLeft
251,595
TextRange (@NotNull TextRange range) { int newStart = Math.max(getStartOffset(), range.getStartOffset()); int newEnd = Math.min(getEndOffset(), range.getEndOffset()); assertProperRange(newStart, newEnd, "Invalid range"); return new InsertionRange(newStart, newEnd); }
intersection
251,596
String () { return "InsertionRange" + super.toString(); }
toString
251,597
void (@NotNull TextRange newRange) { addOuterRange(newRange, false); }
addOuterRange
251,598
void (@NotNull TextRange range, boolean isInsertion) { myOuterAndRemoveRanges.add(isInsertion ? new RangeCollectorImpl.InsertionRange(range.getStartOffset(), range.getEndOffset()) : range); }
addOuterRange
251,599
void (int startOffset, @NotNull CharSequence textToInsert) { myOuterAndRemoveRanges.add(new RangeCollectorImpl.RangeToRemove(startOffset, textToInsert)); }
addRangeToRemove