Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
284,900
void (@NotNull PsiTreeChangeEvent event, boolean propertyChange) { if (!(event.getFile() instanceof PsiCodeFragment)) { for (UsageModelTrackerListener listener : myListeners) { listener.modelChanged(propertyChange); } } }
doFire
284,901
void () { }
dispose
284,902
void (@NotNull UsageModelTrackerListener listener, @NotNull Disposable parent) { myListeners.add(listener); Disposer.register(parent, () -> myListeners.remove(listener)); }
addListener
284,903
UsageViewCoroutineScopeProvider (@NotNull Project project) { return project.getService(UsageViewCoroutineScopeProvider.class); }
getInstance
284,904
CoroutineScope () { return myCoroutineScope; }
getCoroutineScope
284,905
void (UsageGroupingRule @NotNull [] rules) { myGroupingRules = rules; }
setGroupingRules
284,906
boolean (@NotNull Usage usage) { return ContainerUtil.and(myFilteringRules, rule -> rule.isVisible(usage, myTargets)); }
isVisible
284,907
UsageViewEx (UsageTarget @NotNull [] targets, Usage @NotNull [] usages, @NotNull UsageViewPresentation presentation, @Nullable Factory<? extends UsageSearcher> usageSearcherFactory) { for (UsageViewFactory factory : UsageViewFactory.EP_NAME.getExtensionList()) { UsageViewEx result = factory.createUsageView(targets, usa...
createUsageView
284,908
void (@NotNull ProgressIndicator indicator) { usageView.waitForUpdateRequestsCompletion(); }
run
284,909
UsageView (UsageTarget @NotNull [] searchedFor, Usage @NotNull [] foundUsages, @NotNull UsageViewPresentation presentation, @Nullable Factory<? extends UsageSearcher> factory) { UsageViewEx usageView = createUsageView(searchedFor, foundUsages, presentation, factory); showUsageView(usageView, presentation); if (usageVie...
showUsages
284,910
UsageView (UsageTarget @NotNull [] searchedFor, Usage @NotNull [] foundUsages, @NotNull UsageViewPresentation presentation) { return showUsages(searchedFor, foundUsages, presentation, null); }
showUsages
284,911
UsageView (UsageTarget @NotNull [] searchFor, @NotNull Factory<? extends UsageSearcher> searcherFactory, @NotNull UsageViewPresentation presentation, @NotNull FindUsagesProcessPresentation processPresentation, @Nullable UsageViewStateListener listener) { if (ApplicationManager.getApplication().isWriteAccessAllowed()) {...
doSearchAndShow
284,912
void (@NotNull ProgressIndicator indicator) { SearchScope searchScopeToWarnOfFallingOutOf = ReadAction.compute(() -> scopeSupplier.get()); new SearchForUsagesRunnable(UsageViewManagerImpl.this, UsageViewManagerImpl.this.myProject, usageViewRef, presentation, searchFor, searcherFactory, processPresentation, searchScopeT...
run
284,913
void () { reportSearchCompletedToFus(true); super.onCancel(); }
onCancel
284,914
NotificationInfo () { UsageViewEx usageView = usageViewRef.get(); int count = usageView == null ? 0 : usageView.getUsagesCount(); long duration = reportSearchCompletedToFus(false); String notification = StringUtil.capitalizeWords(UsageViewBundle.message("usages.n", count), true); LOG.debug(notification + " in " + durat...
getNotificationInfo
284,915
long (boolean isCancelled) { long currentTS = System.nanoTime(); long durationFirstResults = TimeUnit.NANOSECONDS.toMillis(firstItemFoundTS.get() - start); long duration = TimeUnit.NANOSECONDS.toMillis(currentTS - start); PsiElement element = SearchForUsagesRunnable.getPsiElement(searchFor); UsageViewEx view = usageVie...
reportSearchCompletedToFus
284,916
Supplier<SearchScope> (UsageTarget @NotNull [] searchFor) { UsageTarget target = searchFor.length > 0 ? searchFor[0] : null; DataProvider dataProvider = DataManagerImpl.getDataProviderEx(target); SearchScope scope = dataProvider != null ? UsageView.USAGE_SCOPE.getData(dataProvider) : null; if (scope != null) { return (...
getMaxSearchScopeToWarnOfFallingOutOf
284,917
void (UsageTarget @NotNull [] searchFor, @NotNull Factory<? extends UsageSearcher> searcherFactory, @NotNull FindUsagesProcessPresentation processPresentation, @NotNull UsageViewPresentation presentation, @Nullable UsageViewStateListener listener) { doSearchAndShow(searchFor, searcherFactory, presentation, processPrese...
searchAndShowUsages
284,918
UsageView () { Content content = UsageViewContentManager.getInstance(myProject).getSelectedContent(); if (content != null) { return content.getUserData(USAGE_VIEW_KEY); } return null; }
getSelectedUsageView
284,919
void (@NotNull Project project, @NotNull TooManyUsagesStatus tooManyUsagesStatus, @NotNull ProgressIndicator indicator, @Nullable UsageViewEx usageView, @NotNull Supplier<@NlsContexts.DialogMessage String> messageSupplier, @Nullable Consumer<? super UsageLimitUtil.Result> onUserClicked) { UIUtil.invokeLaterIfNeeded(() ...
showTooManyUsagesWarningLater
284,920
long (@NotNull VirtualFile virtualFile) { return ReadAction.compute(() -> virtualFile.isValid() ? virtualFile.getLength() : -1L); }
getFileLength
284,921
String (long bytes) { long megabytes = bytes / (1024 * 1024); return UsageViewBundle.message("find.file.size.megabytes", Long.toString(megabytes)); }
presentableSize
284,922
boolean (@NotNull Usage usage, @NotNull SearchScope searchScope) { if (searchScope instanceof AcceptEveryUsageScope) return true; return ReadAction.compute(() -> { VirtualFile file; if (usage instanceof PsiElementUsage psiElementUsage) { PsiElement element = psiElementUsage.getElement(); if (element == null) return fal...
isInScope
284,923
boolean (@NotNull VirtualFile file, @NotNull SearchScope searchScope) { if (file instanceof VirtualFileWindow) { file = ((VirtualFileWindow)file).getDelegate(); } file = BackedVirtualFile.getOriginFileIfBacked(file); return searchScope.contains(file); }
isFileInScope
284,924
JComponent () { isDisposed = false; return this; }
createComponent
284,925
void () { isDisposed = true; }
dispose
284,926
void (@Nullable final List<? extends UsageInfo> infos) { AppUIExecutor.onUiThread().withDocumentsCommitted(myProject).expireWith(this).execute(() -> updateLayoutLater(infos)); }
updateLayout
284,927
void (@NotNull List<? extends UsageInfo> infos, @NotNull UsageView usageView) { AppUIExecutor.onUiThread().withDocumentsCommitted(myProject).expireWith(this) .execute(() -> updateLayoutLater(infos, usageView)); }
updateLayout
284,928
void (@NotNull List<? extends UsageInfo> infos, @NotNull UsageView usageView) { updateLayoutLater(infos); }
updateLayoutLater
284,929
int (@NotNull Usage o1, @NotNull Usage o2) { VirtualFile file1 = o1 instanceof UsageInFile ? ((UsageInFile)o1).getFile() : null; VirtualFile file2 = o2 instanceof UsageInFile ? ((UsageInFile)o2).getFile() : null; if (file1 == null || file2 == null) return 0; if (file1.equals(file2)) { return Integer.compare(o1.getNavig...
compareByFileAndOffset
284,930
boolean (@NotNull DefaultMutableTreeNode node) { return node instanceof UsageNode; }
isNodeExclusionAvailable
284,931
boolean (@NotNull DefaultMutableTreeNode node) { return ((UsageNode)node).isDataExcluded(); }
isNodeExcluded
284,932
void (@NotNull DefaultMutableTreeNode node) { Set<Node> nodes = new HashSet<>(); TreeUtil.treeNodeTraverser(node).traverse().filter(Node.class).addAllTo(nodes); collectParentNodes(node, true, nodes); setExcludeNodes(nodes, true, true); }
excludeNode
284,933
void (@NotNull DefaultMutableTreeNode node) { Set<Node> nodes = new HashSet<>(); TreeUtil.treeNodeTraverser(node).traverse().filter(Node.class).addAllTo(nodes); collectParentNodes(node, true, nodes); setExcludeNodes(nodes, true, false); }
excludeNodeSilently
284,934
void (@NotNull DefaultMutableTreeNode node, boolean almostAllChildrenExcluded, @NotNull Set<? super Node> nodes) { TreeNode parent = node.getParent(); if (parent == myRoot || !(parent instanceof GroupNode parentNode)) return; List<Node> otherNodes; synchronized (parentNode) { otherNodes = ContainerUtil.filter(parentNod...
collectParentNodes
284,935
void (@NotNull Set<? extends Node> nodes, boolean excluded, boolean updateImmediately) { Set<Usage> affectedUsages = new LinkedHashSet<>(); for (Node node : nodes) { Object userObject = node.getUserObject(); if (userObject instanceof Usage) { affectedUsages.add((Usage)userObject); } node.setExcluded(excluded, edtFireTr...
setExcludeNodes
284,936
void (@NotNull DefaultMutableTreeNode node) { Set<Node> nodes = new HashSet<>(); TreeUtil.treeNodeTraverser(node).traverse().filter(Node.class).addAllTo(nodes); collectParentNodes(node, false, nodes); setExcludeNodes(nodes, false, true); }
includeNode
284,937
boolean (boolean isExcludeAction) { return getPresentation().isExcludeAvailable(); }
isActionEnabled
284,938
void (boolean isExcludeAction) { ThreadingAssertions.assertEventDispatchThread(); if (myRootPanel.hasNextOccurence()) { myRootPanel.goNextOccurence(); } }
onDone
284,939
int () { return myUniqueIdentifier; }
getId
284,940
void () { ThreadingAssertions.assertEventDispatchThread(); if (isDisposed()) return; myTree = new Tree(myModel) { { ToolTipManager.sharedInstance().registerComponent(this); } @Override public boolean isRootVisible() { return false; // to avoid re-building model when it calls setRootVisible(true) } @Override public Stri...
initInEDT
284,941
boolean () { return false; // to avoid re-building model when it calls setRootVisible(true) }
isRootVisible
284,942
String (MouseEvent e) { TreePath path = getPathForLocation(e.getX(), e.getY()); if (path != null) { if (getCellRenderer() instanceof UsageViewTreeCellRenderer) { return UsageViewTreeCellRenderer.getTooltipFromPresentation(path.getLastPathComponent()); } } return null; }
getToolTipText
284,943
boolean (@NotNull TreePath path) { return path.getLastPathComponent() instanceof UsageViewTreeModelBuilder.TargetsRootNode; }
isPathEditable
284,944
Enumeration<TreePath> (TreePath parent) { return myExpandingCollapsing ? Collections.emptyEnumeration() : super.getExpandedDescendants(parent); }
getExpandedDescendants
284,945
void (@NotNull TreeModelEvent event, @NotNull EventType type) { myNeedUpdateButtons = true; }
process
284,946
void (FocusEvent e) { if (rulesChanged) { rulesChanged = false; rulesChanged(); } }
focusGained
284,947
UsageViewSettings () { return UsageViewSettings.getInstance(); }
getUsageViewSettings
284,948
Node () { return parentNode; }
getParentNode
284,949
boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NodeChange that = (NodeChange)o; return nodeChangeType == that.nodeChangeType && Objects.equals(parentNode, that.parentNode) && Objects.equals(childNode, that.childNode); }
equals
284,950
int () { return Objects.hash(nodeChangeType, parentNode, childNode); }
hashCode
284,951
void () { ThreadingAssertions.assertEventDispatchThread(); syncModelWithSwingNodes(); fireEventsForChangedNodes(); }
fireEvents
284,952
void () { IntList indicesToFire = new IntArrayList(); List<Node> nodesToFire = new ArrayList<>(); List<Map.Entry<Node, Collection<Node>>> changed; synchronized (fireTreeNodesChangedMap) { changed = new ArrayList<>(fireTreeNodesChangedMap.entrySet()); fireTreeNodesChangedMap.clear(); } for (Map.Entry<Node, Collection<No...
fireEventsForChangedNodes
284,953
void () { List<NodeChange> nodeChanges; synchronized (modelToSwingNodeChanges) { nodeChanges = new ArrayList<>(modelToSwingNodeChanges); modelToSwingNodeChanges.clear(); } IntList indicesToFire = new IntArrayList(); List<Node> nodesToFire = new ArrayList<>(); //first grouping changes by parent node Map<Node, List<NodeC...
syncModelWithSwingNodes
284,954
void () { drainQueuedUsageNodes(); setSearchInProgress(false); }
searchFinished
284,955
boolean () { ProgressIndicator progress = associatedProgress; return progress != null && progress.isCanceled(); }
searchHasBeenCancelled
284,956
void () { ProgressIndicator progress = associatedProgress; if (progress != null) { ProgressWrapper.unwrapAll(progress).cancel(); } }
cancelCurrentSearch
284,957
int () { ThreadingAssertions.assertEventDispatchThread(); return TreeUtil.getVisibleRowCount(myTree); }
getVisibleRowCount
284,958
void () { ThreadingAssertions.assertEventDispatchThread(); JScrollPane treePane = ScrollPaneFactory.createScrollPane(myTree); myPreviewSplitter = new OnePixelSplitter(false, 0.5f, 0.1f, 0.9f); myPreviewSplitter.setFirstComponent(treePane); myCentralPanel.add(myPreviewSplitter, BorderLayout.CENTER); updateUsagesContextP...
setupCentralPanel
284,959
void () { ThreadingAssertions.assertEventDispatchThread(); disposeUsageContextPanels(); if (isPreviewUsages()) { myPreviewSplitter.setProportion(getUsageViewSettings().getPreviewUsagesSplitterProportion()); JBTabbedPane tabbedPane = new JBTabbedPane(SwingConstants.BOTTOM); tabbedPane.setTabComponentInsets(null); UsageC...
updateUsagesContextPanels
284,960
void (@NotNull UsageContextPanel.Provider provider) { ThreadingAssertions.assertEventDispatchThread(); myCurrentUsageContextProvider = provider; updateUsagesContextPanels(); updateOnSelectionChanged(); }
tabSelected
284,961
void () { ThreadingAssertions.assertEventDispatchThread(); if (!myAllUsageContextPanels.isEmpty()) { saveSplitterProportions(); for (UsageContextPanel panel : myAllUsageContextPanels) { Disposer.dispose(panel); } myCurrentUsageContextPanel = null; myAllUsageContextPanels.clear(); } }
disposeUsageContextPanels
284,962
void () { ThreadingAssertions.assertEventDispatchThread(); myTree.setShowsRootHandles(true); SmartExpander.installOn(myTree); TreeUtil.installActions(myTree); EditSourceOnDoubleClickHandler.install(myTree, fusRunnable); EditSourceOnEnterKeyHandler.install(myTree, fusRunnable); TreeUtil.promiseSelectFirst(myTree); Popup...
initTree
284,963
void (TreeExpansionEvent event) { TreePath path = event.getPath(); Object component = path.getLastPathComponent(); if (component instanceof Node node) { if (!myExpandingCollapsing && node.needsUpdate()) { List<Node> toUpdate = new ArrayList<>(); checkNodeValidity(node, path, toUpdate); queueUpdateBulk(toUpdate, EmptyRu...
treeExpanded
284,964
void (TreeExpansionEvent event) { }
treeCollapsed
284,965
JComponent () { ThreadingAssertions.assertEventDispatchThread(); DefaultActionGroup group = new DefaultActionGroup() { @Override public void update(@NotNull AnActionEvent e) { super.update(e); myButtonPanel.update(); } @Override public @NotNull ActionUpdateThread getActionUpdateThread() { return ActionUpdateThread.EDT;...
createActionsToolbar
284,966
void (@NotNull AnActionEvent e) { super.update(e); myButtonPanel.update(); }
update
284,967
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
284,968
boolean () { return true; }
isDumbAware
284,969
JComponent (@NotNull DefaultActionGroup group) { ThreadingAssertions.assertEventDispatchThread(); ActionToolbar actionToolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.USAGE_VIEW_TOOLBAR, group, false); actionToolbar.setTargetComponent(myRootPanel); return actionToolbar.getComponent(); }
toUsageViewToolbar
284,970
boolean () { return true; }
isPreviewUsageActionEnabled
284,971
void (@NotNull DefaultActionGroup group) { ThreadingAssertions.assertEventDispatchThread(); addFilteringActions(group, true); }
addFilteringActions
284,972
void (@NotNull DefaultActionGroup group, boolean includeExtensionPoints) { if (getPresentation().isMergeDupLinesAvailable()) { MergeSameLineUsagesAction mergeDupLines = new MergeSameLineUsagesAction(); JComponent component = myRootPanel; if (component != null) { mergeDupLines.registerCustomShortcutSet(mergeDupLines.get...
addFilteringActions
284,973
void (@NotNull DefaultActionGroup group) { if (getPresentation().isCodeUsages()) { JComponent component = getComponent(); List<AnAction> actions = usageFilteringRuleActions(myProject, myFilteringRulesState); for (AnAction action : actions) { action.registerCustomShortcutSet(component, this); group.add(action); } } for ...
addFilteringFromExtensionPoints
284,974
void () { UsageViewImpl.this.expandAll(); getUsageViewSettings().setExpanded(true); }
expandAll
284,975
boolean () { return true; }
canExpand
284,976
void () { UsageViewImpl.this.collapseAll(); getUsageViewSettings().setExpanded(false); }
collapseAll
284,977
boolean () { return true; }
canCollapse
284,978
boolean () { if (myTargets.length == 0) return false; NavigationItem target = myTargets[0]; return target instanceof ConfigurableUsageTarget; }
canShowSettings
284,979
ConfigurableUsageTarget (UsageTarget @NotNull [] targets) { ConfigurableUsageTarget configurableUsageTarget = null; if (targets.length != 0) { NavigationItem target = targets[0]; if (target instanceof ConfigurableUsageTarget) { configurableUsageTarget = (ConfigurableUsageTarget)target; } } return configurableUsageTarge...
getConfigurableTarget
284,980
AnAction () { return new PreviewUsageAction(); }
createPreviewAction
284,981
AnAction () { return new ShowSettings(); }
createSettingsAction
284,982
AnAction () { return CommonActionsManager.getInstance().createPrevOccurenceAction(myRootPanel); }
createPreviousOccurrenceAction
284,983
AnAction () { return CommonActionsManager.getInstance().createNextOccurenceAction(myRootPanel); }
createNextOccurrenceAction
284,984
void (@NotNull List<? extends AnAction> actions) { actions.sort((o1, o2) -> Comparing.compare(o1.getTemplateText(), o2.getTemplateText())); }
sortGroupingActions
284,985
boolean () { ThreadingAssertions.assertEventDispatchThread(); return myPresentation.isDetachedMode() || myTree.isShowing(); }
shouldTreeReactNowToRuleChanges
284,986
void () { ThreadingAssertions.assertEventDispatchThread(); if (!shouldTreeReactNowToRuleChanges()) { rulesChanged = true; return; } List<UsageState> states = new ArrayList<>(); if (myTree != null) { captureUsagesExpandState(new TreePath(myTree.getModel().getRoot()), states); } List<Usage> allUsages = new ArrayList<>(my...
rulesChanged
284,987
void (@NotNull TreePath pathFrom, @NotNull Collection<? super UsageState> states) { ThreadingAssertions.assertEventDispatchThread(); if (!myTree.isExpanded(pathFrom)) { return; } DefaultMutableTreeNode node = (DefaultMutableTreeNode)pathFrom.getLastPathComponent(); int childCount = node.getChildCount(); for (int idx = ...
captureUsagesExpandState
284,988
void (@NotNull Collection<? extends UsageState> states) { ThreadingAssertions.assertEventDispatchThread(); //always expand the last level group DefaultMutableTreeNode root = (DefaultMutableTreeNode)myTree.getModel().getRoot(); for (int i = root.getChildCount() - 1; i >= 0; i--) { DefaultMutableTreeNode child = (Default...
restoreUsageExpandState
284,989
void () { doExpandingCollapsing(() -> TreeUtil.expandAll(myTree)); }
expandAll
284,990
void (int levels) { doExpandingCollapsing(() -> TreeUtil.expand(myTree, levels)); }
expandTree
284,991
void (@NotNull Runnable task) { if (isDisposed()) return; ThreadingAssertions.assertEventDispatchThread(); fireEvents(); // drain all remaining insertion events in the queue myExpandingCollapsing = true; try { task.run(); } finally { myExpandingCollapsing = false; } }
doExpandingCollapsing
284,992
void () { doExpandingCollapsing(() -> { TreeUtil.collapseAll(myTree, 3); myTree.expandRow(0); }); }
collapseAll
284,993
void () { expandTree(1); }
expandRoot
284,994
void () { ThreadingAssertions.assertEventDispatchThread(); // can be null during ctr execution if (myTree != null) { myTree.requestFocusInWindow(); } }
select
284,995
Project () { return myProject; }
getProject
284,996
KeyboardShortcut (UsageTarget @NotNull [] targets) { ConfigurableUsageTarget configurableTarget = getConfigurableTarget(targets); return configurableTarget == null ? UsageViewUtil.getShowUsagesWithSettingsShortcut() : configurableTarget.getShortcut(); }
getShowUsagesWithSettingsShortcut
284,997
void (@NotNull ProgressIndicator indicator) { associatedProgress = indicator; }
associateProgress
284,998
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
284,999
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(e.getData(CommonDataKeys.EDITOR) == null); if (getTemplatePresentation().getDescription() == null) { ConfigurableUsageTarget target = getConfigurableTarget(myTargets); Supplier<String> description = null; if (target != null) { try { description = UsageVie...
update