Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
296,400 | boolean () { return isHintHidden(); } | isObsolete |
296,401 | void (@NotNull final String errorMessage) { showEvaluating.set(false); ApplicationManager.getApplication().invokeLater(() -> { if (getType() == ValueHintType.MOUSE_CLICK_HINT) { showHint(HintUtil.createErrorLabel(errorMessage)); } else { hideCurrentHint(); } }); LOG.debug("Cannot evaluate '" + myExpression + "':" + errorMessage); } | errorOccurred |
296,402 | JComponent (@Nullable Icon icon, @NotNull SimpleColoredText text, @NotNull XValuePresentation presentation, @Nullable XFullValueEvaluator evaluator) { var panel = installInformationProperties(new BorderLayoutPanel()); SimpleColoredComponent component = HintUtil.createInformationComponent(); component.setIcon(icon); text.appendToComponent(component); panel.add(component); if (evaluator != null) { var evaluationLinkComponent = new SimpleColoredComponent(); appendEvaluatorLink(evaluator, evaluationLinkComponent); LinkMouseListenerBase.installSingleTagOn(evaluationLinkComponent); panel.addToRight(evaluationLinkComponent); } return panel; } | createHintComponent |
296,403 | void () { if (myDisposable != null) { Disposer.dispose(myDisposable); myDisposable = null; } } | disposeVisibleHint |
296,404 | void (@NotNull XValue value) { showTreePopup(getTreeCreator(), Pair.create(value, myValueName)); } | showTree |
296,405 | XDebuggerTreeCreator () { XValueMarkers<?,?> valueMarkers = myDebugSession == null ? null : ((XDebugSessionImpl)myDebugSession).getValueMarkers(); XSourcePosition position = myDebugSession == null ? null : myDebugSession.getCurrentPosition(); return new XDebuggerTreeCreator(getProject(), myEditorsProvider, position, valueMarkers) { @Override public @NotNull String getTitle(@NotNull Pair<XValue, String> descriptor) { return ""; } }; } | getTreeCreator |
296,406 | String (@NotNull Pair<XValue, String> descriptor) { return ""; } | getTitle |
296,407 | Runnable (@NotNull XValue value, @Nullable XFullValueEvaluator evaluator) { if (value instanceof XValueTextProvider && ((XValueTextProvider)value).shouldShowTextValue()) { @NotNull String initialText = StringUtil.notNullize(((XValueTextProvider)value).getValueText()); return () -> showTextPopup(getTreeCreator(), Pair.create(value, myValueName), initialText, evaluator); } return () -> showTree(value); } | getShowPopupRunnable |
296,408 | String () { return myExpression; } | toString |
296,409 | Tree (@NotNull Pair<XInstanceEvaluator, String> descriptor) { final XDebuggerTree tree = new XDebuggerTree(myProject, myProvider, myPosition, XDebuggerActions.INSPECT_TREE_POPUP_GROUP, myMarkers); final XValueNodeImpl root = new XValueNodeImpl(tree, null, descriptor.getSecond(), new InstanceEvaluatorTreeRootValue(descriptor.getFirst(), descriptor.getSecond())); tree.setRoot(root, false); Condition<TreeNode> visibleRootCondition = node -> node.getParent() == root; tree.expandNodesOnLoad(visibleRootCondition); tree.selectNodeOnLoad(visibleRootCondition, Conditions.alwaysFalse()); return tree; } | createTree |
296,410 | String (@NotNull Pair<XInstanceEvaluator, String> descriptor) { return descriptor.getSecond(); } | getTitle |
296,411 | void (Object node, ResultConsumer<? super Pair<XInstanceEvaluator, String>> resultConsumer) { if (node instanceof XValueNodeImpl valueNode) { resultConsumer.onSuccess(Pair.create(valueNode.getValueContainer().getInstanceEvaluator(), valueNode.getName())); } } | createDescriptorByNode |
296,412 | void (@NotNull XValueNode node, @NotNull XValuePlace place) { node.setPresentation(null, null, "root", true); } | computePresentation |
296,413 | void (@NotNull final XCompositeNode node) { XStackFrame frame = mySession.getCurrentStackFrame(); if (frame != null) { myInstanceEvaluator.evaluate(new XDebuggerEvaluator.XEvaluationCallback() { @Override public void evaluated(@NotNull XValue result) { node.addChildren(XValueChildrenList.singleton(myName, result), true); } @Override public void errorOccurred(@NotNull String errorMessage) { } }, frame); } else { node.setErrorMessage("Frame is not available"); } } | computeChildren |
296,414 | void (@NotNull XValue result) { node.addChildren(XValueChildrenList.singleton(myName, result), true); } | evaluated |
296,415 | void (@NotNull String errorMessage) { } | errorOccurred |
296,416 | BorderLayoutPanel (Tree tree) { return fillMainPanel(JBUI.Panels.simplePanel(), tree); } | createMainPanel |
296,417 | BorderLayoutPanel (BorderLayoutPanel mainPanel, Tree tree) { JComponent toolbar = createToolbar(mainPanel, tree); tree.setBackground(UIUtil.getToolTipBackground()); toolbar.setBackground(UIUtil.getToolTipActionBackground()); new WindowMoveListener(mainPanel).installTo(toolbar); return mainPanel.addToCenter(ScrollPaneFactory.createScrollPane(tree, true)).addToBottom(toolbar); } | fillMainPanel |
296,418 | void () { D item = myHistory.get(myCurrentIndex); updateTree(item); } | updateTree |
296,419 | void (@NotNull D selectedItem) { updateContainer(myTreeCreator.createTree(selectedItem), myTreeCreator.getTitle(selectedItem)); } | updateTree |
296,420 | void (final D item) { if (myCurrentIndex < HISTORY_SIZE) { if (myCurrentIndex != -1) { myCurrentIndex += 1; } else { myCurrentIndex = 1; } myHistory.add(myCurrentIndex, item); } } | addToHistory |
296,421 | JComponent (JPanel parent, Tree tree) { DefaultActionGroup group = new DefaultActionGroup(); group.add(new SetAsRootAction(tree)); AnAction back = new GoBackwardAction(); back.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, InputEvent.ALT_MASK)), parent); group.add(back); AnAction forward = new GoForwardAction(); forward.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, InputEvent.ALT_MASK)), parent); group.add(forward); ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("DebuggerTreeWithHistory", group, true); toolbar.setTargetComponent(tree); return toolbar.getComponent(); } | createToolbar |
296,422 | void (@NotNull AnActionEvent e) { if (myHistory.size() > 1 && myCurrentIndex < myHistory.size() - 1){ myCurrentIndex ++; updateTree(); } } | actionPerformed |
296,423 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(myHistory.size() > 1 && myCurrentIndex < myHistory.size() - 1); } | update |
296,424 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
296,425 | void (@NotNull AnActionEvent e) { if (myHistory.size() > 1 && myCurrentIndex > 0) { myCurrentIndex--; updateTree(); } } | actionPerformed |
296,426 | void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(myHistory.size() > 1 && myCurrentIndex > 0); } | update |
296,427 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
296,428 | void (@NotNull AnActionEvent e) { TreePath path = myTree.getSelectionPath(); boolean enabled = path != null && path.getPathCount() > (myTree.isRootVisible() ? 1 : 2); Object component = myTree.getLastSelectedPathComponent(); if (enabled && component instanceof XValueNodeImpl) { enabled = !((XValueNodeImpl)component).isLeaf(); } e.getPresentation().setEnabled(enabled); } | update |
296,429 | ActionUpdateThread () { return ActionUpdateThread.EDT; } | getActionUpdateThread |
296,430 | void (@NotNull AnActionEvent e) { TreePath path = myTree.getSelectionPath(); if (path != null) { Object node = path.getLastPathComponent(); myTreeCreator.createDescriptorByNode(node, new ResultConsumer<>() { @Override public void onSuccess(final D value) { if (value != null) { ApplicationManager.getApplication().invokeLater(() -> { addToHistory(value); updateTree(value); }); } } @Override public void onFailure(@NotNull Throwable t) { LOG.debug(t); } }); } } | actionPerformed |
296,431 | void (final D value) { if (value != null) { ApplicationManager.getApplication().invokeLater(() -> { addToHistory(value); updateTree(value); }); } } | onSuccess |
296,432 | void (@NotNull Throwable t) { LOG.debug(t); } | onFailure |
296,433 | void (Disposable disposable, Tree tree) { if (tree instanceof Disposable) { Disposer.register(disposable, (Disposable)tree); } } | registerTreeDisposable |
296,434 | boolean (AnAction action) { return true; } | shouldBeVisible |
296,435 | void (@NotNull Runnable resizeRunnable, Disposable disposable) { if (myToolbar == null) return; ContainerListener containerListener = new ContainerListener() { @Override public void componentAdded(ContainerEvent e) { resizeRunnable.run(); } @Override public void componentRemoved(ContainerEvent e) { resizeRunnable.run(); } }; myToolbar.addContainerListener(containerListener); myToolbar.addListener(new ActionToolbarListener() { private boolean myActionsUpdatedOnce = false; @Override public void actionsUpdated() { if (myActionsUpdatedOnce) { myToolbar.removeContainerListener(containerListener); } myActionsUpdatedOnce = true; } }, disposable); } | setAutoResizeUntilToolbarNotFull |
296,436 | void (ContainerEvent e) { resizeRunnable.run(); } | componentAdded |
296,437 | void (ContainerEvent e) { resizeRunnable.run(); } | componentRemoved |
296,438 | void () { if (myActionsUpdatedOnce) { myToolbar.removeContainerListener(containerListener); } myActionsUpdatedOnce = true; } | actionsUpdated |
296,439 | void (@NotNull Window popupWindow, int newWidth, int newHeight) { final Rectangle screenRectangle = ScreenUtil.getScreenRectangle(popupWindow); // shift the x coordinate if there is not enough space on the right Point location = popupWindow.getLocation(); int delta = (location.x + newWidth) - (screenRectangle.x + screenRectangle.width); location.x -= Math.max(delta, 0); location.x = Math.max(location.x, screenRectangle.x); final Rectangle targetBounds = new Rectangle(location.x, location.y, newWidth, newHeight); ScreenUtil.cropRectangleToFitTheScreen(targetBounds); if (targetBounds.height != popupWindow.getHeight() || targetBounds.width != popupWindow.getWidth()) { popupWindow.setBounds(targetBounds); popupWindow.validate(); popupWindow.repaint(); } } | updatePopupBounds |
296,440 | void (@NotNull JComponent content, @NotNull DefaultActionGroup toolbarActions, @NotNull String actionsPlace, @Nullable Component toolbarActionsDataProvider) { myToolbar = createToolbar(toolbarActions, actionsPlace, toolbarActionsDataProvider); fillContentPanel(content, myToolbar); } | setContent |
296,441 | ActionToolbarImpl (@NotNull DefaultActionGroup toolbarActions, @NotNull String actionsPlace, @Nullable Component toolbarActionsDataProvider) { toolbarActions.add(new Separator()); DefaultActionGroup wrappedActions = wrapActions(toolbarActions, actionsPlace, toolbarActionsDataProvider); var toolbarImpl = new ActionToolbarImpl(actionsPlace, wrappedActions, true); toolbarImpl.setTargetComponent(null); for (AnAction action : wrappedActions.getChildren(null)) { action.registerCustomShortcutSet(action.getShortcutSet(), myMainPanel); } toolbarImpl.setBorder(BorderFactory.createEmptyBorder()); return toolbarImpl; } | createToolbar |
296,442 | void (@NotNull JComponent content, @NotNull ActionToolbarImpl toolbar) { myMainPanel.addToCenter(content); toolbar.setBackground(UIUtil.getToolTipActionBackground()); new WindowMoveListener(myContent).installTo(toolbar); myContent .addToCenter(myMainPanel) .addToBottom(toolbar); } | fillContentPanel |
296,443 | DefaultActionGroup (@NotNull DefaultActionGroup toolbarActions, @NotNull String actionsPlace, @Nullable Component toolbarActionsDataProvider) { DefaultActionGroup wrappedActions = new DefaultActionGroup(); for (AnAction action : toolbarActions.getChildren(null)) { ActionWrapper actionLink = new ActionWrapper(action, actionsPlace); actionLink.setDataProvider(toolbarActionsDataProvider); wrappedActions.add(actionLink); } return wrappedActions; } | wrapActions |
296,444 | JPanel (@NotNull AnAction action, @NotNull AnActionLink actionLink) { JPanel actionPanel = new JPanel(new GridBagLayout()); GridBag gridBag = new GridBag().fillCellHorizontally().anchor(GridBagConstraints.WEST); int topInset = 5; int bottomInset = 4; actionPanel.add(actionLink, gridBag.next().insets(topInset, 10, bottomInset, 4)); Shortcut[] shortcuts = action.getShortcutSet().getShortcuts(); String shortcutsText = KeymapUtil.getShortcutsText(shortcuts); if (!shortcutsText.isEmpty()) { JComponent keymapHint = createKeymapHint(shortcutsText); actionPanel.add(keymapHint, gridBag.next().insets(topInset, 4, bottomInset, 12)); } actionPanel.setBackground(UIUtil.getToolTipActionBackground()); return actionPanel; } | createCustomToolbarComponent |
296,445 | JComponent (@NlsContexts.Label String shortcutRunAction) { JBLabel shortcutHint = new JBLabel(shortcutRunAction) { @Override public Color getForeground() { return getKeymapColor(); } }; shortcutHint.setBorder(JBUI.Borders.empty()); shortcutHint.setFont(UIUtil.getToolTipFont()); return shortcutHint; } | createKeymapHint |
296,446 | Color () { return getKeymapColor(); } | getForeground |
296,447 | Color () { return JBColor.namedColor("ToolTip.Actions.infoForeground", new JBColor(0x99a4ad, 0x919191)); } | getKeymapColor |
296,448 | JPanel () { JPanel secretPanel = new JPanel(); secretPanel.setPreferredSize(new Dimension(0, 27)); return secretPanel; } | getSecretComponentForToolbar |
296,449 | void (@Nullable Component provider) { myProvider = provider; } | setDataProvider |
296,450 | void (@NotNull AnActionEvent e) { AnActionEvent delegateEvent = e; if (myProvider != null) { delegateEvent = AnActionEvent.createFromAnAction(myDelegate, e.getInputEvent(), myActionPlace, DataManager.getInstance().getDataContext(myProvider)); } myDelegate.actionPerformed(delegateEvent); } | actionPerformed |
296,451 | void (@NotNull AnActionEvent e) { myDelegate.update(e); Presentation presentation = e.getPresentation(); presentation.setEnabled(presentation.isEnabled() && shouldBeVisible(myDelegate)); presentation.setVisible(presentation.isVisible() && shouldBeVisible(myDelegate)); } | update |
296,452 | ActionUpdateThread () { return myDelegate.getActionUpdateThread(); } | getActionUpdateThread |
296,453 | boolean () { return myDelegate.isDumbAware(); } | isDumbAware |
296,454 | JComponent (@NotNull Presentation presentation, @NotNull String place) { if (myDelegate instanceof Separator) { return getSecretComponentForToolbar(); // this is necessary because the toolbar hide if all action panels are not visible } myDelegate.applyTextOverride(myActionPlace, presentation); DataProvider dataProvider = myProvider instanceof DataProvider ? (DataProvider)myProvider : null; ActionLinkButton button = new ActionLinkButton(this, presentation, dataProvider); ClientProperty.put(button, InplaceEditor.IGNORE_MOUSE_EVENT, true); JPanel actionPanel = createCustomToolbarComponent(this, button); presentation.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (Presentation.PROP_TEXT.equals(evt.getPropertyName())) { String value = (String)evt.getNewValue(); button.setText(StringUtil.capitalize(value.toLowerCase(Locale.ROOT))); button.repaint(); } if (Presentation.PROP_ENABLED.equals(evt.getPropertyName())) { actionPanel.setVisible((Boolean)evt.getNewValue()); actionPanel.repaint(); } } }); actionPanel.setVisible(presentation.isEnabled()); return actionPanel; } | createCustomComponent |
296,455 | void (PropertyChangeEvent evt) { if (Presentation.PROP_TEXT.equals(evt.getPropertyName())) { String value = (String)evt.getNewValue(); button.setText(StringUtil.capitalize(value.toLowerCase(Locale.ROOT))); button.repaint(); } if (Presentation.PROP_ENABLED.equals(evt.getPropertyName())) { actionPanel.setVisible((Boolean)evt.getNewValue()); actionPanel.repaint(); } } | propertyChange |
296,456 | void () { if (!myListening) { myListening = true; EditorFactory.getInstance().getEventMulticaster().addEditorMouseMotionListener(this, myProject); EditorFactory.getInstance().getEventMulticaster().addEditorMouseListener(this, myProject); } } | startListening |
296,457 | void (@NotNull EditorMouseEvent e) { cancelAll(); } | mouseExited |
296,458 | void () { myAlarm.cancelAllRequests(); if (myHintRequest != null) { myHintRequest.cancellableHint.tryCancel(); myHintRequest = null; } } | cancelAll |
296,459 | void (@NotNull EditorMouseEvent e) { if (e.isConsumed()) { return; } Editor editor = e.getEditor(); if (editor.getProject() != null && editor.getProject() != myProject) { return; } ValueHintType type = AbstractValueHint.getHintType(e); if (e.getArea() != EditorMouseEventArea.EDITING_AREA || DISABLE_VALUE_LOOKUP.get(editor) == Boolean.TRUE || type == null) { cancelAll(); return; } if (type == ValueHintType.MOUSE_OVER_HINT && !ApplicationManager.getApplication().isActive()) { hideHint(); return; } if (type != ValueHintType.MOUSE_CLICK_HINT) { // click should always trigger a new hint if ((myHintRequest != null && myHintRequest.type == ValueHintType.MOUSE_CLICK_HINT) || (myCurrentHint != null && myCurrentHint.getType() == ValueHintType.MOUSE_CLICK_HINT)) { return; } } Point point = e.getMouseEvent().getPoint(); for (DebuggerSupport support : DebuggerSupport.getDebuggerSupports()) { QuickEvaluateHandler handler = support.getQuickEvaluateHandler(); if (handler.isEnabled(myProject)) { requestHint(handler, editor, point, e, type); return; } } // if no providers were triggered - hide hideHint(); } | mouseMoved |
296,460 | void (final QuickEvaluateHandler handler, final Editor editor, final Point point, @NotNull EditorMouseEvent e, @NotNull final ValueHintType type) { final Rectangle area = editor.getScrollingModel().getVisibleArea(); cancelAll(); if (type == ValueHintType.MOUSE_OVER_HINT) { if (Registry.is("debugger.valueTooltipAutoShow")) { myAlarm.addRequest(() -> { if (area.equals(editor.getScrollingModel().getVisibleArea())) { showHint(handler, editor, point, e, type); } }, getDelay(handler)); } } else { showHint(handler, editor, point, e, type); } } | requestHint |
296,461 | int (QuickEvaluateHandler handler) { int delay = handler.getValueLookupDelay(myProject); if (myCurrentHint != null && !myCurrentHint.isHintHidden()) { delay = Math.max(100, delay); // if hint is showing, delay should not be too small, see IDEA-141464 } return delay; } | getDelay |
296,462 | void () { if (myCurrentHint != null) { myCurrentHint.hideHint(); myCurrentHint = null; } } | hideHint |
296,463 | void (@NotNull QuickEvaluateHandler handler, @NotNull Editor editor, @NotNull Point point, @Nullable EditorMouseEvent e, @NotNull ValueHintType type) { PsiDocumentManager.getInstance(myProject).performWhenAllCommitted(() -> doShowHint(handler, editor, point, e, type)); } | showHint |
296,464 | void (@NotNull QuickEvaluateHandler handler, @NotNull Editor editor, @NotNull Point point, @Nullable EditorMouseEvent event, @NotNull ValueHintType type) { cancelAll(); if (editor.isDisposed() || !handler.canShowHint(myProject)) { return; } if (myCurrentHint != null && myCurrentHint.isInsideHint(editor, point)) { return; } if (event != null && !event.isOverText()) { // do not trigger if there's no text below return; } try { QuickEvaluateHandler.CancellableHint cancellableHint = handler.createValueHintAsync(myProject, editor, point, type); HintRequest hintRequest = new HintRequest(cancellableHint, type); myHintRequest = hintRequest; cancellableHint.hintPromise().onProcessed(hint -> { if (myHintRequest == hintRequest) { // clear request if it has not changed myHintRequest = null; } if (hint == null) { UIUtil.invokeLaterIfNeeded(() -> { hideHint(); if (event != null) { EditorMouseHoverPopupManager.getInstance().showInfoTooltip(event); } }); return; } if (myCurrentHint != null && myCurrentHint.equals(hint)) { return; } if (event != null) { hint.setEditorMouseEvent(event); } UIUtil.invokeLaterIfNeeded(() -> { if (!hint.canShowHint()) { return; } hideHint(); myCurrentHint = hint; myCurrentHint.invokeHint(() -> { if (myCurrentHint == hint) { myCurrentHint = null; } }); }); }); } catch (IndexNotReadyException ignored) { } } | doShowHint |
296,465 | ValueLookupManager (Project project) { return project.getService(ValueLookupManager.class); } | getInstance |
296,466 | record (@NotNull QuickEvaluateHandler.CancellableHint cancellableHint, @NotNull ValueHintType type) { } | HintRequest |
296,467 | JComponent (JPanel parent, Tree tree) { myToolbar = super.createToolbar(parent, tree); return myToolbar; } | createToolbar |
296,468 | TreeModelListener (final Tree tree) { return new TreeModelAdapter() { @Override public void treeStructureChanged(TreeModelEvent e) { resize(e.getTreePath(), tree); } }; } | createTreeListener |
296,469 | void (TreeModelEvent e) { resize(e.getTreePath(), tree); } | treeStructureChanged |
296,470 | void (final Tree tree, @NlsContexts.PopupTitle String title) { if (myPopup != null) { myPopup.cancel(); } tree.getModel().addTreeModelListener(createTreeListener(tree)); myPopup = JBPopupFactory.getInstance().createComponentPopupBuilder(createMainPanel(tree), tree) .setRequestFocus(true) .setTitle(title) .setResizable(true) .setMovable(true) .setDimensionServiceKey(myProject, DIMENSION_SERVICE_KEY, false) .setMayBeParent(true) .setCancelOnOtherWindowOpen(true) .setKeyEventHandler(event -> { if (AbstractPopup.isCloseRequest(event)) { // Do not process a close request if the tree shows a speed search popup SpeedSearchSupply supply = SpeedSearchSupply.getSupply(tree); return supply != null && StringUtil.isEmpty(supply.getEnteredPrefix()); } return false; }) .addListener(new JBPopupListener() { @Override public void onClosed(@NotNull LightweightWindowEvent event) { if (myHideRunnable != null) { myHideRunnable.run(); } } }) .setCancelCallback(() -> { Window parent = SwingUtilities.getWindowAncestor(tree); if (parent != null) { for (Window child : parent.getOwnedWindows()) { if (child.isShowing()) { return false; } } } return true; }) .createPopup(); registerTreeDisposable(myPopup, tree); //Editor may be disposed before later invokator process this action if (myEditor.getComponent().getRootPane() == null) { myPopup.cancel(); return; } myPopup.show(new RelativePoint(myEditor.getContentComponent(), myPoint)); setAutoResize(tree, myToolbar, myPopup); } | updateContainer |
296,471 | void (@NotNull LightweightWindowEvent event) { if (myHideRunnable != null) { myHideRunnable.run(); } } | onClosed |
296,472 | void (final TreePath path, JTree tree) { if (myPopup == null || !myPopup.isVisible() || myPopup.isDisposed()) return; final Window popupWindow = SwingUtilities.windowForComponent(myPopup.getContent()); if (popupWindow == null) return; final Dimension size = tree.getPreferredSize(); final Point location = popupWindow.getLocation(); final Rectangle windowBounds = popupWindow.getBounds(); final Rectangle bounds = tree.getPathBounds(path); if (bounds == null) return; final Rectangle targetBounds = new Rectangle(location.x, location.y, Math.max(Math.max(size.width, bounds.width) + 20, windowBounds.width), Math.max(tree.getRowCount() * bounds.height + 55, windowBounds.height)); ScreenUtil.cropRectangleToFitTheScreen(targetBounds); popupWindow.setBounds(targetBounds); popupWindow.validate(); popupWindow.repaint(); } | resize |
296,473 | void (@NotNull Editor editor, @NotNull JBPopup popup) { CodeFloatingToolbar floatingToolbar = CodeFloatingToolbar.getToolbar(editor); if (floatingToolbar == null) return; boolean wasVisible = floatingToolbar.isShown(); floatingToolbar.scheduleHide(); Disposable disposable = getPopupDisposable(popup); CodeFloatingToolbar.temporarilyDisable(true); Disposer.register(disposable, () -> { if (wasVisible) { floatingToolbar.allowInstantShowing(); } CodeFloatingToolbar.temporarilyDisable(false); }); } | hideAndDisableFloatingToolbar |
296,474 | Disposable (@NotNull JBPopup popup) { Disposable disposable = Disposer.newDisposable(); Disposer.register(popup, disposable); popup.addListener(new JBPopupListener() { @Override public void onClosed(@NotNull LightweightWindowEvent event) { Disposer.dispose(disposable); } }); return disposable; } | getPopupDisposable |
296,475 | void (@NotNull LightweightWindowEvent event) { Disposer.dispose(disposable); } | onClosed |
296,476 | void (@NotNull AnActionEvent e) { myPopup.cancel(); EditorMouseHoverPopupManager.getInstance().showInfoTooltip(myEditorMouseEvent); } | actionPerformed |
296,477 | void (Tree tree, String title) { myTree = (XDebuggerTree)tree; registerTreeDisposable(myDisposable, tree); myMainPanel.removeAll(); fillMainPanel(myMainPanel, tree); myMainPanel.revalidate(); myMainPanel.repaint(); } | updateContainer |
296,478 | BorderLayoutPanel (BorderLayoutPanel mainPanel, Tree tree) { return mainPanel.addToCenter(ScrollPaneFactory.createScrollPane(tree)).addToTop(createToolbar(mainPanel, tree)); } | fillMainPanel |
296,479 | JPanel () { return myMainPanel; } | getMainPanel |
296,480 | void () { myTree.invokeLater(() -> myTree.rebuildAndRestore(XDebuggerTreeState.saveState(myTree))); } | rebuild |
296,481 | XDebuggerTree () { return myTree; } | getTree |
296,482 | boolean (@NotNull Project project, @NotNull AnActionEvent event) { return isEnabled(project); } | isEnabled |
296,483 | CancellableHint (@NotNull Project project, @NotNull Editor editor, @NotNull Point point, ValueHintType type) { return CancellableHint.resolved(createValueHint(project, editor, point, type)); } | createValueHintAsync |
296,484 | record (@NotNull Promise<AbstractValueHint> hintPromise, @Nullable Promise<ExpressionInfo> infoPromise) { public static CancellableHint resolved(@Nullable AbstractValueHint hint) { return new CancellableHint(Promises.resolvedPromise(hint), null); } public void tryCancel() { if (infoPromise instanceof CancellablePromise<ExpressionInfo>) { ((CancellablePromise<ExpressionInfo>)infoPromise).cancel(); } } } | CancellableHint |
296,485 | CancellableHint (@Nullable AbstractValueHint hint) { return new CancellableHint(Promises.resolvedPromise(hint), null); } | resolved |
296,486 | void () { if (infoPromise instanceof CancellablePromise<ExpressionInfo>) { ((CancellablePromise<ExpressionInfo>)infoPromise).cancel(); } } | tryCancel |
296,487 | void (@NotNull XFullValueEvaluationCallback callback) { value.computePresentation(new XValueNodePresentationConfigurator.ConfigurableXValueNodeImpl() { @Override public void applyPresentation(@Nullable Icon icon, @NotNull XValuePresentation valuePresenter, boolean hasChildren) { callback.evaluated(StringUtil.notNullize(((XValueTextProvider)value).getValueText())); } @Override public void setFullValueEvaluator(@NotNull XFullValueEvaluator fullValueEvaluator) { // do nothing - should already be set } }, XValuePlace.TOOLTIP); } | startEvaluation |
296,488 | void (@Nullable Icon icon, @NotNull XValuePresentation valuePresenter, boolean hasChildren) { callback.evaluated(StringUtil.notNullize(((XValueTextProvider)value).getValueText())); } | applyPresentation |
296,489 | void (@NotNull XFullValueEvaluator fullValueEvaluator) { // do nothing - should already be set } | setFullValueEvaluator |
296,490 | JBPopup (XFullValueEvaluator evaluator, Runnable afterEvaluation, Runnable hideTextPopupRunnable) { ComponentPopupBuilder builder = DebuggerUIUtil.createTextViewerPopupBuilder(myContent, myTextViewer, evaluator, myProject, afterEvaluation, hideTextPopupRunnable); return builder.setCancelKeyEnabled(false) .setRequestFocus(true) .setKeyEventHandler(event -> { if (mySetValueModeEnabled) { return false; } if (AbstractPopup.isCloseRequest(event)) { if (myPopup != null) { myPopup.cancel(); return true; } } return false; }).createPopup(); } | createPopup |
296,491 | JBPopup (@NotNull String initialText) { myTextViewer.setPreferredSize(new Dimension(0, 0)); myMainPanel.setBorder(JBUI.Borders.empty(10)); myMainPanel.setBackground(myTextViewer.getBackground()); setContent(myTextViewer, getToolbarActions(), ACTION_PLACE, null); XFullValueEvaluator evaluator = myEvaluator != null ? myEvaluator : new ImmediateFullValueEvaluator(initialText); Runnable hideTextPopupRunnable = myHideRunnable == null ? null : () -> { if (!myTreePopupIsShown) { myHideRunnable.run(); } }; myPopup = createPopup(evaluator, this::resizePopup, hideTextPopupRunnable); myTree = myTreeCreator.createTree(myInitialItem); registerTreeDisposable(myPopup, myTree); setAutoResizeUntilToolbarNotFull(this::resizePopup, myPopup); myPopup.show(new RelativePoint(myEditor.getContentComponent(), myPoint)); return myPopup; } | show |
296,492 | void (@NotNull Window popupWindow) { Rectangle screenRectangle = ScreenUtil.getScreenRectangle(myToolbar); String text = myTextViewer.getText(); FontMetrics fontMetrics = myTextViewer.getFontMetrics(EditorUtil.getEditorFont()); int width = fontMetrics.stringWidth(text) + TOOLBAR_MARGIN; int toolbarWidth = myToolbar.getPreferredSize().width + TOOLBAR_MARGIN; int newWidth = Math.max(toolbarWidth, width); newWidth = Math.min(newWidth, getMaxPopupWidth(screenRectangle)); newWidth = Math.max(newWidth, getMinPopupWidth(screenRectangle)); updatePopupBounds(popupWindow, newWidth, popupWindow.getHeight()); } | updatePopupWidth |
296,493 | void (@NotNull Window popupWindow) { Rectangle screenRectangle = ScreenUtil.getScreenRectangle(myToolbar); int newHeight = myToolbar.getPreferredSize().height; Editor editor = myTextViewer.getEditor(); if (editor != null) { newHeight += editor.getContentComponent().getHeight(); } else { newHeight += getMediumTextViewerHeight(); } newHeight = Math.min(newHeight, getMaxPopupHeight(screenRectangle)); newHeight = Math.max(newHeight, getMinPopupHeight(screenRectangle)); updatePopupBounds(popupWindow, popupWindow.getWidth(), newHeight); } | updatePopupHeight |
296,494 | void () { if (myPopup == null || !myPopup.isVisible() || myPopup.isDisposed()) { return; } final Window popupWindow = SwingUtilities.windowForComponent(myPopup.getContent()); if (popupWindow == null) { return; } updatePopupWidth(popupWindow); updatePopupHeight(popupWindow); } | resizePopup |
296,495 | void () { if (myPopup != null) { myPopup.cancel(); } } | hideTextPopup |
296,496 | DefaultActionGroup () { DefaultActionGroup toolbarActions = new DefaultActionGroup(); toolbarActions.add(new ShowAsObject()); toolbarActions.add(new EnableSetValueMode()); toolbarActions.add(new SetTextValueAction()); toolbarActions.add(new CancelSetValue()); return toolbarActions; } | getToolbarActions |
296,497 | XValueNodeImpl () { if (myTree instanceof XDebuggerTree) { XDebuggerTreeNode node = ((XDebuggerTree)myTree).getRoot(); return node instanceof XValueNodeImpl ? (XValueNodeImpl)node : null; } return null; } | getValueNode |
296,498 | void (Runnable hideTreeRunnable) { new XDebuggerTreePopup<>(myTreeCreator, myEditor, myPoint, myProject, hideTreeRunnable).show(myInitialItem); } | showTreePopup |
296,499 | void () { myCachedText = myTextViewer.getText(); myTextViewer.setViewer(false); myTextViewer.selectAll(); mySetValueModeEnabled = true; myToolbar.updateActionsImmediately(); } | enableSetValueMode |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.