Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
266,300
boolean () { return myEP != null ? myEP.cleanupTool : getTool() instanceof CleanupLocalInspectionTool; }
isCleanupTool
266,301
String () { return myEP != null ? myEP.getShortName() : getTool().getShortName(); }
getShortName
266,302
String () { return getShortName(); }
getID
266,303
boolean () { return myEP == null ? getTool().isEnabledByDefault() : myEP.enabledByDefault; }
isEnabledByDefault
266,304
HighlightDisplayLevel () { return myEP == null ? getTool().getDefaultLevel() : myEP.getDefaultLevel(); }
getDefaultLevel
266,305
String () { return getShortName() + ".html"; }
getDescriptionFileName
266,306
String () { return getShortName(); }
getFolderName
266,307
String () { return getTool().getMainToolId(); }
getMainToolId
266,308
E () { return myEP; }
getExtension
266,309
String () { return getShortName(); }
toString
266,310
void (@NotNull Project project) { T tool = myTool; if (tool != null) { tool.cleanup(project); } }
cleanup
266,311
boolean (Set<String> projectTypes) { if (myEP == null) return true; String projectType = myEP.projectType; if (projectType == null) return true; return projectTypes.contains(projectType); }
isApplicable
266,312
Set<String> (@NotNull Language language, boolean applyToDialects) { List<Language> dialects = language.getDialects(); if (!applyToDialects || dialects.isEmpty()) return Set.of(language.getID()); Collection<@NotNull Language> transitiveDialects = language.getTransitiveDialects(); Set<String> result = new HashSet<>(1 + t...
getLanguageWithDialects
266,313
boolean (@NotNull Set<String> elementDialectIds, @NotNull Language language, boolean applyToDialects) { if (elementDialectIds.contains(language.getID())) { return true; } if (applyToDialects) { for (Language dialect : language.getTransitiveDialects()) { if (elementDialectIds.contains(dialect.getID())) { return true; } ...
existsDialectOneOf
266,314
boolean (@NotNull Set<String> elementDialectIds, @NotNull String toolLanguageId, boolean applyToDialects) { if (elementDialectIds.contains(toolLanguageId)) { return true; } Language language = Language.findLanguageByID(toolLanguageId); if (language == null) { // unknown language in plugin.xml, ignore return false; } if...
isToolLanguageOneOf
266,315
EntryPointsManager (Project project) { return project.getService(EntryPointsManager.class); }
getInstance
266,316
void (boolean implicitWritesOnly) { configureAnnotations(); }
configureAnnotations
266,317
int () { return myTotalAmount; }
getTotalAmount
266,318
void (int totalAmount) { myTotalAmount = totalAmount; myDoneAmount = 0; }
setTotalAmount
266,319
int () { return myDoneAmount; }
getDoneAmount
266,320
void (int doneAmount) { myDoneAmount = doneAmount; }
setDoneAmount
266,321
float () { float localProgress; if (getTotalAmount() == 0) { localProgress = 0; } else { localProgress = 1.0f * getDoneAmount() / getTotalAmount(); } return localProgress; }
getProgress
266,322
void (@NotNull String shortName, @NotNull InspectionElementsMerger merger) { ourAdditionalMergers.put(shortName, merger); }
addMerger
266,323
List<String> (@NotNull String id) { return EP_NAME.getExtensionList().stream() .filter(merger -> ArrayUtil.contains(id, merger.getSourceToolNames()) || ArrayUtil.contains(id, merger.getSuppressIds())) .map(InspectionElementsMerger::getMergedToolName).toList(); }
getMergedToolNames
266,324
boolean (@NotNull Project project, boolean online, @NotNull Runnable rerunAction) { return true; }
isProjectConfiguredToRunInspections
266,325
void (@NotNull RefEntity elem) {}
visitElement
266,326
void (@NotNull RefFile file) { visitElement(file); }
visitFile
266,327
void (@NotNull RefModule module) { visitElement(module); }
visitModule
266,328
void (@NotNull RefDirectory directory) { visitElement(directory); }
visitDirectory
266,329
boolean (@Nullable PsiElement element) { if (element == null) { return false; } for (ImplicitUsageProvider provider : ImplicitUsageProvider.EP_NAME.getExtensionList()) { if (provider.isImplicitUsage(element)) return true; } return false; }
isImplicitUsage
266,330
boolean (@Nullable PsiElement element) { if (element == null) { return false; } for (ImplicitUsageProvider provider : ImplicitUsageProvider.EP_NAME.getExtensionList()) { if (provider.isImplicitRead(element)) return true; } return false; }
isImplicitRead
266,331
boolean (RefEntity element, @NotNull Collection<? extends RefEntity> entities) { for (RefEntity refEntity : entities) { if (Comparing.equal(refEntity, element)) { return true; } } return false; }
contains
266,332
boolean (@Nullable PsiElement element) { if (element == null) { return false; } for (ImplicitUsageProvider provider : ImplicitUsageProvider.EP_NAME.getExtensionList()) { if (provider.isImplicitWrite(element)) return true; } return EntryPointsManager.getInstance(element.getProject()).isImplicitWrite(element); }
isImplicitWrite
266,333
void (RefManager refManager) { }
initialize
266,334
boolean () { return true; }
showUI
266,335
void (Runnable runnable) { runnable.run(); }
executeTask
266,336
boolean (VirtualFile file) { return true; }
isInGraph
266,337
void (RefElement refElement) { }
onInitialize
266,338
void (RefElement refElement) { }
onReferencesBuild
266,339
void (RefElement refWhat, RefElement refFrom, boolean referencedFromClassInitializer) { }
onMarkReferenced
266,340
void (RefElement refWhat, RefElement refFrom, boolean referencedFromClassInitializer, boolean forReading, boolean forWriting, PsiElement referenceElement) { onMarkReferenced(refWhat, refFrom, referencedFromClassInitializer, forReading, forWriting); }
onMarkReferenced
266,341
void (RefElement refWhat, RefElement refFrom, boolean referencedFromClassInitializer, boolean forReading, boolean forWriting) { onMarkReferenced(refWhat, refFrom, referencedFromClassInitializer); }
onMarkReferenced
266,342
void (PsiElement what, PsiElement from, boolean referencedFromClassInitializer) {}
onMarkReferenced
266,343
OptionPaneRenderer () { return ApplicationManager.getApplication().getService(OptionPaneRenderer.class); }
getInstance
266,344
JComponent (@NotNull InspectionProfileEntry tool, @NotNull Disposable parent, @NotNull Project project) { OptPane pane = tool.getOptionsPane(); if (pane.equals(OptPane.EMPTY)) { return tool.createOptionsPanel(); } return getInstance().render(tool.getOptionController(), pane, parent, project); }
createOptionsPanel
266,345
boolean (@NotNull InspectionProfileEntry tool) { return !tool.getOptionsPane().equals(OptPane.EMPTY) || tool.createOptionsPanel() != null; }
hasSettings
266,346
boolean (String optionName) { final Boolean value = ReflectionUtil.getField(myInspection.getClass(), myInspection, boolean.class, optionName); assert value != null : "field '" + optionName + "'not found"; return value; }
getOption
266,347
void (final String optionName, boolean optionValue) { ReflectionUtil.setField(myInspection.getClass(), myInspection, boolean.class, optionName, optionValue); }
setOption
266,348
OptHorizontalStack (@NotNull String bindPrefix) { return new OptHorizontalStack(ContainerUtil.map(children, c -> c.prefix(bindPrefix))); }
prefix
266,349
OptDropdown (@NotNull String bindPrefix) { return new OptDropdown(bindPrefix + "." + bindId, splitLabel, options); }
prefix
266,350
record (@NotNull String key, @NotNull LocMessage label) {}
Option
266,351
OptStringList (@NotNull String bindPrefix) { return new OptStringList(bindPrefix + "." + bindId, label, validator, description); }
prefix
266,352
OptStringList (@NotNull @NlsContexts.Tooltip String description) { return description(HtmlChunk.text(description)); }
description
266,353
OptStringList (@NotNull HtmlChunk description) { if (this.description != null) { throw new IllegalStateException("Description is already set"); } return new OptStringList(bindId, label, validator, description); }
description
266,354
String () { return "regex"; }
validatorId
266,355
OptCheckbox (@NotNull @NlsContexts.Tooltip String description) { return description(HtmlChunk.text(description)); }
description
266,356
OptCheckbox (@NotNull HtmlChunk description) { if (this.description != null) { throw new IllegalStateException("Description is already set"); } return new OptCheckbox(bindId(), label(), children(), description); }
description
266,357
OptCheckbox (@NotNull String bindPrefix) { return new OptCheckbox(bindPrefix + "." + bindId, label, ContainerUtil.map(children, c -> c.prefix(bindPrefix)), description); }
prefix
266,358
OptTabSet (@NotNull String bindPrefix) { return new OptTabSet(ContainerUtil.map(children, c -> c.prefix(bindPrefix))); }
prefix
266,359
T (@NotNull @NonNls String data) { if (!data.isEmpty()) throw new IllegalArgumentException(); return null; }
deserializeData
266,360
OptCustom (T t) { return new OptCustom(componentId(), serializeData(t)); }
component
266,361
OptCheckboxPanel (@NotNull String bindPrefix) { return new OptCheckboxPanel(ContainerUtil.map(children, c -> c.prefix(bindPrefix))); }
prefix
266,362
void (@NotNull String _bindId, Object value) { if (_bindId.equals(bindId)) { //noinspection unchecked setter.accept((T)value); } else { controller.setOption(_bindId, value); } }
setOption
266,363
Object (@NotNull String _bindId) { if (_bindId.equals(bindId)) { return getter.get(); } return controller.getOption(_bindId); }
getOption
266,364
void (@NotNull String _bindId, Object value) { delegate.setOption(_bindId, value); if (_bindId.equals(bindId)) { consumer.accept(value); } }
setOption
266,365
Object (@NotNull String bindId) { return delegate.getOption(bindId); }
getOption
266,366
void (@NotNull String bindId, Object value) { delegate.setOption(bindId, value); consumer.accept(bindId, value); }
setOption
266,367
Object (@NotNull String bindId) { return delegate.getOption(bindId); }
getOption
266,368
void (@NotNull String bindId, Object value) { if (bindId.startsWith(fullPrefix)) { prefixController.setOption(bindId.substring(fullPrefix.length()), value); } else { controller.setOption(bindId, value); } }
setOption
266,369
Object (@NotNull String bindId) { if (bindId.startsWith(fullPrefix)) { return prefixController.getOption(bindId.substring(fullPrefix.length())); } return controller.getOption(bindId); }
getOption
266,370
OptionController (@NotNull Function<@NotNull String, Object> getter, @NotNull BiConsumer<@NotNull String, Object> setter) { return new OptionController() { @Override public void setOption(@NotNull String bindId, Object value) { setter.accept(bindId, value); } @Override public Object getOption(@NotNull String bindId) { ...
of
266,371
void (@NotNull String bindId, Object value) { setter.accept(bindId, value); }
setOption
266,372
Object (@NotNull String bindId) { return getter.apply(bindId); }
getOption
266,373
OptionController () { return new OptionController() { @Override public void setOption(@NotNull String bindId, Object value) { throw new IllegalArgumentException(bindId); } @Override public Object getOption(@NotNull String bindId) { throw new IllegalArgumentException(bindId); } }; }
empty
266,374
void (@NotNull String bindId, Object value) { throw new IllegalArgumentException(bindId); }
setOption
266,375
Object (@NotNull String bindId) { throw new IllegalArgumentException(bindId); }
getOption
266,376
OptionController (@NotNull Object obj) { return of( bindId -> { int dot = bindId.indexOf('.'); Field field = getField(obj, bindId, dot); Object value = ReflectionUtil.getFieldValue(field, obj); if (dot >= 0) { if (!(value instanceof OptionContainer container)) { throw new IllegalArgumentException(obj.getClass().getName...
fieldsOf
266,377
Field (@NotNull Object obj, String bindId, int dot) { String fieldName = dot >= 0 ? bindId.substring(0, dot) : bindId; Field field; try { field = ReflectionUtil.findAssignableField(obj.getClass(), null, fieldName); } catch (NoSuchFieldException e) { throw new IllegalArgumentException( "Inspection " + obj.getClass().get...
getField
266,378
OptString (@NotNull @NlsContexts.Tooltip String description) { return description(HtmlChunk.text(description)); }
description
266,379
OptString (@NotNull HtmlChunk description) { if (this.description != null) { throw new IllegalStateException("Description is already set"); } return new OptString(bindId, splitLabel, validator, width, description); }
description
266,380
OptString (@NotNull String bindPrefix) { return new OptString(bindPrefix + "." + bindId, splitLabel, validator, width, description); }
prefix
266,381
OptGroup (@NotNull String bindPrefix) { return new OptGroup(label, ContainerUtil.map(children, c -> c.prefix(bindPrefix))); }
prefix
266,382
record (@NotNull List<@NotNull OptRegularComponent> components) { public OptPane { Set<String> ids = new HashSet<>(); traverse(components, comp -> { if (comp instanceof OptControl ctl && !ids.add(ctl.bindId())) { throw new IllegalArgumentException("Repeating control identifier inside the pane: " + ctl.bindId()); } retu...
OptPane
266,383
boolean (OptComponent cmp) { if (cmp instanceof OptControl ctl && ctl.bindId().equals(bindId)) { found = ctl; return false; } return true; }
test
266,384
boolean (@NotNull List<? extends @NotNull OptComponent> components, @NotNull Predicate<@NotNull OptComponent> processor) { for (OptComponent component : components) { if (!processor.test(component) || !traverse(component.children(), processor)) return false; } return true; }
traverse
266,385
OptTab (@NotNull @NlsContexts.TabTitle String label) { return new OptTab(new PlainMessage(label), components()); }
asTab
266,386
OptPane (@NotNull String bindPrefix) { return new OptPane(ContainerUtil.map(components(), c -> c.prefix(bindPrefix))); }
prefix
266,387
OptPane (@NotNull OptRegularComponent @NotNull ... components) { var newComponents = new ArrayList<>(Arrays.asList(components)); newComponents.addAll(components()); return new OptPane(newComponents); }
prepend
266,388
OptPane (@NotNull OptRegularComponent @NotNull ... components) { var newComponents = new ArrayList<>(components()); ContainerUtil.addAll(newComponents, components); return new OptPane(newComponents); }
append
266,389
OptPane (@NotNull OptRegularComponent @NotNull ... components) { return new OptPane(List.of(components)); }
pane
266,390
OptCheckboxPanel (@NotNull OptCheckbox @NotNull ... checkboxes) { return new OptCheckboxPanel(List.of(checkboxes)); }
checkboxPanel
266,391
OptTable (@NotNull @NlsContexts.Label String label, @NotNull OptTableColumn @NotNull ... columns) { return new OptTable(new PlainMessage(label), List.of(columns), null); }
table
266,392
OptGroup (@NotNull @NlsContexts.Label String label, @NotNull OptRegularComponent @NotNull ... children) { return new OptGroup(new PlainMessage(label), List.of(children)); }
group
266,393
OptHorizontalStack (@NotNull OptRegularComponent @NotNull ... children) { return new OptHorizontalStack(List.of(children)); }
horizontalStack
266,394
OptSeparator () { return new OptSeparator(null); }
separator
266,395
OptSeparator (@NotNull @NlsContexts.Label String label) { return new OptSeparator(new PlainMessage(label)); }
separator
266,396
OptTabSet (@NotNull OptTab @NotNull ... tabs) { return new OptTabSet(List.of(tabs)); }
tabs
266,397
OptTab (@NotNull @NlsContexts.TabTitle String label, @NotNull OptRegularComponent @NotNull ... children) { return new OptTab(new PlainMessage(label), List.of(children)); }
tab
266,398
OptSettingLink (@NotNull @NlsContexts.Label String displayName, @NotNull @NonNls String configurableID) { return new OptSettingLink(new PlainMessage(displayName), configurableID, null); }
settingLink
266,399
OptSettingLink (@NotNull @NlsContexts.Label String displayName, @NotNull @NonNls String configurableID, @NotNull @Nls String controlLabel) { return new OptSettingLink(new PlainMessage(displayName), configurableID, controlLabel); }
settingLink