Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
266,400
OptNumber (@NotNull String bindPrefix) { return new OptNumber(bindPrefix + "." + bindId, splitLabel, minValue, maxValue, description); }
prefix
266,401
OptNumber (@NotNull @NlsContexts.Tooltip String description) { return description(HtmlChunk.text(description)); }
description
266,402
OptNumber (@NotNull HtmlChunk description) { if (this.description != null) { throw new IllegalStateException("Description is already set"); } return new OptNumber(bindId, splitLabel, minValue, maxValue, description); }
description
266,403
OptTab (@NotNull String bindPrefix) { return new OptTab(label, ContainerUtil.map(children, c -> c.prefix(bindPrefix))); }
prefix
266,404
OptTableColumn (@NotNull String bindPrefix) { return new OptTableColumn(bindPrefix + "." + bindId, name, validator); }
prefix
266,405
OptRegularComponent (@NotNull String bindPrefix) { return new OptTable(label, ContainerUtil.map(children, child -> child.prefix(bindPrefix)), description); }
prefix
266,406
OptTable (@NotNull @NlsContexts.Tooltip String description) { return description(HtmlChunk.text(description)); }
description
266,407
OptTable (@NotNull HtmlChunk description) { if (this.description != null) { throw new IllegalStateException("Description is already set"); } return new OptTable(label, children, description); }
description
266,408
OptExpandableString (@NotNull @NlsContexts.Tooltip String description) { return description(HtmlChunk.text(description)); }
description
266,409
OptExpandableString (@NotNull HtmlChunk description) { if (this.description != null) { throw new IllegalStateException("Description is already set"); } return new OptExpandableString(bindId, label, separator, description); }
description
266,410
OptExpandableString (@NotNull String bindPrefix) { return new OptExpandableString(bindPrefix + "." + bindId, label, separator, description); }
prefix
266,411
StringValidator (@NotNull String validatorId, @NotNull Function<@NotNull String, @NlsContexts.HintText @Nullable String> fn) { return new StringValidator() { @Override public @NotNull String validatorId() { return validatorId; } @Override public @Nullable String getErrorMessage(@Nullable Project project, @NotNull Strin...
of
266,412
String () { return validatorId; }
validatorId
266,413
ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { return perform(project, List.of(descriptor)); }
perform
266,414
void (@NotNull Project project, CommonProblemDescriptor @NotNull [] descriptors, @NotNull List<PsiElement> psiElementsToIgnore, @Nullable Runnable refreshViews) { List<ProblemDescriptor> descriptorList = ContainerUtil.filterIsInstance(descriptors, ProblemDescriptor.class); if (!descriptorList.isEmpty()) { ModCommand co...
applyFix
266,415
record ( @NotNull Project project, @NotNull PsiFile file, int offset, @NotNull TextRange selection, @Nullable PsiElement element ) { /** * @param file file copy * @return new context, which is bound to the file copy, rather than the original file */ public @NotNull ActionContext withFile(@NotNull PsiFile file) { return...
ActionContext
266,416
ActionContext (@NotNull PsiFile file) { return new ActionContext(project, file, offset, selection, element); }
withFile
266,417
ActionContext (@NotNull PsiElement element) { return new ActionContext(project, file, offset, selection, element); }
withElement
266,418
ActionContext (int offset) { return new ActionContext(project, file, offset, selection, element); }
withOffset
266,419
ActionContext (@Nullable Editor editor, @NotNull PsiFile file) { if (editor == null) { return new ActionContext(file.getProject(), file, 0, TextRange.from(0, 0), null); } SelectionModel model = editor.getSelectionModel(); int start = model.getSelectionStart(); int end = model.getSelectionEnd(); return new ActionContext...
from
266,420
ActionContext (@NotNull ProblemDescriptor descriptor) { PsiElement startElement = descriptor.getStartElement(); PsiFile file = startElement.getContainingFile(); PsiElement psiElement = descriptor.getPsiElement(); TextRange range = descriptor.getTextRangeInElement(); if (range != null) { range = range.shiftRight(psiElem...
from
266,421
boolean () { return false; }
startInWriteAction
266,422
void (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { ModCommand command = perform(project, descriptor); ModCommandExecutor.getInstance().executeInteractively(ActionContext.from(descriptor), command, null); }
applyFix
266,423
IntentionPreviewInfo (@NotNull Project project, @NotNull ProblemDescriptor previewDescriptor) { ModCommand modCommand = perform(project, previewDescriptor); return IntentionPreviewUtils.getModCommandPreview(modCommand, ActionContext.from(previewDescriptor)); }
generatePreview
266,424
boolean () { return true; }
isEmpty
266,425
TemplateField (@NotNull TextRange range) { return new ExpressionField(range, expression); }
withRange
266,426
TemplateField (@NotNull TextRange range) { return new DependantVariableField(range, varName, dependantVariableName, alwaysStopAt); }
withRange
266,427
ModUpdateReferences (@NotNull TextRange newRange) { return newRange.equals(newRange()) ? this : new ModUpdateReferences(file, oldText, oldRange, newRange); }
withNewRange
266,428
ModCommand () { return ModNothing.NOTHING; }
nop
266,429
ModCommand (@NotNull String content) { return new ModCopyToClipboard(content); }
copyToClipboard
266,430
ModCommand (@NotNull @NlsContexts.Tooltip String message) { return new ModDisplayMessage(message, ModDisplayMessage.MessageKind.ERROR); }
error
266,431
ModCommand (@NotNull @NlsContexts.Tooltip String message) { return new ModDisplayMessage(message, ModDisplayMessage.MessageKind.INFORMATION); }
info
266,432
ModCommand (@NotNull PsiElement target) { PsiFile psiFile = target.getContainingFile(); TextRange range = target.getTextRange(); Document document = psiFile.getViewProvider().getDocument(); if (document instanceof DocumentWindow window) { range = window.injectedToHost(range); psiFile = InjectedLanguageManager.getInstan...
select
266,433
ModCommand (@NotNull TextAttributesKey attributes, @NotNull PsiElement @NotNull ... elements) { if (elements.length == 0) return nop(); VirtualFile file = elements[0].getContainingFile().getVirtualFile(); var highlights = ContainerUtil.map( elements, e -> new ModHighlight.HighlightInfo(e.getTextRange(), attributes, tru...
highlight
266,434
ModCommand (@NotNull PsiElement @NotNull ... elements) { return highlight(EditorColors.SEARCH_RESULT_ATTRIBUTES, elements); }
highlight
266,435
ModCommand (@NotNull ActionContext context, @NotNull Consumer<@NotNull ModPsiUpdater> updater) { return ModCommandService.getInstance().psiUpdate(context, updater); }
psiUpdate
266,436
ModCommand (@NotNull ActionContext context, @NotNull T element) { return function.apply(element); }
perform
266,437
Presentation (@NotNull ActionContext context, @NotNull T section) { return Presentation.of(getFamilyName()).withHighlighting(range.apply(section)); }
getPresentation
266,438
String () { return title; }
getFamilyName
266,439
void (@NotNull ActionContext context, @NotNull T element, @NotNull ModPsiUpdater updater) { action.accept(element, updater); }
invoke
266,440
Presentation (@NotNull ActionContext context, @NotNull T section) { return Presentation.of(getFamilyName()).withHighlighting(range.apply(section)); }
getPresentation
266,441
String () { return title; }
getFamilyName
266,442
String () { return "Step: [" + title + "] " + element.getText(); }
toString
266,443
ModCommand (@NotNull ModCommand command, @NotNull PsiFile file, int offset, boolean leanRight) { VirtualFile virtualFile = file.getVirtualFile(); ModCommand finalCommand = nop(); for (ModCommand sub : command.unpack()) { if (sub instanceof ModUpdateFileText updateFileText && updateFileText.file().equals(virtualFile)) {...
moveCaretAfter
266,444
boolean () { return actions.isEmpty(); }
isEmpty
266,445
VirtualFile () { return myParent; }
getParent
266,446
boolean () { return ContainerUtil.all(commands, ModCommand::isEmpty); }
isEmpty
266,447
E (@NotNull PsiElement element, @NotNull ActionContext context) { Class<E> cls = Objects.requireNonNull(myClass); if (!cls.isInstance(element)) return null; E e = cls.cast(element); return isElementApplicable(e, context) ? e : null; }
getIfSatisfied
266,448
boolean (@NotNull E element, @NotNull ActionContext context) { return true; }
isElementApplicable
266,449
ModCommand (@NotNull ActionContext context) { E element = getElement(context); if (element == null) return ModNothing.NOTHING; return perform(context, element); }
perform
266,450
IntentionPreviewInfo (@NotNull ActionContext context) { E element = getElement(context); if (element == null) return IntentionPreviewInfo.EMPTY; return generatePreview(context, element); }
generatePreview
266,451
IntentionPreviewInfo (ActionContext context, E element) { ModCommand command = perform(context, element); return IntentionPreviewUtils.getModCommandPreview(command, context); }
generatePreview
266,452
ModPsiNavigator (@NotNull Editor editor) { return new ModPsiNavigator() { @Override public void select(@NotNull PsiElement element) { select(element.getTextRange()); } @Override public void select(@NotNull TextRange range) { editor.getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset()); } @Overr...
fromEditor
266,453
void (@NotNull PsiElement element) { select(element.getTextRange()); }
select
266,454
void (@NotNull TextRange range) { editor.getSelectionModel().setSelection(range.getStartOffset(), range.getEndOffset()); }
select
266,455
void (int offset) { editor.getCaretModel().moveToOffset(offset); }
moveTo
266,456
void (@NotNull PsiElement element) { moveTo(element.getTextRange().getStartOffset()); }
moveTo
266,457
void (char ch) { Document document = editor.getDocument(); int offset = editor.getCaretModel().getOffset(); CharSequence sequence = document.getCharsSequence(); while (offset > 0 && sequence.charAt(offset) != ch) { offset--; } editor.getCaretModel().moveToOffset(offset); }
moveToPrevious
266,458
int () { return editor.getCaretModel().getOffset(); }
getCaretOffset
266,459
ModCommand (@NotNull ActionContext context, @NotNull E element) { try { return ModCommand.psiUpdate(element, (e, upd) -> invoke(context, e, upd)); } catch (ProcessCanceledException e) { throw e; } catch (RuntimeException e) { throw new RuntimeException("When launching " + getFamilyName() + " (" + getClass().getName() +...
perform
266,460
record (@NotNull List<@NotNull @Nls String> messages) { }
Conflict
266,461
boolean () { return conflicts().isEmpty() && nextStep().isEmpty(); }
isEmpty
266,462
ModCommandService () { return ApplicationManager.getApplication().getService(ModCommandService.class); }
getInstance
266,463
boolean () { return highlights().isEmpty(); }
isEmpty
266,464
record (@NotNull TextRange range, @NotNull TextAttributesKey attributesKey, boolean hideByTextChange) { /** * @param range new range * @return the same info but with updated range */ public @NotNull HighlightInfo withRange(@NotNull TextRange range) { if (range.getStartOffset() == range().getStartOffset() && range.getEn...
HighlightInfo
266,465
HighlightInfo (@NotNull TextRange range) { if (range.getStartOffset() == range().getStartOffset() && range.getEndOffset() == range().getEndOffset()) { return this; } return new HighlightInfo(range, attributesKey, hideByTextChange); }
withRange
266,466
boolean () { return options.isEmpty(); }
isEmpty
266,467
record (@NotNull String bindId, @NotNull Object oldValue, @NotNull Object newValue) {}
ModifiedInspectionOption
266,468
boolean () { return oldText.equals(newText); }
isEmpty
266,469
record (int offset, int oldLength, int newLength) { public Fragment { if (offset < 0) throw new IllegalArgumentException("Negative offset"); if (oldLength < 0) throw new IllegalArgumentException("Negative oldLength"); if (newLength < 0) throw new IllegalArgumentException("Negative newLength"); } public @NotNull Fragmen...
Fragment
266,470
Fragment (int diff) { return diff == 0 ? this : new Fragment(offset + diff, oldLength, newLength); }
shift
266,471
boolean (@NotNull Fragment other) { return Math.max(offset, other.offset) <= Math.min(offset + newLength, other.offset + other.oldLength); }
intersects
266,472
int (int pos) { if (pos <= offset) return pos; if (pos <= offset + oldLength) return offset; return pos - oldLength + newLength; }
adjustForward
266,473
int (int pos) { if (pos < offset) return pos; if (pos <= offset + oldLength) return offset + newLength; return pos - oldLength + newLength; }
adjustForwardLeanRight
266,474
int (int pos) { if (pos <= offset) return pos; if (pos <= offset + newLength) return offset; return pos - newLength + oldLength; }
adjustBackward
266,475
Fragment (@NotNull Fragment next) { int newStartOffset = Math.min(offset, next.offset); int newOrigEndOffset = Math.max(offset + oldLength, adjustBackward(next.offset + next.oldLength)); int newUpdatedEndOffset = Math.max(next.adjustForward(offset + newLength), next.offset + next.newLength); return new Fragment(newStar...
mergeWithNext
266,476
ModRenameSymbol (@NotNull RenameSymbolRange range) { return range.equals(symbolRange) ? this : new ModRenameSymbol(file, range, nameSuggestions); }
withRange
266,477
record (@NotNull TextRange range, @Nullable TextRange nameIdentifierRange) { }
RenameSymbolRange
266,478
ModCommandExecutor () { return ApplicationManager.getApplication().getService(ModCommandExecutor.class); }
getInstance
266,479
String () { return switch (this) { case SUCCESS -> AnalysisBundle.message("modcommand.result.action.completed.successfully"); case INTERACTIVE -> AnalysisBundle.message("modcommand.result.action.is.interactive.only.cannot.be.executed.in.batch"); case NOTHING -> AnalysisBundle.message("modcommand.result.action.has.no.ef...
getMessage
266,480
String () { return message; }
getMessage
266,481
record ( @NotNull @IntentionName String name, @NotNull PriorityAction.Priority priority, @NotNull List<HighlightRange> rangesToHighlight, @Nullable Icon icon, @Nullable Presentation.FixAllOption fixAllOption ) { /** * @param priority wanted priority of the action * @return new presentation with updated priority */ publ...
Presentation
266,482
Presentation (@NotNull PriorityAction.Priority priority) { return new Presentation(name, priority, rangesToHighlight, icon, fixAllOption); }
withPriority
266,483
Presentation (@Nullable Icon icon) { return new Presentation(name, priority, rangesToHighlight, icon, fixAllOption); }
withIcon
266,484
Presentation (@NotNull ModCommandAction thisAction) { FixAllOption fixAllOption = new FixAllOption( AnalysisBundle.message("intention.name.apply.all.fixes.in.file", thisAction.getFamilyName()), action -> action.getClass().equals(thisAction.getClass())); return new Presentation(name, priority, rangesToHighlight, icon, f...
withFixAllOption
266,485
Presentation (@NotNull ModCommandAction thisAction, @NotNull Predicate<@NotNull ModCommandAction> belongsToMyFamily) { FixAllOption fixAllOption = new FixAllOption( AnalysisBundle.message("intention.name.apply.all.fixes.in.file", thisAction.getFamilyName()), belongsToMyFamily); return new Presentation(name, priority, r...
withFixAllOption
266,486
Presentation (@NotNull HighlightRange @NotNull ... ranges) { return new Presentation(name, priority, List.of(ranges), icon, fixAllOption); }
withHighlighting
266,487
Presentation (@NotNull TextRange @NotNull ... ranges) { List<HighlightRange> highlightRanges = ContainerUtil.map(ranges, r -> new HighlightRange(r, EditorColors.SEARCH_RESULT_ATTRIBUTES)); return new Presentation(name, priority, highlightRanges, icon, fixAllOption); }
withHighlighting
266,488
Presentation (@NotNull @IntentionName String name) { return new Presentation(name, PriorityAction.Priority.NORMAL, List.of(), null, null); }
of
266,489
record ( @NotNull @IntentionName String name, @NotNull Predicate<@NotNull ModCommandAction> belongsToMyFamily ) {}
FixAllOption
266,490
record ( @NotNull TextRange range, @NotNull TextAttributesKey highlightKey ) {}
HighlightRange
266,491
ModCommand (@NotNull Project project, @NotNull ProblemDescriptor descriptor) { return ModCommand.psiUpdate(descriptor.getStartElement(), (e, updater) -> applyFix(project, e, updater)); }
perform
266,492
ModCommand (@NotNull ActionContext context) { return myAction.perform(context); }
perform
266,493
String () { return myAction.getFamilyName(); }
getFamilyName
266,494
IntentionPreviewInfo (@NotNull ActionContext context) { return myAction.generatePreview(context); }
generatePreview
266,495
boolean (Object o) { return myConditionClass.isInstance(o); }
isInstance
266,496
String () { return myConditionClass.getName(); }
toString
266,497
boolean (@NotNull VirtualFile file, @NotNull Project project) { return ReadAction.compute(() -> { if (project.isDisposed() || !file.isValid()) return false; for (GeneratedSourcesFilter filter : EP_NAME.getExtensionList()) { if (filter.isGeneratedSource(file, project)) { return true; } } return false; }); }
isGeneratedSourceByAnyFilter
266,498
UndoManager (@NotNull Project project) { return project.isDefault() ? getGlobalInstance() : project.getService(UndoManager.class); }
getInstance
266,499
UndoManager () { return ApplicationManager.getApplication().getService(UndoManager.class); }
getGlobalInstance