Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
294,900
void () { getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); setCellRenderer(createListRenderer()); getEmptyText().setText(XDebuggerBundle.message("debugger.frames.not.available")); }
doInit
294,901
void (ListModel model) { // do not allow to change model (e.g. to FilteringListModel) }
setModel
294,902
CollectionListModel () { return (CollectionListModel)super.getModel(); }
getModel
294,903
void () { getModel().removeAll(); }
clear
294,904
int () { return getModel().getSize(); }
getElementCount
294,905
String () { return XDebuggerBundle.message("action.next.frame.text"); }
getNextOccurenceActionName
294,906
String () { return XDebuggerBundle.message("action.previous.frame.text"); }
getPreviousOccurenceActionName
294,907
OccurenceInfo () { return goOccurrence(1); }
goNextOccurence
294,908
OccurenceInfo () { return goOccurrence(-1); }
goPreviousOccurence
294,909
OccurenceInfo (int step) { setSelectedIndex(getSelectedIndex() + step); return getOccurenceInfo(); }
goOccurrence
294,910
OccurenceInfo () { Navigatable navigatable = getSelectedFrameNavigatable(); return new OccurenceInfo(navigatable, -1, -1); }
getOccurenceInfo
294,911
boolean () { return getSelectedIndex() < getElementCount() - 1; }
hasNextOccurence
294,912
boolean () { return getSelectedIndex() > 0; }
hasPreviousOccurence
294,913
int (String prefix, int startIndex, Position.Bias bias) { return -1; // disable built-in search completely to avoid calling toString for every item }
getNextMatch
294,914
int (Point location) { if (location.y <= getPreferredSize().height) { return super.locationToIndex(location); } return -1; }
locationToIndex
294,915
void () { AppUIUtil.invokeLaterIfProjectAlive(getTree().getProject(), () -> buildTreeAndRestoreState(myStackFrame)); }
rebuildView
294,916
void (@NotNull SessionEvent event, @NotNull XDebugSession session) { }
processSessionEvent
294,917
void (@NotNull XDebugView debugView, @NotNull XDebugSession session) { session.addSessionListener(new XDebugViewSessionListener(debugView, session), debugView); }
attach
294,918
void (@NotNull XDebugView.SessionEvent event) { myDebugView.processSessionEvent(event, mySession); }
onSessionEvent
294,919
void () { onSessionEvent(XDebugView.SessionEvent.PAUSED); }
sessionPaused
294,920
void () { onSessionEvent(XDebugView.SessionEvent.RESUMED); }
sessionResumed
294,921
void () { onSessionEvent(XDebugView.SessionEvent.STOPPED); }
sessionStopped
294,922
void () { onSessionEvent(XDebugView.SessionEvent.FRAME_CHANGED); }
stackFrameChanged
294,923
void () { onSessionEvent(XDebugView.SessionEvent.BEFORE_RESUME); }
beforeSessionResume
294,924
void () { onSessionEvent(XDebugView.SessionEvent.SETTINGS_CHANGED); }
settingsChanged
294,925
ValueMarkup (@NotNull XValue value) { Class<V> valueClass = myProvider.getValueClass(); if (!valueClass.isInstance(value)) return null; V v = valueClass.cast(value); if (!myProvider.canMark(v)) return null; M m = myProvider.getMarker(v); if (m == null) return null; return myMarkers.get(m); }
getMarkup
294,926
boolean (@NotNull XValue value) { Class<V> valueClass = myProvider.getValueClass(); if (!valueClass.isInstance(value)) return false; return myProvider.canMark(valueClass.cast(value)); }
canMarkValue
294,927
Promise<Object> (@NotNull XValue value, @NotNull ValueMarkup markup) { synchronized (myMarkers) { // remove the existing label if any myMarkers.entrySet().stream() .filter(entry -> markup.getText().equals(entry.getValue().getText())) .findFirst() .ifPresent(entry -> myMarkers.remove(entry.getKey())); } //noinspection u...
markValue
294,928
Promise<Object> (@NotNull XValue value) { //noinspection unchecked final V v = (V)value; M m = myProvider.getMarker(v); if (m != null) { return myProvider.unmarkValueAsync(v, m) .onSuccess(__ -> myMarkers.remove(m)); } else { return Promises.resolvedPromise(); } }
unmarkValue
294,929
void () { myMarkers.clear(); }
clear
294,930
void () { List items = getModel().getItems(); if (!items.isEmpty()) { StringBuilder plainBuf = new StringBuilder(); TextTransferable.ColoredStringBuilder coloredTextContainer = new TextTransferable.ColoredStringBuilder(); for (Object value : items) { if (value instanceof ItemWithSeparatorAbove item) { if (item.hasSepar...
copyStack
294,931
void (MouseEvent e) { var list = ObjectUtils.tryCast(e.getComponent(), XDebuggerFramesList.class); if (list != null && XDebuggerFrameListMouseListener.getResetIconHovered(list)) { ActionManager.getInstance().tryToExecute( resetFrameAction, e, list, "XDebuggerFramesList", true ); } }
mousePressed
294,932
Object (@NotNull XStackFrame frame, @NonNls String dataId) { if (CommonDataKeys.NAVIGATABLE.is(dataId)) { return getFrameNavigatable(frame, true); } if (CommonDataKeys.VIRTUAL_FILE.is(dataId)) { return getFile(frame); } if (CommonDataKeys.PSI_FILE.is(dataId)) { VirtualFile file = getFile(frame); if (file != null && fil...
getSlowData
294,933
void () { super.clear(); }
clear
294,934
boolean (@NotNull XStackFrame toSelect) { //noinspection unchecked if (!Objects.equals(getSelectedValue(), toSelect) && getModel().contains(toSelect)) { setSelectedValue(toSelect, true); return true; } return false; }
selectFrame
294,935
boolean (int indexToSelect) { if (getSelectedIndex() != indexToSelect && getElementCount() > indexToSelect && getModel().getElementAt(indexToSelect) != null) { setSelectedIndex(indexToSelect); return true; } return false; }
selectFrame
294,936
VirtualFile (XStackFrame frame) { XSourcePosition position = frame.getSourcePosition(); return position != null ? position.getFile() : null; }
getFile
294,937
ListCellRenderer () { return new XDebuggerGroupedFrameListRenderer(); }
createListRenderer
294,938
String (Object value) { return null; }
getTextFor
294,939
String (Object value) { return value instanceof ItemWithSeparatorAbove ? ((ItemWithSeparatorAbove)value).getCaptionAboveOf() : null; }
getCaptionAboveOf
294,940
boolean (Object value) { return value instanceof ItemWithSeparatorAbove && ((ItemWithSeparatorAbove)value).hasSeparatorAbove(); }
hasSeparatorAboveOf
294,941
Component (JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { if (myDescriptor.hasSeparatorAboveOf(value)) { Component component = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); if (hasSeparator(value, index)) { setSeparatorFont(list.getFont()); } ((XDebu...
getListCellRendererComponent
294,942
JComponent () { createLabel(); return new XDebuggerFrameListRenderer(); }
createItemComponent
294,943
void (@NotNull final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { if (value == null) { append(XDebuggerBundle.message("stack.frame.loading.text"), SimpleTextAttributes.GRAY_ATTRIBUTES); return; } if (value instanceof String) { append((String)value, SimpleTextAttribu...
customizeCellRenderer
294,944
boolean (JList list) { if (!(list instanceof XDebuggerFramesList)) { return false; } var selectedValue = list.getSelectedValue(); if (!(selectedValue instanceof XStackFrame)) { return false; } try { var dropFrameHandler = findDropFrameHandler((XDebuggerFramesList)list); if (dropFrameHandler == null) { return false; } r...
canDropSelectedFrame
294,945
CharSequence (boolean mainOnly) { // Copy action for JBList queries only "main" part of item, which is decided to be the first one. // But for frame items full description is needed, so let's assume that all parts of entry are "main" return super.getCharSequence(false); }
getCharSequence
294,946
boolean (@Nullable Point p, @Nullable Rectangle bounds) { if (p == null || bounds == null) { return false; } var leftPadding = this.getIpad().left; var iconWidth = myPopFrameIcon.getIconWidth(); return new Rectangle(leftPadding, 0, iconWidth, bounds.height).contains(p); }
isIconHovered
294,947
void (@NotNull AnActionEvent e) { XDebuggerFramesList framesList = e.getData(FRAMES_LIST); e.getPresentation().setEnabledAndVisible(framesList != null && ContainerUtil.getLastItem(framesList.getModel().getItems()) != null); }
update
294,948
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
294,949
void (@NotNull AnActionEvent e) { XDebuggerFramesList framesList = e.getData(FRAMES_LIST); if (framesList != null) { framesList.copyStack(); } }
actionPerformed
294,950
void (@NotNull XDebuggerFramesList list) { addTo(list); var helpTooltip = new HelpTooltip() .setTitle(XDebuggerBundle.message("debugger.frame.list.help.title")) .setDescription(XDebuggerBundle.message("debugger.frame.list.help.description")); Shortcut[] shortcuts = CommonShortcuts.getDelete().getShortcuts(); if (shortc...
installListeners
294,951
int (@NotNull Component component) { return Optional.ofNullable(ClientProperty.get(component, HOVER_INDEX)).orElse(-1); }
getHoveredIndex
294,952
boolean (@NotNull Component component) { return ClientProperty.isTrue(component, CAN_DROP_FRAME); }
getCanDropFrame
294,953
boolean (@NotNull Component component) { return ClientProperty.isTrue(component, RESET_ICON_HOVERED); }
getResetIconHovered
294,954
void (@NotNull Component component, @Nullable Point point) { if (!(component instanceof XDebuggerFramesList list)) return; var oldHoverIndex = getHoveredIndex(component); ClientProperty.put(list, HOVER_POSITION, null); ClientProperty.put(list, HOVER_BOUNDS, null); ClientProperty.put(list, HOVER_INDEX, -1); ClientProper...
updateHover
294,955
void (@NotNull Component component, int x, int y) { updateHover(component, new Point(x, y)); }
mouseEntered
294,956
void (@NotNull Component component, int x, int y) { updateHover(component, new Point(x, y)); }
mouseMoved
294,957
void (@NotNull Component component) { updateHover(component, null); }
mouseExited
294,958
XDebuggerPopFrameIcon (@NotNull IconReplacer replacer) { XDebuggerPopFrameIcon icon = new XDebuggerPopFrameIcon(replacer.replaceIcon(myIcon), replacer.replaceIcon(mySelectedIcon), myIconWidth, myIconHeight); icon.isSelected = isSelected; return icon; }
replaceBy
294,959
void (@Nullable Color background) { myBackground = background; }
setBackground
294,960
boolean () { return isSelected; }
isSelected
294,961
void (boolean selected) { isSelected = selected; }
setSelected
294,962
void (Component c, Graphics g, int x, int y) { Color background = getBackground(); if (background != null) { if (g instanceof Graphics2D) { ((Graphics2D)g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); } g.setColor(background); int arc = (int)Math.ceil(scaleVal(5)); g.fillRoundRe...
paintIcon
294,963
int () { return (int)Math.ceil(scaleVal(myIconWidth)); }
getIconWidth
294,964
int () { return (int)Math.ceil(scaleVal(myIconHeight)); }
getIconHeight
294,965
void (@NotNull AnActionEvent e) { var inputEvent = e.getInputEvent(); var list = e.getData(FRAMES_LIST); if (inputEvent == null || list == null) { return; } var index = -1; var event = ObjectUtils.tryCast(inputEvent, MouseEvent.class); if (event != null) { if (UIUtil.isActionClick(event, MouseEvent.MOUSE_PRESSED) && XD...
actionPerformed
294,966
void (@NotNull AnActionEvent e) { Object contents = CopyPasteManager.getInstance().getContents(XWatchTransferable.EXPRESSIONS_FLAVOR); if (contents instanceof List) { for (Object item : ((List)contents)){ if (item instanceof XExpression) { addWatchExpression(((XExpression)item), -1, true); } } } }
actionPerformed
294,967
JPanel (@NotNull JComponent localsPanelComponent) { var top = createTopPanel(); if (top == null) { return super.createMainPanel(localsPanelComponent); } var layout = localsPanelComponent.getLayout(); boolean canAddComponentToTheRightOfToolbar = layout instanceof BorderLayout; if (canAddComponentToTheRightOfToolbar) { v...
createMainPanel
294,968
ComboBox<XExpression> (CollectionComboBoxModel<XExpression> model, int width) { AnAction addToWatchesAction = new DumbAwareAction(ActionsBundle.actionText(XDebuggerActions.ADD_TO_WATCH), null, AllIcons.Debugger.AddToWatch) { @Override public void actionPerformed(@NotNull AnActionEvent e) { myEvaluateComboBox.saveTextIn...
createComboBox
294,969
void (@NotNull AnActionEvent e) { myEvaluateComboBox.saveTextInHistory(); addWatchExpression(getExpression(), -1, false); DebuggerEvaluationStatisticsCollector.WATCH_FROM_INLINE_ADD.log(e); }
actionPerformed
294,970
void (@NotNull AnActionEvent e) { e.getPresentation().setEnabled(!XDebuggerUtilImpl.isEmptyExpression(getExpression())); }
update
294,971
ActionUpdateThread () { return ActionUpdateThread.BGT; }
getActionUpdateThread
294,972
void (EditorEx editor) { super.prepareEditor(editor); editor.setPlaceholder(XDebuggerBundle.message( "debugger.evaluate.expression.or.add.a.watch.hint", KeymapUtil.getShortcutText(new KeyboardShortcut(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), null)), KeymapUtil.getShortcutText(new KeyboardShortcut(XDebuggerEvaluati...
prepareEditor
294,973
void (@NotNull Editor editor, @NotNull FocusEvent event) { if (myCauses.contains(event.getCause())) { boolean shouldBeIgnored = myEvaluateComboBox.getComboBox().isPopupVisible(); if (!shouldBeIgnored) { DebuggerEvaluationStatisticsCollector.INPUT_FOCUS.log(getTree().getProject()); } } }
focusGained
294,974
void (ActionEvent e) { // This listener overrides one from BasicComboBoxUI$Actions // Close popup manually instead of default handler if (myEvaluateComboBox.getComboBox().isPopupVisible()) { myEvaluateComboBox.getComboBox().setPopupVisible(false); } else { addExpressionResultNode(); } }
actionPerformed
294,975
void (PopupMenuEvent e) { selectedIndexOnPopupOpen = myEvaluateComboBox.getComboBox().getSelectedIndex(); myEvaluateComboBox.requestFocusInEditor(); DebuggerEvaluationStatisticsCollector.HISTORY_SHOW.log(getTree().getProject()); }
popupMenuWillBecomeVisible
294,976
void (PopupMenuEvent e) { if (myEvaluateComboBox.getComboBox().getSelectedIndex() != selectedIndexOnPopupOpen) { DebuggerEvaluationStatisticsCollector.HISTORY_CHOOSE.log(getTree().getProject()); } }
popupMenuWillBecomeInvisible
294,977
void (@NotNull SessionEvent event) { if (event != SessionEvent.SETTINGS_CHANGED) { myRootNode.removeResultNode(); } }
beforeTreeBuild
294,978
void () { XExpression expression = myEvaluateComboBox.getExpression(); if (!XDebuggerUtilImpl.isEmptyExpression(expression)) { myEvaluateComboBox.saveTextInHistory(); XDebugSession session = getSession(getTree()); myRootNode.addResultNode(session != null ? session.getCurrentStackFrame() : null, expression); DebuggerEva...
addExpressionResultNode
294,979
void (@NotNull XStackFrame stackFrame) { super.buildTreeAndRestoreState(stackFrame); if (myEvaluateComboBox != null) { myEvaluateComboBox.setSourcePosition(stackFrame.getSourcePosition()); } }
buildTreeAndRestoreState
294,980
void () { final XDebuggerTree watchTree = getTree(); final Alarm quitePeriod = new Alarm(); final Alarm editAlarm = new Alarm(); final ClickListener mouseListener = new ClickListener() { @Override public boolean onClick(@NotNull MouseEvent event, int clickCount) { if (!SwingUtilities.isLeftMouseButton(event) || ((event...
installEditListeners
294,981
boolean (@NotNull MouseEvent event, int clickCount) { if (!SwingUtilities.isLeftMouseButton(event) || ((event.getModifiers() & (InputEvent.SHIFT_MASK | InputEvent.ALT_MASK | InputEvent.CTRL_MASK | InputEvent.META_MASK)) !=0) ) { return false; } boolean sameRow = isAboveSelectedItem(event, watchTree, false); if (!sameRo...
onClick
294,982
boolean (@NotNull MouseEvent event) { if (!isAboveSelectedItem(event, watchTree, true)) { myRootNode.addNewWatch(); return true; } return false; }
onDoubleClick
294,983
void (@NotNull FocusEvent e) { quitePeriod.addRequest(EmptyRunnable.getInstance(), UIUtil.getMultiClickInterval()); }
focusGained
294,984
void (@NotNull FocusEvent e) { editAlarm.cancelAllRequests(); }
focusLost
294,985
void (@NotNull TreeSelectionEvent e) { quitePeriod.addRequest(EmptyRunnable.getInstance(), UIUtil.getMultiClickInterval()); }
valueChanged
294,986
void () { ListenerUtil.removeClickListener(watchTree, mouseListener); ListenerUtil.removeClickListener(watchTree, mouseEmptySpaceListener); ListenerUtil.removeFocusListener(watchTree, focusListener); watchTree.removeTreeSelectionListener(selectionListener); }
dispose
294,987
void () { Disposer.dispose(myDisposables); DnDManager.getInstance().unregisterTarget(this, getTree()); super.dispose(); }
dispose
294,988
boolean (MouseEvent event, XDebuggerTree watchTree, boolean fullWidth) { Rectangle bounds = watchTree.getRowBounds(watchTree.getLeadSelectionRow()); if (bounds != null) { if (fullWidth) { bounds.x = 0; } bounds.width = watchTree.getWidth(); if (bounds.contains(event.getPoint())) { return true; } } return false; }
isAboveSelectedItem
294,989
void (@NotNull XExpression expression, int index, final boolean navigateToWatchNode) { addWatchExpression(expression, index, navigateToWatchNode, false); }
addWatchExpression
294,990
void (@NotNull XExpression expression, int index, final boolean navigateToWatchNode, boolean noDuplicates) { ThreadingAssertions.assertEventDispatchThread(); XDebugSession session = getSession(getTree()); boolean found = false; if (noDuplicates) { for (WatchNode child : myRootNode.getWatchChildren()) { if (child.getExp...
addWatchExpression
294,991
void () { myRootNode.computeWatches(); }
computeWatches
294,992
XValueContainerNode (@Nullable XStackFrame stackFrame) { if (inlineWatchesEnabled) { myRootNode = new InlineWatchesRootNode(getTree(), this, getExpressions(), getInlineExpressions(), stackFrame, myWatchesInVariables); } else { myRootNode = new WatchesRootNode(getTree(), this, getExpressions(), stackFrame, myWatchesInVa...
doCreateNewRootNode
294,993
List<InlineWatch> () { return getWatchesManager().getInlineWatches(); }
getInlineExpressions
294,994
XDebuggerWatchesManager () { return ((XDebuggerManagerImpl)XDebuggerManager.getInstance(getTree().getProject())) .getWatchesManager(); }
getWatchesManager
294,995
void (@NotNull InlineWatch watch, int index, boolean navigateToWatchNode) { ThreadingAssertions.assertEventDispatchThread(); XDebugSession session = getSession(getTree()); ((InlineWatchesRootNode)myRootNode).addInlineWatchExpression(session != null ? session.getCurrentStackFrame() : null, watch, index, navigateToWatchN...
addInlineWatchExpression
294,996
void (Collection<InlineWatch> watches) { InlineWatchesRootNode rootNode = (InlineWatchesRootNode)myRootNode; @SuppressWarnings("unchecked") List<? extends XDebuggerTreeNode> nodesToRemove = (List<? extends XDebuggerTreeNode>)ContainerUtil.filter(rootNode.getInlineWatchChildren(), node -> watches.contains(node.getWatch(...
removeInlineWatches
294,997
void (List<? extends XDebuggerTreeNode> inlineWatches, boolean updateManager) { InlineWatchesRootNode rootNode = (InlineWatchesRootNode)myRootNode; List<? extends InlineWatchNode> inlineWatchChildren = rootNode.getInlineWatchChildren(); final int[] minIndex = {Integer.MAX_VALUE}; List<InlineWatchNode> toRemoveInlines =...
removeInlineNodes
294,998
void (XValueContainerNode root) { if (myWatchesInVariables) { super.addEmptyMessage(root); } }
addEmptyMessage
294,999
List<XExpression> () { XDebuggerTree tree = getTree(); XDebugSession session = getSession(tree); List<XExpression> expressions; if (session != null) { expressions = ((XDebugSessionImpl)session).getSessionData().getWatchExpressions(); } else { XDebuggerTreeNode root = tree.getRoot(); expressions = root instanceof Watche...
getExpressions