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 + "':" + err...
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); tex...
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, va...
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.c...
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(descr...
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...
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(ScrollPaneFa...
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); AnActi...
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).is...
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().invoke...
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()...
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 + scree...
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 ActionToolb...
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, ac...
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, botto...
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...
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...
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(edi...
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...
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)) { retur...
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(...
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.ge...
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); CodeFloatingToolba...
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...
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...
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) .setRequestFoc...
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 ? myE...
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.get...
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 += getMediumTextViewer...
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