Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
278,300 | boolean () { return OptionsDialog.this.canBeHidden(); } | canBeHidden |
278,301 | boolean () { return OptionsDialog.this.shouldSaveOptionsOnCancel(); } | shouldSaveOptionsOnCancel |
278,302 | String () { return OptionsDialog.this.getDoNotShowMessage(); } | getDoNotShowMessage |
278,303 | boolean (int inputEventModifiers) { return (inputEventModifiers & Event.SHIFT_MASK) != 0; } | shiftIsPressed |
278,304 | boolean () { return true; } | canBeHidden |
278,305 | String () { return myValue; } | getValue |
278,306 | TextAttributes () { return myTextAttributes; } | getAttributes |
278,307 | Editor () { return myEditor; } | getEditor |
278,308 | void (String string, TextAttributes attrs) { synchronized (myLines) { myLines.add(new Line(string, attrs)); } if (myFlushAlarm.isEmpty()) { myFlushAlarm.addRequest(this::flushStoredLines, 200, ModalityState.nonModal()); } } | appendString |
278,309 | Runnable (@NotNull Collection<? extends Line> lines) { final Runnable command = () -> { Document document = myEditor.getDocument(); StringBuilder buffer = new StringBuilder(); for (Line line : lines) { buffer.append(line.getValue()); } int endBefore = document.getTextLength(); document.insertString(endBefore, buffer.to... | writingCommand |
278,310 | void () { if (myScrollToTheEndOnAppend) { myEditor.getCaretModel().moveToOffset(myEditor.getDocument().getTextLength()); myEditor.getSelectionModel().removeSelection(); myEditor.getScrollingModel().scrollToCaret(ScrollType.RELATIVE); } } | shiftCursorToTheEndOfDocument |
278,311 | void (boolean showIcon) { myShowIcon = showIcon; } | setShowIcon |
278,312 | String (File file) { return file.getPath(); } | getFilePath |
278,313 | void (File ioFile) { myFile = ioFile; if (myShowIcon) { setIcon(FileTypeManager.getInstance().getFileTypeByFileName(myFile.getName()).getIcon()); } else { setIcon(null); } } | setFile |
278,314 | String () { if (myFile == null) return ""; int width = getWidth(); if (getIcon() != null) width -= getIconWidth(); return myPolicy.getOptimalTextForComponent(myFile, this, width); } | getText |
278,315 | void () { setPreferredSize(new Dimension(getPreferredWidth(), getPreferredSize().height)); } | pack |
278,316 | int () { return getIconWidth() + getFontMetrics(getFont()).stringWidth(myPolicy.getPresentableName(myFile, PREFERRED_TEXT_LENGTH)); } | getPreferredWidth |
278,317 | int () { Icon icon = getIcon(); if (icon == null) return 0; return icon.getIconWidth() + getIconTextGap(); } | getIconWidth |
278,318 | void (ID self, Pointer selector, ID event) { UIUtil.invokeLaterIfNeeded(() -> fireStyleChanged()); } | callback |
278,319 | void (ID self, Pointer selector, ID event) { UIUtil.invokeLaterIfNeeded(() -> updateBehaviorPreferences()); } | callback |
278,320 | boolean () { return SystemInfoRt.isMac; } | isOverlayScrollbarSupported |
278,321 | void () { Foundation.NSAutoreleasePool pool = new Foundation.NSAutoreleasePool(); ID delegateClass = Foundation.allocateObjcClassPair(Foundation.getObjcClass("NSObject"), "NSScrollerChangesObserver"); if (!ID.NIL.equals(delegateClass)) { // This static initializer might be called more than once (with different class lo... | initNotificationObserver |
278,322 | void () { if (!SystemInfoRt.isMac) return; Foundation.NSAutoreleasePool pool = new Foundation.NSAutoreleasePool(); try { ID defaults = Foundation.invoke("NSUserDefaults", "standardUserDefaults"); Foundation.invoke(defaults, "synchronize"); ourClickBehavior = Foundation.invoke(defaults, "boolForKey:", Foundation.nsStrin... | updateBehaviorPreferences |
278,323 | void (@NotNull ScrollbarStyleListener listener) { processReferences(listener, null, null); } | addScrollbarStyleListener |
278,324 | void (@NotNull ScrollbarStyleListener listener) { processReferences(null, listener, null); } | removeScrollbarStyleListener |
278,325 | void (ScrollbarStyleListener toAdd, ScrollbarStyleListener toRemove, List<? super ScrollbarStyleListener> list) { synchronized (ourStyleListeners) { Iterator<Reference<ScrollbarStyleListener>> iterator = ourStyleListeners.iterator(); while (iterator.hasNext()) { Reference<ScrollbarStyleListener> reference = iterator.ne... | processReferences |
278,326 | void () { List<ScrollbarStyleListener> list = new ArrayList<>(); processReferences(null, null, list); for (ScrollbarStyleListener listener : list) { listener.styleChanged(); } } | fireStyleChanged |
278,327 | void (@ActionText String option, Action action) { action.putValue(Action.NAME, option); int mnemoPos = option.indexOf("&"); if (mnemoPos >= 0 && mnemoPos < option.length() - 2) { String mnemoChar = option.substring(mnemoPos + 1, mnemoPos + 2).trim(); if (mnemoChar.length() == 1) { action.putValue(Action.MNEMONIC_KEY, I... | assignMnemonic |
278,328 | JComponent () { JPanel panel = new JPanel(new BorderLayout(15, 0)); if (myIcon != null) { JLabel iconLabel = new JLabel(myIcon); Container container = new Container(); container.setLayout(new BorderLayout()); container.add(iconLabel, BorderLayout.NORTH); panel.add(container, BorderLayout.WEST); } if (myMessage != null)... | createNorthPanel |
278,329 | JComponent () { return null; } | createCenterPanel |
278,330 | int (int i) { return JBUIScale.scale(i); } | scale |
278,331 | ComponentPanelBuilder (JComponent component) { return new ComponentPanelBuilder(component); } | panel |
278,332 | ProgressPanelBuilder (JProgressBar progressBar) { return new ProgressPanelBuilder(progressBar); } | panel |
278,333 | PanelGridBuilder () { return new PanelGridBuilder(); } | grid |
278,334 | TreePath () { return null; } | getRestoredPath |
278,335 | void (@NotNull JTree tree) { tree.putClientProperty(KEY, this); } | installOn |
278,336 | ExpandOnDoubleClick (@NotNull JTree tree) { Object property = tree.getClientProperty(KEY); if (property instanceof ExpandOnDoubleClick) return (ExpandOnDoubleClick)property; String option = Registry.get(KEY).getSelectedOption(); if (NEVER.name().equalsIgnoreCase(option)) return NEVER; if (ALWAYS.name().equalsIgnoreCase... | getBehavior |
278,337 | void (@NotNull JTree tree, @NotNull Function<? super TreePath, ? extends Navigatable> provider) { tree.putClientProperty(NAVIGATABLE_PROVIDER, provider); } | setNavigatableProvider |
278,338 | JBTreeTraverser<Object> (@NotNull JTree tree) { TreeModel model = tree.getModel(); Object root = model.getRoot(); return JBTreeTraverser.from(node -> nodeChildren(node, model)).withRoot(root); } | treeTraverser |
278,339 | JBTreeTraverser<TreePath> (@NotNull JTree tree) { TreeModel model = tree.getModel(); Object root = model.getRoot(); TreePath rootPath = root == null ? null : new TreePath(root); return JBTreeTraverser.<TreePath>from(path -> nodeChildren(path.getLastPathComponent(), model) .map(o -> path.pathByAddingChild(o))) .withRoot... | treePathTraverser |
278,340 | JBIterable<Object> (@Nullable Object node, @NotNull TreeModel model) { int count = model.getChildCount(node); return count == 0 ? JBIterable.empty() : NUMBERS.take(count).map(index -> model.getChild(node, index)); } | nodeChildren |
278,341 | JBTreeTraverser<TreeNode> (@Nullable TreeNode treeNode) { return JBTreeTraverser.<TreeNode>from(node -> nodeChildren(node)).withRoot(treeNode); } | treeNodeTraverser |
278,342 | JBIterable<TreeNode> (@Nullable TreeNode treeNode) { int count = treeNode == null ? 0 : treeNode.getChildCount(); return count == 0 ? JBIterable.empty() : NUMBERS.take(count).map(index -> treeNode.getChildAt(index)); } | nodeChildren |
278,343 | boolean (@NotNull Tree tree, int threshold) { return hasManyNodes(treeTraverser(tree), threshold); } | hasManyNodes |
278,344 | boolean (@NotNull TreeNode node, int threshold) { return hasManyNodes(treeNodeTraverser(node), threshold); } | hasManyNodes |
278,345 | int (@NotNull JTree tree, int x, int y) { return Math.max(-1, tree.getRowForPath(getPathForLocation(tree, x, y))); } | getRowForLocation |
278,346 | void (@NotNull JTree tree, @Nullable TreePath path) { assert EventQueue.isDispatchThread(); Rectangle bounds = tree.getPathBounds(path); if (bounds != null) tree.repaint(0, bounds.y, tree.getWidth(), bounds.height); } | repaintPath |
278,347 | void (@NotNull JTree tree, int row) { assert EventQueue.isDispatchThread(); Rectangle bounds = tree.getRowBounds(row); if (bounds != null) tree.repaint(0, bounds.y, tree.getWidth(), bounds.height); } | repaintRow |
278,348 | List<TreePath> (@NotNull JTree tree) { return collectExpandedObjects(tree, Function.identity()); } | collectExpandedPaths |
278,349 | List<Object> (@NotNull JTree tree) { return collectExpandedObjects(tree, TreeUtil::getLastUserObject); } | collectExpandedUserObjects |
278,350 | List<TreePath> (@NotNull JTree tree, @NotNull TreePath root) { return collectExpandedObjects(tree, root, Function.identity()); } | collectExpandedPaths |
278,351 | List<Object> (@NotNull JTree tree, @NotNull TreePath root) { return collectExpandedObjects(tree, root, TreeUtil::getLastUserObject); } | collectExpandedUserObjects |
278,352 | void (final @NotNull JTree tree, final @NotNull List<? extends TreePath> paths) { for(int i = paths.size() - 1; i >= 0; i--){ tree.expandPath(paths.get(i)); } } | restoreExpandedPaths |
278,353 | TreePath (@NotNull TreeNode aRootNode, @NotNull TreeNode aNode) { TreeNode[] nodes = getPathFromRootTo(aRootNode, aNode, true); return new TreePath(nodes); } | getPath |
278,354 | boolean (@NotNull TreeNode ancestor, @NotNull TreeNode node) { TreeNode parent = node; while (parent != null) { if (parent == ancestor) return true; parent = parent.getParent(); } return false; } | isAncestor |
278,355 | TreePath (@NotNull TreeNode node) { TreeNode[] path = getPathFromRootTo(null, node, false); return new TreePath(path); } | getPathFromRoot |
278,356 | void (final @NotNull JTree tree) { TreePath[] paths = tree.getSelectionPaths(); if (paths == null) { return; } for (TreePath path : paths) { removeLastPathComponent((DefaultTreeModel) tree.getModel(), path).restoreSelection(tree); } } | removeSelected |
278,357 | void (final @NotNull JTree tree, final @NotNull TreePath pathToBeRemoved) { removeLastPathComponent((DefaultTreeModel)tree.getModel(), pathToBeRemoved).restoreSelection(tree); } | removeLastPathComponent |
278,358 | ActionCallback (@NotNull JTree tree) { return Promises.toActionCallback(promiseSelectFirst(tree)); } | selectFirstNode |
278,359 | TreePath (@NotNull JTree tree) { TreeModel model = tree.getModel(); Object root = model.getRoot(); TreePath selectionPath = new TreePath(root); if (!tree.isRootVisible() && model.getChildCount(root) > 0) { selectionPath = selectionPath.pathByAddingChild(model.getChild(root, 0)); } return selectionPath; } | getFirstNodePath |
278,360 | int (@NotNull JTree tree, @NotNull DefaultMutableTreeNode targetNode) { TreeNode[] path = targetNode.getPath(); return tree.getRowForPath(new TreePath(path)); } | getRowForNode |
278,361 | TreePath (@NotNull JTree tree) { final TreeModel model = tree.getModel(); Object root = model.getRoot(); TreePath selectionPath = new TreePath(root); while (model.getChildCount(root) > 0) { final Object child = model.getChild(root, 0); selectionPath = selectionPath.pathByAddingChild(child); root = child; } return selec... | getFirstLeafNodePath |
278,362 | IndexTreePathState (final @NotNull DefaultTreeModel model, final @NotNull TreePath pathToBeRemoved) { final IndexTreePathState selectionState = new IndexTreePathState(pathToBeRemoved); if (((MutableTreeNode) pathToBeRemoved.getLastPathComponent()).getParent() == null) return selectionState; model.removeNodeFromParent((... | removeLastPathComponent |
278,363 | void (final @NotNull DefaultTreeModel model, @Nullable Comparator comparator) { sort((DefaultMutableTreeNode) model.getRoot(), comparator); } | sort |
278,364 | void (final @NotNull DefaultMutableTreeNode node, @Nullable Comparator comparator) { sortRecursively(node, comparator); } | sort |
278,365 | void (final @NotNull MutableTreeNode node, final @NotNull List<? extends TreeNode> children) { for (final Object aChildren : children) { final MutableTreeNode child = (MutableTreeNode)aChildren; node.insert(child, node.getChildCount()); } } | addChildrenTo |
278,366 | boolean (@NotNull TreeNode node, @NotNull Traverse traverse) { return treeNodeTraverser(node).traverse(TreeTraversal.POST_ORDER_DFS).processEach(traverse::accept); } | traverse |
278,367 | boolean (@NotNull TreeNode node, @NotNull Traverse traverse) { return treeNodeTraverser(node).traverse(TreeTraversal.PRE_ORDER_DFS).processEach(traverse::accept); } | traverseDepth |
278,368 | void (@NotNull JTree tree, int index) { TreePath path = tree.getPathForRow(index); if (path != null) internalSelect(tree, path); } | selectRow |
278,369 | void (@NotNull JTree tree, @NotNull Collection<? extends TreePath> paths) { if (!paths.isEmpty()) selectPaths(tree, paths.toArray(EMPTY_TREE_PATH)); } | selectPaths |
278,370 | void (@NotNull JTree tree, @NotNull TreePath @NotNull ... paths) { if (paths.length == 0) return; for (TreePath path : paths) tree.makeVisible(path); internalSelect(tree, paths); } | selectPaths |
278,371 | ActionCallback (final @NotNull JTree tree, final TreePath path) { return selectPath(tree, path, true); } | selectPath |
278,372 | ActionCallback (final @NotNull JTree tree, final TreePath path, boolean center) { tree.makeVisible(path); Rectangle bounds = tree.getPathBounds(path); if (bounds == null) return ActionCallback.REJECTED; if (center) { Rectangle visible = tree.getVisibleRect(); if (visible.y < bounds.y + bounds.height && bounds.y < visib... | selectPath |
278,373 | ActionCallback (final @NotNull JTree tree) { final int size = tree.getRowCount(); int row = tree.getLeadSelectionRow(); if (row < size - 1) { row++; return showAndSelect(tree, row, row + 2, row, getSelectedRow(tree), false, true, true); } else { return ActionCallback.DONE; } } | moveDown |
278,374 | ActionCallback (final @NotNull JTree tree) { int row = tree.getLeadSelectionRow(); if (row > 0) { row--; return showAndSelect(tree, row - 2, row, row, getSelectedRow(tree), false, true, true); } else { return ActionCallback.DONE; } } | moveUp |
278,375 | ActionCallback (final @NotNull JTree tree) { final int visible = getVisibleRowCount(tree); if (visible <= 0){ return moveHome(tree); } final int decrement = visible - 1; final int row = Math.max(getSelectedRow(tree) - decrement, 0); final int top = getFirstVisibleRow(tree) - decrement; final int bottom = top + visible ... | movePageUp |
278,376 | ActionCallback (final @NotNull JTree tree) { final int visible = getVisibleRowCount(tree); if (visible <= 0){ return moveEnd(tree); } final int size = tree.getRowCount(); final int increment = visible - 1; final int index = Math.min(getSelectedRow(tree) + increment, size - 1); final int top = getFirstVisibleRow(tree) +... | movePageDown |
278,377 | ActionCallback (final @NotNull JTree tree) { return showRowCentred(tree, 0); } | moveHome |
278,378 | ActionCallback (final @NotNull JTree tree) { return showRowCentred(tree, tree.getRowCount() - 1); } | moveEnd |
278,379 | ActionCallback (final @NotNull JTree tree, final int row) { return showRowCentered(tree, row, true); } | showRowCentred |
278,380 | ActionCallback (final @NotNull JTree tree, final int row, final boolean centerHorizontally) { return showRowCentered(tree, row, centerHorizontally, true); } | showRowCentered |
278,381 | ActionCallback (final @NotNull JTree tree, final int row, final boolean centerHorizontally, boolean scroll) { final int visible = getVisibleRowCount(tree); final int top = visible > 0 ? row - (visible - 1)/ 2 : row; final int bottom = visible > 0 ? top + visible - 1 : row; return showAndSelect(tree, top, bottom, row, -... | showRowCentered |
278,382 | ActionCallback (final @NotNull JTree tree, int top, int bottom, final int row, final int previous) { return showAndSelect(tree, top, bottom, row, previous, false); } | showAndSelect |
278,383 | ActionCallback (final @NotNull JTree tree, int top, int bottom, final int row, final int previous, boolean addToSelection) { return showAndSelect(tree, top, bottom, row, previous, addToSelection, true, false); } | showAndSelect |
278,384 | ActionCallback (final @NotNull JTree tree, int top, int bottom, final int row, final int previous, final boolean addToSelection, final boolean scroll) { return showAndSelect(tree, top, bottom, row, previous, addToSelection, scroll, false); } | showAndSelect |
278,385 | ActionCallback (final @NotNull JTree tree, int top, int bottom, final int row, final int previous, final boolean addToSelection, final boolean scroll, final boolean resetSelection) { final TreePath path = tree.getPathForRow(row); if (path == null) return ActionCallback.DONE; final int size = tree.getRowCount(); if (siz... | showAndSelect |
278,386 | void (JTree tree, TreePath path, Rectangle bounds, int offset, long expected, Runnable done, AbstractTreeBuilder builder, int attempt) { Runnable scroll = () -> { Rectangle pathBounds = attempt <= 0 ? null : tree.getPathBounds(path); if (pathBounds != null) { Object property = tree.getClientProperty(TREE_UTIL_SCROLL_TI... | scrollToVisible |
278,387 | int (final @NotNull JTree tree) { return tree.getRowForPath(tree.getSelectionPath()); } | getSelectedRow |
278,388 | int (final @NotNull JTree tree) { final Rectangle visible = tree.getVisibleRect(); int row = -1; for (int i=0; i < tree.getRowCount(); i++) { final Rectangle bounds = tree.getRowBounds(i); if (visible.y <= bounds.y && visible.y + visible.height >= bounds.y + bounds.height) { row = i; break; } } return row; } | getFirstVisibleRow |
278,389 | int (final @NotNull JTree tree) { final Rectangle visible = tree.getVisibleRect(); if (visible == null) return 0; int rowCount = tree.getRowCount(); if (rowCount <= 0) return 0; int firstRow; int lastRow; int rowHeight = tree.getRowHeight(); if (rowHeight > 0) { Insets insets = tree.getInsets(); int top = visible.y - i... | getVisibleRowCount |
278,390 | void (final @NotNull JTree tree) { TreeUI ui = tree.getUI(); if (ui != null && ui.getClass().getName().equals("com.intellij.ui.tree.ui.DefaultTreeUI")) return; tree.getActionMap().put("scrollUpChangeSelection", new AbstractAction() { @Override public void actionPerformed(final ActionEvent e) { movePageUp(tree); } }); t... | installActions |
278,391 | void (final ActionEvent e) { movePageUp(tree); } | actionPerformed |
278,392 | void (final ActionEvent e) { movePageDown(tree); } | actionPerformed |
278,393 | void (final ActionEvent e) { moveUp(tree); } | actionPerformed |
278,394 | void (final ActionEvent e) { moveDown(tree); } | actionPerformed |
278,395 | void (final @NotNull JTree tree, String original, String copyTo) { final Action action = tree.getActionMap().get(original); if (action != null) { tree.getActionMap().put(copyTo, action); } } | copyAction |
278,396 | void (@NotNull JTree tree, final int keepSelectionLevel) { collapseAll(tree, false, keepSelectionLevel); } | collapseAll |
278,397 | void (@NotNull JTree tree, boolean strict, int keepSelectionLevel) { assert EventQueue.isDispatchThread(); int row = tree.getRowCount(); if (row <= 1) return; // nothing to collapse final TreePath leadSelectionPath = tree.getLeadSelectionPath(); int minCount = 1; // allowed path count to collapse if (!tree.isRootVisibl... | collapseAll |
278,398 | TreePath (@NotNull TreePath path, int minCount, int keepSelectionLevel) { if (keepSelectionLevel < 0) return path; if (keepSelectionLevel > minCount) minCount = keepSelectionLevel; int pathCount = path.getPathCount(); while (minCount < pathCount--) path = path.getParentPath(); assert path != null : "unexpected minCount... | normalize |
278,399 | boolean (@NotNull TreePath path) { AbstractTreeNode<?> node = getAbstractTreeNode(path); return node != null && node.isAlwaysExpand(); } | isAlwaysExpand |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.