Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
285,000 | void (@NotNull AnActionEvent e) { FindManager.getInstance(getProject()).showSettingsAndFindUsages(myTargets); } | actionPerformed |
285,001 | void () { reset(); doReRun(); } | refreshUsages |
285,002 | UsageView () { myChangesDetected = false; if (myRerunAction == null) { UsageViewPresentation rerunPresentation = myPresentation.copy(); rerunPresentation.setRerunHash(System.identityHashCode(myContent)); return UsageViewManager.getInstance(getProject()). searchAndShowUsages(myTargets, myUsageSearcherFactory, true, false, rerunPresentation, null); } myRerunAction.actionPerformed(null); return this; } | doReRun |
285,003 | void () { ThreadingAssertions.assertEventDispatchThread(); myUsageNodes.clear(); myModel.reset(); synchronized (modelToSwingNodeChanges) { modelToSwingNodeChanges.clear(); } if (!myPresentation.isDetachedMode()) { SwingUtilities.invokeLater(() -> expandTree(2)); } } | reset |
285,004 | void (@NotNull Usage usage) { if (ApplicationManager.getApplication().isDispatchThread()) { addUpdateRequest(() -> ReadAction.run(() -> doAppendUsage(usage))); } else { doAppendUsage(usage); } } | appendUsage |
285,005 | void (@NotNull Runnable request) { updateRequests.execute(request); } | addUpdateRequest |
285,006 | void () { ApplicationManager.getApplication().assertIsNonDispatchThread(); try { ((BoundedTaskExecutor)updateRequests).waitAllTasksExecuted(10, TimeUnit.MINUTES); } catch (Exception e) { LOG.error(e); } } | waitForUpdateRequestsCompletion |
285,007 | UsageNode (@NotNull Usage usage) { ApplicationManager.getApplication().assertIsNonDispatchThread(); // invoke in ReadAction to be sure that usages are not invalidated while the tree is being built ApplicationManager.getApplication().assertReadAccessAllowed(); if (!usage.isValid()) { // because the view is built incrementally, the usage may be already invalid, so need to filter such cases return null; } for (UsageViewElementsListener listener : UsageViewElementsListener.EP_NAME.getExtensionList()) { if (listener.skipUsage(this, usage)) { return null; } listener.beforeUsageAdded(this, usage); } if (usage instanceof PsiElementUsage) { reportToFUS((PsiElementUsage)usage); } UsageNode recentNode = myBuilder.appendOrGet(usage, isFilterDuplicateLines(), edtModelToSwingNodeChangesQueue); myUsageNodes.put(usage, recentNode == null ? NULL_NODE : recentNode); if (myAutoSelectedGroupNode == null && usage instanceof SimilarUsage && recentNode != null && !myPresentation.isDetachedMode()) { UIUtil.invokeLaterIfNeeded(() -> { GroupNode groupNode = ObjectUtils.tryCast(TreeUtil.getPath(myRoot, recentNode).getPath()[1], GroupNode.class); if (groupNode != null && getSelectedNode() instanceof UsageViewTreeModelBuilder.TargetsRootNode) { myAutoSelectedGroupNode = groupNode; showNode(groupNode); } }); } if (recentNode != null && getPresentation().isExcludeAvailable()) { for (UsageViewElementsListener listener : UsageViewElementsListener.EP_NAME.getExtensionList()) { if (listener.isExcludedByDefault(this, usage)) { myExclusionHandler.excludeNodeSilently(recentNode); } } } for (Node node = recentNode; node != myRoot && node != null; node = (Node)node.getParent()) { node.update(edtFireTreeNodesChangedQueue); } return recentNode; } | doAppendUsage |
285,008 | void (@NotNull PsiElementUsage usage) { Class<? extends PsiReference> referenceClass = UsageReferenceClassProvider.Companion.getReferenceClass(usage); PsiElement element = usage.getElement(); if (element != null && referenceClass != null) { Language language = element.getLanguage(); if (myReportedReferenceClasses.add(Pair.create(referenceClass, language))) { UsageViewStatisticsCollector.logUsageShown(myProject, referenceClass, language, this); } } } | reportToFUS |
285,009 | void (@NotNull Usage usage) { removeUsagesBulk(Collections.singleton(usage)); } | removeUsage |
285,010 | void (@NotNull Collection<? extends Usage> usages) { Usage toSelect = getNextToSelect(usages); UsageNode nodeToSelect = toSelect != null ? myUsageNodes.get(toSelect) : null; Set<UsageNode> nodes = usagesToNodes(usages.stream()).collect(Collectors.toSet()); usages.forEach(myUsageNodes::remove); if (!myUsageNodes.isEmpty()) { Set<UsageInfo> mergedInfos = usages.stream() .filter(usage -> usage instanceof UsageInfo2UsageAdapter && ((UsageInfo2UsageAdapter)usage).getMergedInfos().length > 1) .flatMap(usage -> Arrays.stream(((UsageInfo2UsageAdapter)usage).getMergedInfos())) .collect(Collectors.toSet()); if (!mergedInfos.isEmpty()) { myUsageNodes.keySet().removeIf( usage -> usage instanceof UsageInfo2UsageAdapter && mergedInfos.contains(((UsageInfo2UsageAdapter)usage).getUsageInfo())); } } if (!nodes.isEmpty() && !myPresentation.isDetachedMode()) { UIUtil.invokeLaterIfNeeded(() -> { if (isDisposed()) return; DefaultTreeModel treeModel = (DefaultTreeModel)myTree.getModel(); ((GroupNode)treeModel.getRoot()).removeUsagesBulk(nodes, treeModel); if (nodeToSelect != null) { TreePath path = new TreePath(nodeToSelect.getPath()); myTree.addSelectionPath(path); } }); } } | removeUsagesBulk |
285,011 | void (Usage @NotNull [] usages) { usagesToNodes(Arrays.stream(usages)) .forEach(myExclusionHandler::includeNode); } | includeUsages |
285,012 | void (Usage @NotNull [] usages) { usagesToNodes(Arrays.stream(usages)) .forEach(myExclusionHandler::excludeNode); } | excludeUsages |
285,013 | Stream<UsageNode> (@NotNull Stream<? extends Usage> usages) { return usages .map(myUsageNodes::get) .filter(node -> node != NULL_NODE && node != null); } | usagesToNodes |
285,014 | void (Usage @NotNull [] usages) { ThreadingAssertions.assertEventDispatchThread(); TreePath[] paths = usagesToNodes(Arrays.stream(usages)) .map(node -> new TreePath(node.getPath())) .toArray(TreePath[]::new); myTree.setSelectionPaths(paths); if (paths.length != 0) myTree.scrollPathToVisible(paths[0]); } | selectUsages |
285,015 | JComponent () { ThreadingAssertions.assertEventDispatchThread(); return myTree != null ? myTree : getComponent(); } | getPreferredFocusableComponent |
285,016 | JComponent () { ThreadingAssertions.assertEventDispatchThread(); return myRootPanel == null ? new JLabel() : myRootPanel; } | getComponent |
285,017 | int () { return myUsageNodes.size(); } | getUsagesCount |
285,018 | void (@NotNull Disposable disposable, @NotNull ExcludeListener listener) { myExcludeListeners.add(listener); Disposer.register(disposable, () -> myExcludeListeners.remove(listener)); } | addExcludeListener |
285,019 | void () { ThreadingAssertions.assertEventDispatchThread(); if (isDisposed()) return; TreeNode root = (TreeNode)myTree.getModel().getRoot(); List<Node> toUpdate = new ArrayList<>(); checkNodeValidity(root, new TreePath(root), toUpdate); queueUpdateBulk(toUpdate, EmptyRunnable.getInstance()); updateOnSelectionChanged(); } | updateImmediately |
285,020 | void (@NotNull List<? extends Node> toUpdate, @NotNull Runnable onCompletedInEdt) { if (toUpdate.isEmpty() || isDisposed()) return; ReadAction .nonBlocking(() -> { for (Node node : toUpdate) { try { node.update(edtFireTreeNodesChangedQueue); } catch (IndexNotReadyException ignore) { } } }) .expireWith(this) .finishOnUiThread(ModalityState.defaultModalityState(), __ -> onCompletedInEdt.run()) .submit(updateRequests); } | queueUpdateBulk |
285,021 | void (@NotNull Collection<? extends Node> nodes) { ThreadingAssertions.assertEventDispatchThread(); if (isDisposed()) return; TreeNode root = (TreeNode)myTree.getModel().getRoot(); Set<Node> queued = new HashSet<>(); List<Node> toUpdate = new ArrayList<>(); while (true) { Set<Node> parents = new HashSet<>(); for (Node node : nodes) { toUpdate.add(node); TreeNode parent = node.getParent(); if (parent != root && parent instanceof Node && queued.add((Node)parent)) { parents.add((Node)parent); } } if (parents.isEmpty()) break; nodes = parents; } queueUpdateBulk(toUpdate, EmptyRunnable.getInstance()); updateImmediately(); } | updateImmediatelyNodesUpToRoot |
285,022 | void () { ThreadingAssertions.assertEventDispatchThread(); if (myCurrentUsageContextPanel != null) { try { myCurrentUsageContextPanel.updateLayout(ContainerUtil.notNullize(getSelectedUsageInfos()), this); } catch (IndexNotReadyException ignore) { } } } | updateOnSelectionChanged |
285,023 | void (@NotNull TreeNode node, @NotNull TreePath path, @NotNull List<? super Node> result) { ThreadingAssertions.assertEventDispatchThread(); boolean shouldCheckChildren = true; if (myTree.isCollapsed(path)) { if (node instanceof Node) { ((Node)node).markNeedUpdate(); } shouldCheckChildren = false; // optimization: do not call expensive update() on invisible node } UsageViewTreeCellRenderer.RowLocation isVisible = myUsageViewTreeCellRenderer.isRowVisible(myTree.getRowForPath(new TreePath(((DefaultMutableTreeNode)node).getPath())), myTree.getVisibleRect()); // if row is below visible rectangle, no sense to update it or any children if (shouldCheckChildren && isVisible != UsageViewTreeCellRenderer.RowLocation.AFTER_VISIBLE_RECT) { for (int i = 0; i < node.getChildCount(); i++) { TreeNode child = node.getChildAt(i); checkNodeValidity(child, path.pathByAddingChild(child), result); } } // call update last, to let children a chance to update their cache first if (node instanceof Node && node != getModelRoot() && isVisible == UsageViewTreeCellRenderer.RowLocation.INSIDE_VISIBLE_RECT) { result.add((Node)node); } } | checkNodeValidity |
285,024 | void () { cancelCurrentSearch(); if (myContent != null) { UsageViewContentManager.getInstance(myProject).closeContent(myContent); } } | close |
285,025 | void () { ThreadingAssertions.assertEventDispatchThread(); getUsageViewSettings().setPreviewUsagesSplitterProportion(myPreviewSplitter.getProportion()); } | saveSplitterProportions |
285,026 | void () { ThreadingAssertions.assertEventDispatchThread(); disposeUsageContextPanels(); isDisposed = true; myUpdateAlarm.cancelAllRequests(); fusRunnable = null; // Release reference to this cancelCurrentSearch(); myRerunAction = null; if (myTree != null) { ToolTipManager.sharedInstance().unregisterComponent(myTree); } disposeSmartPointers(); } | dispose |
285,027 | void () { List<SmartPsiElementPointer<?>> smartPointers = new ArrayList<>(); for (Usage usage : myUsageNodes.keySet()) { if (usage instanceof UsageInfo2UsageAdapter) { SmartPsiElementPointer<?> pointer = ((UsageInfo2UsageAdapter)usage).getUsageInfo().getSmartPointer(); smartPointers.add(pointer); } } if (!smartPointers.isEmpty()) { for (SmartPsiElementPointer<?> pointer : smartPointers) { Project project = pointer.getProject(); if (!project.isDisposed()) { SmartPointerManager.getInstance(project).removePointer(pointer); } } } myUsageNodes.clear(); } | disposeSmartPointers |
285,028 | boolean () { return mySearchInProgress; } | isSearchInProgress |
285,029 | void (boolean searchInProgress) { mySearchInProgress = searchInProgress; if (!myPresentation.isDetachedMode()) { UIUtil.invokeLaterIfNeeded(() -> { if (isDisposed()) return; if (userHasSelectedNode()) return; Node nodeToSelect = ObjectUtils.coalesce(myAutoSelectedGroupNode, myModel.getFirstUsageNode()); if (nodeToSelect == null) return; showNode(nodeToSelect); if (getUsageViewSettings().isExpanded() && myUsageNodes.size() < 10000) { expandAll(); } }); } } | setSearchInProgress |
285,030 | boolean () { GroupNode autoSelectedGroupNode = myAutoSelectedGroupNode; Node selectedNode = getSelectedNode(); if (selectedNode != null) { TreePath expectedPathToBeSelected = autoSelectedGroupNode != null ? TreeUtil.getPathFromRoot(autoSelectedGroupNode) : TreeUtil.getFirstNodePath(myTree); if (!Comparing.equal(TreeUtil.getPathFromRoot(selectedNode), expectedPathToBeSelected)) { return true; } } return false; } | userHasSelectedNode |
285,031 | boolean () { return isDisposed || myProject.isDisposed(); } | isDisposed |
285,032 | void (@NotNull Node node) { ThreadingAssertions.assertEventDispatchThread(); if (!isDisposed() && !myPresentation.isDetachedMode()) { fireEvents(); TreePath usagePath = new TreePath(node.getPath()); myTree.expandPath(usagePath.getParentPath()); TreeUtil.selectPath(myTree, usagePath); } } | showNode |
285,033 | void (@NotNull Action rerunAction) { myRerunAction = rerunAction; } | setRerunAction |
285,034 | void (@NotNull Action action) { ThreadingAssertions.assertEventDispatchThread(); int index = myButtonPanel.getComponentCount(); if (!SystemInfo.isMac && index > 0 && myPresentation.isShowCancelButton()) index--; myButtonPanel.addButtonAction(index, action); Object o = action.getValue(Action.ACCELERATOR_KEY); if (o instanceof KeyStroke) { myTree.registerKeyboardAction(action, (KeyStroke)o, JComponent.WHEN_FOCUSED); } } | addButtonToLowerPane |
285,035 | void (@NotNull Runnable runnable, @NotNull @NlsContexts.Button String text) { addButtonToLowerPane(new AbstractAction(UIUtil.replaceMnemonicAmpersand(text)) { @Override public void actionPerformed(ActionEvent e) { runnable.run(); } }); } | addButtonToLowerPane |
285,036 | void (ActionEvent e) { runnable.run(); } | actionPerformed |
285,037 | void (@Nullable JComponent comp) { BorderLayout layout = (BorderLayout)myAdditionalComponent.getLayout(); Component prev = layout.getLayoutComponent(myAdditionalComponent, BorderLayout.CENTER); if (prev == comp) return; if (prev != null) myAdditionalComponent.remove(prev); if (comp != null) myAdditionalComponent.add(comp, BorderLayout.CENTER); myAdditionalComponent.revalidate(); } | setAdditionalComponent |
285,038 | void (@NotNull Runnable runnable, @NotNull @NlsContexts.Button String text, char mnemonic) { // implemented method is deprecated, so, it just calls non-deprecated overloading one addButtonToLowerPane(runnable, text); } | addButtonToLowerPane |
285,039 | void (@NotNull Runnable processRunnable, @Nullable @NlsContexts.Command String commandName, @NotNull @NlsContexts.DialogMessage String cannotMakeString, @NotNull @NlsContexts.Button String shortDescription) { addPerformOperationAction(processRunnable, commandName, cannotMakeString, shortDescription, true); } | addPerformOperationAction |
285,040 | void (@NotNull Runnable processRunnable, @Nullable @NlsContexts.Command String commandName, @NotNull @NlsContexts.DialogMessage String cannotMakeString, @NotNull @NlsContexts.Button String shortDescription, boolean checkReadOnlyStatus) { Runnable runnable = new MyPerformOperationRunnable(processRunnable, commandName, cannotMakeString, checkReadOnlyStatus); addButtonToLowerPane(runnable, shortDescription); } | addPerformOperationAction |
285,041 | boolean () { for (UsageTarget target : myTargets) { if (!target.isValid()) { return false; } } return true; } | allTargetsAreValid |
285,042 | UsageViewPresentation () { return myPresentation; } | getPresentation |
285,043 | boolean () { if (myRerunAction != null && myRerunAction.isEnabled()) return allTargetsAreValid(); try { return myUsageSearcherFactory != null && allTargetsAreValid() && myUsageSearcherFactory.create() != null; } catch (PsiInvalidElementAccessException e) { return false; } } | canPerformReRun |
285,044 | boolean () { Set<VirtualFile> readOnlyUsages = getReadOnlyUsagesFiles(); return readOnlyUsages.isEmpty() || !ReadonlyStatusHandler.getInstance(myProject).ensureFilesWritable(readOnlyUsages).hasReadonlyFiles(); } | checkReadonlyUsages |
285,045 | Set<Usage> () { Set<Usage> result = new HashSet<>(); Set<Map.Entry<Usage, UsageNode>> usages = myUsageNodes.entrySet(); for (Map.Entry<Usage, UsageNode> entry : usages) { Usage usage = entry.getKey(); UsageNode node = entry.getValue(); if (node != null && node != NULL_NODE && !node.isExcluded() && usage.isReadOnly()) { result.add(usage); } } return result; } | getReadOnlyUsages |
285,046 | Set<VirtualFile> () { Set<Usage> usages = getReadOnlyUsages(); Set<VirtualFile> result = new HashSet<>(); for (Usage usage : usages) { if (usage instanceof UsageInFile usageInFile) { VirtualFile file = usageInFile.getFile(); if (file != null && file.isValid()) result.add(file); } if (usage instanceof UsageInFiles usageInFiles) { ContainerUtil.addAll(result, usageInFiles.getFiles()); } } for (UsageTarget target : myTargets) { VirtualFile[] files = target.getFiles(); if (files == null) continue; ContainerUtil.addAll(result, files); } return result; } | getReadOnlyUsagesFiles |
285,047 | Set<Usage> () { Set<Usage> result = new HashSet<>(); for (Map.Entry<Usage, UsageNode> entry : myUsageNodes.entrySet()) { UsageNode node = entry.getValue(); Usage usage = entry.getKey(); if (node == NULL_NODE || node == null) { continue; } if (node.isExcluded()) { result.add(usage); } } return result; } | getExcludedUsages |
285,048 | Node () { ThreadingAssertions.assertEventDispatchThread(); TreePath path = myTree.getLeadSelectionPath(); Object node = path == null ? null : path.getLastPathComponent(); return node instanceof Node ? (Node)node : null; } | getSelectedNode |
285,049 | List<TreeNode> () { ThreadingAssertions.assertEventDispatchThread(); TreePath[] selectionPaths = myTree.getSelectionPaths(); return selectionPaths == null ? Collections.emptyList() : ContainerUtil.mapNotNull(selectionPaths, p-> ObjectUtils.tryCast(p.getLastPathComponent(), TreeNode.class)); } | selectedNodes |
285,050 | Set<Usage> () { ThreadingAssertions.assertEventDispatchThread(); return new HashSet<>(allUsagesRecursive(selectedNodes())); } | getSelectedUsages |
285,051 | Set<Usage> () { return myUsageNodes.keySet(); } | getUsages |
285,052 | List<Usage> () { List<Usage> usages = new ArrayList<>(getUsages()); usages.sort(USAGE_COMPARATOR_BY_FILE_AND_OFFSET); return usages; } | getSortedUsages |
285,053 | Navigatable (@NotNull DefaultMutableTreeNode node, boolean allowRequestFocus) { Object userObject = node.getUserObject(); if (userObject instanceof Navigatable navigatable) { return navigatable.canNavigate() ? new Navigatable() { @Override public void navigate(boolean requestFocus) { if (Registry.is("ide.usages.next.previous.occurrence.only.show.in.preview") && isPreviewUsages() && myRootPanel.isShowing()) select(); else navigatable.navigate(allowRequestFocus && requestFocus); } @Override public boolean canNavigate() { return navigatable.canNavigate(); } @Override public boolean canNavigateToSource() { return navigatable.canNavigateToSource(); } } : null; } return null; } | getNavigatableForNode |
285,054 | void (boolean requestFocus) { if (Registry.is("ide.usages.next.previous.occurrence.only.show.in.preview") && isPreviewUsages() && myRootPanel.isShowing()) select(); else navigatable.navigate(allowRequestFocus && requestFocus); } | navigate |
285,055 | boolean () { return navigatable.canNavigate(); } | canNavigate |
285,056 | boolean () { return navigatable.canNavigateToSource(); } | canNavigateToSource |
285,057 | Navigatable (@NotNull DefaultMutableTreeNode node) { if (node.getChildCount() > 0) return null; if (node instanceof Node && ((Node)node).isExcluded()) return null; return getNavigatableForNode(node, !myPresentation.isReplaceMode()); } | createDescriptorForNode |
285,058 | String () { return UsageViewBundle.message("action.next.occurrence"); } | getNextOccurenceActionName |
285,059 | String () { return UsageViewBundle.message("action.previous.occurrence"); } | getPreviousOccurenceActionName |
285,060 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
285,061 | Collection<String> () { List<String> lines = ContainerUtil.mapNotNull(selectedNodes(), o -> o instanceof Node ? ((Node)o).getNodeText() : null); return lines.isEmpty() ? null : lines; } | getTextLinesToCopy |
285,062 | void (FocusEvent e) { super.processFocusEvent(e); if (e.getID() == FocusEvent.FOCUS_GAINED) { transferFocus(); } } | processFocusEvent |
285,063 | void () { mySupport = null; } | dispose |
285,064 | boolean () { return mySupport != null && mySupport.hasNextOccurence(); } | hasNextOccurence |
285,065 | boolean () { return mySupport != null && mySupport.hasPreviousOccurence(); } | hasPreviousOccurence |
285,066 | OccurenceInfo () { return mySupport != null ? mySupport.goNextOccurence() : null; } | goNextOccurence |
285,067 | OccurenceInfo () { return mySupport != null ? mySupport.goPreviousOccurence() : null; } | goPreviousOccurence |
285,068 | String () { return mySupport != null ? mySupport.getNextOccurenceActionName() : ""; } | getNextOccurenceActionName |
285,069 | String () { return mySupport != null ? mySupport.getPreviousOccurenceActionName() : ""; } | getPreviousOccurenceActionName |
285,070 | Object (@NotNull String dataId) { if (CommonDataKeys.PROJECT.is(dataId)) { return myProject; } else if (USAGE_VIEW_KEY.is(dataId)) { return UsageViewImpl.this; } else if (PlatformCoreDataKeys.HELP_ID.is(dataId)) { return HELP_ID; } else if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { return myCopyProvider; } else if (ExclusionHandler.EXCLUSION_HANDLER.is(dataId)) { return myExclusionHandler; } else if (PlatformDataKeys.EXPORTER_TO_TEXT_FILE.is(dataId)) { return myTextFileExporter; } else if (CommonDataKeys.NAVIGATABLE_ARRAY.is(dataId)) { return ContainerUtil.mapNotNull(selectedNodes(), n-> ObjectUtils.tryCast(TreeUtil.getUserObject(n), Navigatable.class)) .toArray(Navigatable.EMPTY_NAVIGATABLE_ARRAY); } else if (USAGE_TARGETS_KEY.is(dataId)) { var targets = ContainerUtil.mapNotNull( selectedNodes(), o -> o instanceof UsageTargetNode ? ((UsageTargetNode)o).getTarget() : null ); return targets.isEmpty() ? null : targets.toArray(UsageTarget.EMPTY_ARRAY); } else { DataProvider selectedProvider = ObjectUtils.tryCast(TreeUtil.getUserObject(getSelectedNode()), DataProvider.class); if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { List<TreeNode> selectedNodes = allSelectedNodes(); DataProvider selectedBgtProvider = selectedProvider == null ? null : PlatformCoreDataKeys.BGT_DATA_PROVIDER.getData(selectedProvider); return CompositeDataProvider.compose(slowId -> getSlowData(slowId, selectedNodes), selectedBgtProvider); } Object nodeData = selectedProvider != null ? selectedProvider.getData(dataId) : null; if (nodeData != null) { return DataValidators.validOrNull(nodeData, dataId, selectedProvider); } } return null; } | getData |
285,071 | void () { update(); } | enteredDumbMode |
285,072 | void () { update(); } | exitDumbMode |
285,073 | void (int index, @NotNull Action action) { JButton button = new JButton(action); add(button, index); DialogUtil.registerMnemonic(button); if (getBorder() == null) setBorder(IdeBorderFactory.createBorder(SideBorder.TOP)); update(); Object s = action.getValue(Action.LONG_DESCRIPTION); if (s instanceof String) { JBLabel label = new JBLabel((String)s); label.setEnabled(false); label.setFont(JBUI.Fonts.smallFont()); add(JBUI.Borders.emptyLeft(-1).wrap(label)); } s = action.getValue(Action.SHORT_DESCRIPTION); if (s instanceof String) { button.setToolTipText((String)s); } invalidate(); if (getParent() != null) { getParent().validate(); } } | addButtonAction |
285,074 | void () { ThreadingAssertions.assertEventDispatchThread(); UsageNode node = myUsageNodes.get(myUsage); if (node == NULL_NODE || node == null) { return; } DefaultMutableTreeNode parentGroupingNode = (DefaultMutableTreeNode)node.getParent(); if (parentGroupingNode != null) { TreePath treePath = new TreePath(parentGroupingNode.getPath()); myTree.expandPath(treePath); if (mySelected) { myTree.addSelectionPath(treePath.pathByAddingChild(node)); } } } | restore |
285,075 | void () { if (myCheckReadOnlyStatus && !checkReadonlyUsages()) return; PsiDocumentManager.getInstance(myProject).commitAllDocuments(); if (myCannotMakeString != null && !myCannotMakeString.isEmpty() && myChangesDetected) { String title = UsageViewBundle.message("changes.detected.error.title"); if (canPerformReRun()) { String message = myCannotMakeString + "\n\n" + UsageViewBundle.message("dialog.rerun.search"); int answer = Messages.showYesNoCancelDialog(myProject, message, title, UsageViewBundle.message("action.description.rerun"), UsageViewBundle.message("button.text.continue"), UsageViewBundle.message("usage.view.cancel.button"), Messages.getErrorIcon()); if (answer == Messages.YES) { refreshUsages(); return; } else if (answer == Messages.CANCEL) { return; } //continue as is } else { Messages.showMessageDialog(myProject, myCannotMakeString, title, Messages.getErrorIcon()); return; } } try { if (myCommandName == null) { myProcessRunnable.run(); } else { CommandProcessor.getInstance().executeCommand( myProject, myProcessRunnable, myCommandName, null ); } } finally { close(); } } | run |
285,076 | List<UsageInfo> () { ThreadingAssertions.assertEventDispatchThread(); return USAGE_INFO_LIST_KEY.getData(DataManager.getInstance().getDataContext(myRootPanel)); } | getSelectedUsageInfos |
285,077 | GroupNode () { return myRoot; } | getRoot |
285,078 | String (@NotNull TreeNode node) { return myUsageViewTreeCellRenderer.getPlainTextForNode(node); } | getNodeText |
285,079 | boolean (@NotNull Usage usage) { return myBuilder != null && myBuilder.isVisible(usage); } | isVisible |
285,080 | boolean () { return myPresentation.isMergeDupLinesAvailable() && getUsageViewSettings().isFilterDuplicatedLine(); } | isFilterDuplicateLines |
285,081 | Usage (@NotNull Usage toDelete) { ThreadingAssertions.assertEventDispatchThread(); UsageNode usageNode = myUsageNodes.get(toDelete); if (usageNode == null || usageNode.getParent().getChildCount() == 0) return null; DefaultMutableTreeNode node = myRootPanel.mySupport.findNextNodeAfter(myTree, usageNode, true); if (node == null) node = myRootPanel.mySupport.findNextNodeAfter(myTree, usageNode, false); // last node return node == null ? null : node.getUserObject() instanceof Usage ? (Usage)node.getUserObject() : null; } | getNextToSelect |
285,082 | Usage (@NotNull Collection<? extends Usage> toDelete) { ThreadingAssertions.assertEventDispatchThread(); Usage toSelect = null; for (Usage usage : toDelete) { Usage next = getNextToSelect(usage); if (next != null && !toDelete.contains(next)) { toSelect = next; break; } } return toSelect; } | getNextToSelect |
285,083 | KeyboardShortcut () { return UsageViewUtil.getShowUsagesWithSettingsShortcut(); } | getShowUsagesWithSettingsShortcut |
285,084 | boolean () { return true; } | isDataValid |
285,085 | boolean () { return true; } | isDataReadOnly |
285,086 | boolean () { return false; } | isDataExcluded |
285,087 | String () { return getUserObject().toString(); } | getNodeText |
285,088 | void () { if (myTargetsNode == null || myTargets.length == 0) { return; } ThreadingAssertions.assertEventDispatchThread(); myTargetNodes = new UsageTargetNode[myTargets.length]; myTargetsNode.removeAllChildren(); for (int i = 0; i < myTargets.length; i++) { UsageTarget target = myTargets[i]; UsageTargetNode targetNode = new UsageTargetNode(target); myTargetsNode.add(targetNode); myTargetNodes[i] = targetNode; } myRootNode.addTargetsNode(myTargetsNode, this); reload(myTargetsNode); } | addTargetNodes |
285,089 | TreeNode (@NotNull TreeNode parent, @NotNull Class<?> type) { int childCount = parent.getChildCount(); for (int idx = 0; idx < childCount; idx++) { TreeNode child = parent.getChildAt(idx); if (type.isAssignableFrom(child.getClass())) { return child; } TreeNode firstChildOfType = getFirstChildOfType(child, type); if (firstChildOfType != null) { return firstChildOfType; } } return null; } | getFirstChildOfType |
285,090 | Object () { return myRootNode; } | getRoot |
285,091 | void (TreeNode node) { ThreadingAssertions.assertEventDispatchThread(); super.nodeChanged(node); } | nodeChanged |
285,092 | void (TreeNode node, int[] childIndices) { ThreadingAssertions.assertEventDispatchThread(); super.nodesWereInserted(node, childIndices); } | nodesWereInserted |
285,093 | void (TreeNode node, int[] childIndices, Object[] removedChildren) { ThreadingAssertions.assertEventDispatchThread(); super.nodesWereRemoved(node, childIndices, removedChildren); } | nodesWereRemoved |
285,094 | void (TreeNode node, int[] childIndices) { ThreadingAssertions.assertEventDispatchThread(); super.nodesChanged(node, childIndices); } | nodesChanged |
285,095 | void (TreeNode node) { ThreadingAssertions.assertEventDispatchThread(); super.nodeStructureChanged(node); } | nodeStructureChanged |
285,096 | void (Object source, Object[] path, int[] childIndices, Object[] children) { ThreadingAssertions.assertEventDispatchThread(); super.fireTreeNodesChanged(source, path, childIndices, children); } | fireTreeNodesChanged |
285,097 | void (Object source, Object[] path, int[] childIndices, Object[] children) { ThreadingAssertions.assertEventDispatchThread(); super.fireTreeNodesInserted(source, path, childIndices, children); } | fireTreeNodesInserted |
285,098 | void (Object source, Object[] path, int[] childIndices, Object[] children) { ThreadingAssertions.assertEventDispatchThread(); super.fireTreeNodesRemoved(source, path, childIndices, children); } | fireTreeNodesRemoved |
285,099 | void (Object source, Object[] path, int[] childIndices, Object[] children) { ThreadingAssertions.assertEventDispatchThread(); super.fireTreeStructureChanged(source, path, childIndices, children); } | fireTreeStructureChanged |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.