Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
285,200
UsageGroup (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (usage instanceof UnknownUsagesInUnloadedModules) { return ourUnloadedGroup; } if (usage instanceof PsiElementUsage) { if (usage instanceof UsageInfo2UsageAdapter) { final UsageInfo usageInfo = ((UsageInfo2UsageAdapter)usage).getUsageInfo(); if (us...
getParentGroupFor
285,201
int () { return UsageGroupingRulesDefaultRanks.NON_CODE.getAbsoluteRank(); }
getRank
285,202
boolean () { return false; }
isGroupingToggleable
285,203
String (String usages, String scope) { @NlsSafe StringBuilder text = new StringBuilder(usages); text.append(" ").append(UsageViewBundle.message("usage.view.results.node.scope.in")); if (StringUtil.isNotEmpty(scope)) { text.append(" ").append(scope); } return text.toString(); }
buildText
285,204
int (@NotNull UsageGroup o) { if (!(o instanceof UsageGroupBase)) { return -1; } int order = Integer.compare(myOrder, ((UsageGroupBase)o).myOrder); if (order != 0) { return order; } return getPresentableGroupText().compareToIgnoreCase(o.getPresentableGroupText()); }
compareTo
285,205
List<UsageGroup> (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (usage instanceof UsageInModule usageInModule) { Module module = usageInModule.getModule(); if (module != null) { if (myFlattenModules) { return Collections.singletonList(new ModuleUsageGroup(module, null)); } else { List<String> groupPath = ...
getParentGroupsFor
285,206
int () { return UsageGroupingRulesDefaultRanks.MODULE.getAbsoluteRank(); }
getRank
285,207
Icon () { return AllIcons.Nodes.PpLibFolder; }
getIcon
285,208
String () { return myEntry.getPresentableName(); }
getPresentableGroupText
285,209
boolean (Object o) { if (this == o) return true; return o instanceof LibraryUsageGroup && myEntry.equals(((LibraryUsageGroup)o).myEntry); }
equals
285,210
int () { return myEntry.hashCode(); }
hashCode
285,211
Icon () { return myItemPresentation.getIcon(false); }
getIcon
285,212
String () { return StringUtil.notNullize(myItemPresentation.getPresentableText(), UsageViewBundle.message("list.item.library")); }
getPresentableGroupText
285,213
boolean (Object o) { if (this == o) return true; return o instanceof SyntheticLibraryUsageGroup && myItemPresentation.equals(((SyntheticLibraryUsageGroup)o).myItemPresentation); }
equals
285,214
int () { return myItemPresentation.hashCode(); }
hashCode
285,215
boolean (Object o) { if (this == o) return true; if (!(o instanceof ModuleUsageGroup moduleUsageGroup)) return false; return myModule.equals(moduleUsageGroup.myModule); }
equals
285,216
int () { return myModule.hashCode(); }
hashCode
285,217
Icon () { return myModule.isDisposed() ? null : ModuleType.get(myModule).getIcon(); }
getIcon
285,218
String () { return myModule.isDisposed() ? "" : myGrouper != null ? myGrouper.getShortenedName(myModule) : myModule.getName(); }
getPresentableGroupText
285,219
boolean () { return !myModule.isDisposed(); }
isValid
285,220
String () { return UsageViewBundle.message("node.group.module", getPresentableGroupText()); }
toString
285,221
Object (@NotNull String dataId) { if (!isValid()) return null; if (LangDataKeys.MODULE_CONTEXT.is(dataId)) { return myModule; } return null; }
getData
285,222
boolean (Object o) { if (this == o) return true; return o instanceof ModuleGroupUsageGroup && myGroupPath.equals(((ModuleGroupUsageGroup)o).myGroupPath); }
equals
285,223
int () { return myGroupPath.hashCode(); }
hashCode
285,224
Icon () { return AllIcons.Nodes.ModuleGroup; }
getIcon
285,225
String () { return myGroupPath.get(myGroupPath.size()-1); }
getPresentableGroupText
285,226
String () { return UsageViewBundle.message("node.group.module.group", getPresentableGroupText()); }
toString
285,227
String () { return myGroupingRule.getClass().getName(); }
getId
285,228
List<UsageGroup> (@NotNull Usage usage, UsageTarget @NotNull [] targets) { return myGroupingRule.getParentGroupsFor(usage, targets); }
getParentGroupsFor
285,229
int () { return myGroupingRule.getRank(); }
getRank
285,230
String () { return "UsageGrouping.FileStructure"; }
getGroupingActionId
285,231
String () { return "UsageGrouping.DirectoryStructure"; }
getGroupingActionId
285,232
UsageGroupingRule (@NotNull Project project) { return new FileGroupingRule(project); }
getUsageGroupingRule
285,233
UsageGroup (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (!(usage instanceof PsiElementUsage elementUsage)) { return null; } PsiElement element = elementUsage.getElement(); VirtualFile virtualFile = PsiUtilCore.getVirtualFile(element); if (virtualFile == null) { return null; } Project project = element.g...
getParentGroupFor
285,234
int () { return UsageGroupingRulesDefaultRanks.SCOPE.getAbsoluteRank(); }
getRank
285,235
String () { return "UsageGrouping.Scope"; }
getGroupingActionId
285,236
Icon () { return AllIcons.Nodes.TestSourceFolder; }
getIcon
285,237
String () { return UsageViewBundle.message("list.item.test"); }
getPresentableGroupText
285,238
Icon () { return PlatformIcons.SOURCE_FOLDERS_ICON; }
getIcon
285,239
String () { return UsageViewBundle.message("list.item.production"); }
getPresentableGroupText
285,240
Icon () { return PlatformIcons.LIBRARY_ICON; }
getIcon
285,241
String () { return UsageViewBundle.message("list.item.library"); }
getPresentableGroupText
285,242
int (@NotNull UsageGroup usageGroup) { return getPresentableGroupText().compareTo(usageGroup.getPresentableGroupText()); }
compareTo
285,243
boolean (Object o) { if (this == o) return true; if (!(o instanceof UsageScopeGroup usageTypeGroup)) return false; return myCode == usageTypeGroup.myCode; }
equals
285,244
int () { return myCode; }
hashCode
285,245
int () { return myRank; }
getAbsoluteRank
285,246
UsageGroup (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (usage instanceof UsageWithType) { UsageType usageType = ((UsageWithType)usage).getUsageType(); return usageType == null ? null : new UsageTypeGroup(usageType); } if (usage instanceof PsiElementUsage elementUsage) { PsiElement element = elementUsag...
getParentGroupFor
285,247
UsageType (PsiElement element, UsageTarget @NotNull [] targets) { if (element == null) return null; if (PsiTreeUtil.getParentOfType(element, PsiComment.class, false) != null) { return UsageType.COMMENT_USAGE; } for(UsageTypeProvider provider: UsageTypeProvider.EP_NAME.getExtensionList()) { UsageType usageType; if (prov...
getUsageType
285,248
int () { return UsageGroupingRulesDefaultRanks.USAGE_TYPE.getAbsoluteRank(); }
getRank
285,249
String () { return myUsageType.toString(); }
getPresentableGroupText
285,250
int (@NotNull UsageGroup usageGroup) { return getPresentableGroupText().compareTo(usageGroup.getPresentableGroupText()); }
compareTo
285,251
boolean (Object o) { if (this == o) return true; if (!(o instanceof UsageTypeGroup usageTypeGroup)) return false; return myUsageType.equals(usageTypeGroup.myUsageType); }
equals
285,252
int () { return myUsageType.hashCode(); }
hashCode
285,253
String () { return UsageViewBundle.message("type.0", myUsageType.toString()); }
toString
285,254
List<UsageGroup> (@NotNull Usage usage, UsageTarget @NotNull [] targets) { if (!(usage instanceof UsageInFile usageInFile)) { return Collections.emptyList(); } List<UsageGroup> result = new ArrayList<>(); VirtualFile file = usageInFile.getFile(); if (file == null) { return Collections.emptyList(); } if (file instanceof...
getParentGroupsFor
285,255
int () { return UsageGroupingRulesDefaultRanks.DIRECTORY_STRUCTURE.getAbsoluteRank(); }
getRank
285,256
void (@NotNull Collection<? extends SimilarUsage> similarUsagesGroupUsages) { similarUsagesGroupUsages.stream().skip(myAlreadyProcessedUsages).limit(SNIPPET_LIMIT).forEach(usage -> { final UsageInfo info = usage.getUsageInfo(); if (myOriginalUsage != info) { renderUsage(info); } myAlreadyProcessedUsages++; }); }
renderSimilarUsages
285,257
void (@NotNull UsageInfo info) { PsiElement element = info.getElement(); PsiFile file = info.getFile(); ProperTextRange rangeInElement = info.getRangeInElement(); myAlreadyRenderedUsages++; if (element == null || file == null || rangeInElement == null) return; VirtualFile virtualFile = file.getVirtualFile(); if (virtua...
renderUsage
285,258
void () { renderUsage(myOriginalUsage); }
renderOriginalUsage
285,259
JPanel (UsageInfo usageInfo, @NotNull Color backGroundColor) { final JPanel header = new JPanel(new FlowLayout(FlowLayout.LEFT)); header.setBackground(backGroundColor); final JComponent link = UsagePreviewComponent.Companion.createNavigationLink(this, myUsageView, usageInfo); if (link != null) { header.add(link); } fin...
getHeaderPanelForUsage
285,260
void () { }
dispose
285,261
JScrollPane (@NotNull Set<? extends SimilarUsage> usagesToRender) { JScrollPane similarUsagesScrollPane = ScrollPaneFactory.createScrollPane(this, true); renderOriginalUsage(); BoundedRangeModelThresholdListener.install(similarUsagesScrollPane.getVerticalScrollBar(), () -> { if (myAlreadyProcessedUsages < usagesToRende...
createLazyLoadingScrollPane
285,262
void (@NotNull @Nls String message) { myResultsText.clear(); myResultsText.append(message, SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES); }
updateResultsText
285,263
void () { EditorEx editor = getEditor(); JScrollPane scrollPane = editor.getScrollPane(); editor.setBorder(JBUI.Borders.empty()); editor.getMarkupModel().removeAllHighlighters(); editor.getGutterComponentEx().setPaintBackground(false); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_...
setupEditor
285,264
void (@NotNull TextRange rangeToHighlight) { final MarkupModelEx markupModel = getEditor().getMarkupModel(); markupModel.addRangeHighlighter(EditorColors.SEARCH_RESULT_ATTRIBUTES, rangeToHighlight.getStartOffset(), rangeToHighlight.getEndOffset(), HighlighterLayer.ADDITIONAL_SYNTAX, HighlighterTargetArea.EXACT_RANGE); ...
highlightRange
285,265
void (SnippetRenderingData result) { if (result == null) return; setText(result.getText()); getEditor().getGutterComponentEx().updateUI(); getEditor().getMarkupModel().removeAllHighlighters(); highlightRange(result.getSelectionRange()); }
addUsagePreview
285,266
Integer (@NotNull Editor editor, int lineNumber) { return lineNumber + contextStartLineNumber; }
convert
285,267
void (@NotNull JComponent targetComponent, @NotNull AnAction refreshAction) { DefaultActionGroup actionGroup = new DefaultActionGroup(); actionGroup.add(refreshAction); ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(SIMILAR_USAGES_PREVIEW_TOOLBAR, actionGroup, true); actionToolbar.getComp...
createActionGroupWithRefreshAction
285,268
void (@NotNull ProgressIndicator indicator) { try { buildSessionDataFile(project, clusters, indicator, fileName); } catch (IOException e) { throw new RuntimeException(e); } }
run
285,269
boolean (@NotNull String key) { return key.contains("PREV:") || key.contains("NEXT:") || key.contains("GP:") || key.contains("P:"); }
isStructural
285,270
PsiElement (@NotNull UsageInfo2UsageAdapter usage) { Ref<PsiElement> elementRef = new Ref<>(); ApplicationManager.getApplication().runReadAction(() -> { elementRef.set(usage.getElement()); }); return elementRef.get(); }
getElement
285,271
String (@NotNull PsiElement element) { Ref<String> fileNameRef = new Ref<>(); Ref<TextRange> elementTextRange = new Ref<>(); ApplicationManager.getApplication().runReadAction(() -> { VirtualFile containingVirtualFile = element.getContainingFile().getVirtualFile(); assert containingVirtualFile != null; VirtualFile rootF...
getUsageId
285,272
String (@NotNull Project project, @NotNull PsiElement element) { Ref<String> usageLineSnippet = new Ref<>(""); ApplicationManager.getApplication().runReadAction(() -> { PsiDocumentManager docManager = PsiDocumentManager.getInstance(project); Document doc = docManager.getDocument(element.getContainingFile()); if (doc !=...
getUsageLineSnippet
285,273
String (@NotNull String snippet) { return snippet.replace("\n", " ").replace("\t", " ").replace("\r", " "); }
removeNewLines
285,274
String () { return myInterpreterPath; }
getInterpreterPath
285,275
void (String interpreterPath) { myInterpreterPath = interpreterPath; }
setInterpreterPath
285,276
String () { return myHelpersPath; }
getHelpersPath
285,277
void (String helpersPath) { myHelpersPath = helpersPath; }
setHelpersPath
285,278
String () { return myHelpersDefaultDirName; }
getDefaultHelpersName
285,279
PathMappingSettings () { return myPathMappings; }
getPathMappings
285,280
void (@Nullable PathMappingSettings pathMappings) { myPathMappings = new PathMappingSettings(); if (pathMappings != null) { myPathMappings.addAll(pathMappings); } }
setPathMappings
285,281
boolean () { return myHelpersVersionChecked; }
isHelpersVersionChecked
285,282
void (boolean helpersVersionChecked) { myHelpersVersionChecked = helpersVersionChecked; }
setHelpersVersionChecked
285,283
void (String sdkId) { mySdkId = sdkId; }
setSdkId
285,284
String () { return mySdkId; }
getSdkId
285,285
boolean () { return myValid; }
isValid
285,286
void (boolean valid) { myValid = valid; }
setValid
285,287
boolean () { return myRunAsRootViaSudo; }
isRunAsRootViaSudo
285,288
void (boolean runAsRootViaSudo) { myRunAsRootViaSudo = runAsRootViaSudo; }
setRunAsRootViaSudo
285,289
void (RemoteSdkProperties copy) { copy.setInterpreterPath(getInterpreterPath()); copy.setHelpersPath(getHelpersPath()); copy.setHelpersVersionChecked(isHelpersVersionChecked()); copy.setValid(isValid()); copy.setRunAsRootViaSudo(isRunAsRootViaSudo()); }
copyTo
285,290
void (Element rootElement) { rootElement.setAttribute(INTERPRETER_PATH, StringUtil.notNullize(getInterpreterPath())); rootElement.setAttribute(HELPERS_PATH, StringUtil.notNullize(getHelpersPath())); rootElement.setAttribute(VALID, Boolean.toString(isValid())); rootElement.setAttribute(RUN_AS_ROOT_VIA_SUDO, Boolean.toSt...
save
285,291
void (Element element) { setInterpreterPath(StringUtil.nullize(element.getAttributeValue(INTERPRETER_PATH))); setHelpersPath(StringUtil.nullize(element.getAttributeValue(HELPERS_PATH))); setValid(Boolean.parseBoolean(element.getAttributeValue(VALID))); setPathMappings(PathMappingSettings.readExternal(element)); setRunA...
load
285,292
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; RemoteSdkPropertiesHolder holder = (RemoteSdkPropertiesHolder)o; if (myHelpersVersionChecked != holder.myHelpersVersionChecked) return false; if (myInitialized != holder.myInitialized) return false; if (myValid !...
equals
285,293
int () { int result = mySdkId != null ? mySdkId.hashCode() : 0; result = 31 * result + (myInterpreterPath != null ? myInterpreterPath.hashCode() : 0); result = 31 * result + (myRunAsRootViaSudo ? 1 : 0); result = 31 * result + (myHelpersPath != null ? myHelpersPath.hashCode() : 0); result = 31 * result + (myHelpersDefa...
hashCode
285,294
String () { return "RemoteSdkPropertiesHolder{" + "mySdkId='" + mySdkId + '\'' + ", myInterpreterPath='" + myInterpreterPath + '\'' + ", myHelpersPath='" + myHelpersPath + '\'' + ", myHelpersDefaultDirName='" + myHelpersDefaultDirName + '\'' + ", myHelpersVersionChecked=" + myHelpersVersionChecked + ", myRemoteRoots=" ...
toString
285,295
boolean () { if (hasPty()) { return sendCtrlC(); } else { return false; } }
killProcessTree
285,296
String () { return myHost; }
getHost
285,297
void (@Nullable @NlsSafe String host) { myHost = StringUtil.notNullize(host); }
setHost
285,298
int () { return myPort; }
getPort
285,299
void (int port) { myPort = port; myLiteralPort = Integer.toString(port); }
setPort