Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
296,100
String () { return myToolTipText; }
getToolTipText
296,101
void (@NotNull XCompositeNode node) { if (stackFrame != null && watchesInVariables) { stackFrame.computeChildren(node); } else { node.addChildren(XValueChildrenList.EMPTY, true); } }
computeChildren
296,102
String () { if (stackFrame instanceof PinToTopParentValue) return ((PinToTopParentValue) stackFrame).getTag(); return null; }
getTag
296,103
List<XExpression> () { return StreamEx.of(getWatchChildren()) .filter(node -> !(node instanceof ResultNode)) .map(WatchNode::getExpression) .toList(); }
getWatchExpressions
296,104
void () { super.clearChildren(); myChildren.clear(); }
clearChildren
296,105
void () { myChildren.forEach(WatchNodeImpl::computePresentationIfNeeded); }
computeWatches
296,106
void (@Nullable Icon icon, @NotNull XValuePresentation valuePresentation, boolean hasChildren) { Icon resultIcon = AllIcons.Debugger.Db_evaluateNode; if (icon instanceof CompositeIcon) { IconUtil.replaceInnerIcon(icon, AllIcons.Debugger.Db_watch, resultIcon); } else { icon = resultIcon; } super.applyPresentation(icon, valuePresentation, hasChildren); }
applyPresentation
296,107
void () { ApplicationManager.getApplication().invokeLater(() -> { XDebugSession session = XDebugView.getSession(getTree()); if (session != null) { session.rebuildViews(); } }); }
evaluated
296,108
void () { myChildren.removeIf(node -> node instanceof ResultNode); }
removeResultNode
296,109
void (@Nullable XStackFrame stackFrame, @NotNull XExpression expression) { WatchNodeImpl message = new ResultNode(myTree, this, expression, stackFrame); if (ContainerUtil.getFirstItem(myChildren) instanceof ResultNode) { myChildren.set(0, message); message.fireNodeStructureChanged(); } else { myChildren.add(0, message); fireNodeInserted(0); } TreeUtil.selectNode(myTree, message); }
addResultNode
296,110
void (@Nullable XStackFrame stackFrame, @NotNull XExpression expression, int index, boolean navigateToWatchNode) { WatchNodeImpl message = new WatchNodeImpl(myTree, this, expression, stackFrame); if (index < 0 || index > myChildren.size()) { index = myChildren.size(); } myChildren.add(index, message); fireNodeInserted(index); TreeUtil.selectNode(myTree, message); if (navigateToWatchNode) { myTree.scrollPathToVisible(message.getPath()); } }
addWatchExpression
296,111
void (int index) { myTree.getTreeModel().nodesWereInserted(this, new int[]{index + headerNodesCount()}); }
fireNodeInserted
296,112
int (XDebuggerTreeNode node) { int index = myChildren.indexOf(node); if (index != -1) { myChildren.remove(node); fireNodesRemoved(new int[]{index + headerNodesCount()}, new TreeNode[]{node}); } return index; }
removeChildNode
296,113
void (Collection<? extends XDebuggerTreeNode> nodes) { int[] indices = getNodesIndices(nodes); TreeNode[] removed = getChildNodes(indices); myChildren.removeAll(nodes); fireNodesRemoved(indices, removed); }
removeChildren
296,114
void () { myChildren.clear(); fireNodeStructureChanged(); }
removeAllChildren
296,115
void (WatchNode node) { int index = getIndex(node); if (index > 0) { ContainerUtil.swapElements(myChildren, index, index - 1); } fireNodeStructureChanged(); getTree().setSelectionRow(index - 1); }
moveUp
296,116
void (WatchNode node) { int index = getIndex(node); if (index < myChildren.size() - 1) { ContainerUtil.swapElements(myChildren, index, index + 1); } fireNodeStructureChanged(); getTree().setSelectionRow(index + 1); }
moveDown
296,117
void () { editWatch(null); }
addNewWatch
296,118
void (@Nullable WatchNodeImpl node) { WatchNodeImpl messageNode; int index = node != null ? myChildren.indexOf(node) : -1; if (index == -1) { int selectedIndex = myChildren.indexOf(ArrayUtil.getFirstElement(myTree.getSelectedNodes(WatchNodeImpl.class, null))); int targetIndex = selectedIndex == - 1 ? myChildren.size() : selectedIndex + 1; messageNode = new WatchNodeImpl(myTree, this, XExpressionImpl.EMPTY_EXPRESSION, (XStackFrame)null); myChildren.add(targetIndex, messageNode); fireNodeInserted(targetIndex); getTree().setSelectionRows(ArrayUtilRt.EMPTY_INT_ARRAY); } else { messageNode = node; } new WatchInplaceEditor(this, myWatchesView, messageNode, node).show(); }
editWatch
296,119
int () { return 0; }
headerNodesCount
296,120
void (@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, boolean hasChildren) { XValueNodePresentationConfigurator.setPresentation(icon, type, value, hasChildren, this); }
setPresentation
296,121
void (@Nullable Icon icon, @NotNull XValuePresentation presentation, boolean hasChildren) { XValueNodePresentationConfigurator.setPresentation(icon, presentation, hasChildren, this); }
setPresentation
296,122
void (@Nullable Icon icon, @NotNull XValuePresentation presentation, boolean hasChildren, ConfigurableXValueNode node) { doSetPresentation(icon, presentation, hasChildren, node); }
setPresentation
296,123
void (@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, boolean hasChildren, ConfigurableXValueNode node) { doSetPresentation(icon, new XRegularValuePresentation(value, type), hasChildren, node); }
setPresentation
296,124
void (@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull final String separator, @NonNls @Nullable String value, boolean hasChildren, ConfigurableXValueNode node) { doSetPresentation(icon, new XRegularValuePresentation(StringUtil.notNullize(value), type, separator), hasChildren, node); }
setPresentation
296,125
void (@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, @Nullable Function<? super String, @NotNull String> valuePresenter, boolean hasChildren, ConfigurableXValueNode node) { doSetPresentation(icon, valuePresenter == null ? new XRegularValuePresentation(value, type) : new XValuePresentationAdapter(value, type, valuePresenter), hasChildren, node); }
setPresentation
296,126
void (@Nullable final Icon icon, @NotNull final XValuePresentation presentation, final boolean hasChildren, final ConfigurableXValueNode node) { if (DebuggerUIUtil.isObsolete(node)) { return; } Application application = ApplicationManager.getApplication(); if (application.isDispatchThread()) { node.applyPresentation(icon, presentation, hasChildren); } else { Runnable updater = () -> node.applyPresentation(icon, presentation, hasChildren); if (node instanceof XDebuggerTreeNode) { ((XDebuggerTreeNode)node).invokeNodeUpdate(updater); } else { application.invokeLater(updater); } } }
doSetPresentation
296,127
String () { return myType; }
getType
296,128
void (@NotNull XValueTextRenderer renderer) { renderer.renderValue(valuePresenter.apply(myValue)); }
renderValue
296,129
XValueNodeImpl () { return myNode; }
getNode
296,130
boolean () { return myNode.isObsolete() || super.isObsolete(); }
isObsolete
296,131
void (@NotNull String value) { renderStringValue(value, null, -1); }
renderStringValue
296,132
void (@NotNull String value) { renderRawValue(value, DefaultLanguageHighlighterColors.NUMBER); }
renderNumericValue
296,133
void (@NotNull String value) { renderRawValue(value, DefaultLanguageHighlighterColors.KEYWORD); }
renderKeywordValue
296,134
void (@NotNull String value, @NotNull TextAttributesKey key) { renderRawValue(value, key); }
renderValue
296,135
void (@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, boolean hasChildren) { XValueNodePresentationConfigurator.setPresentation(icon, type, value, hasChildren, this); }
setPresentation
296,136
void (@Nullable Icon icon, @NotNull XValuePresentation presentation, boolean hasChildren) { XValueNodePresentationConfigurator.setPresentation(icon, presentation, hasChildren, this); }
setPresentation
296,137
void (@Nullable Icon icon, @NotNull XValuePresentation valuePresentation, boolean hasChildren) { // extra check for obsolete nodes - tree root was changed // too dangerous to put this into isObsolete - it is called from anywhere, not only EDT if (isObsolete()) return; setIcon(icon); boolean alreadyHasInline = myValuePresentation != null; myValuePresentation = valuePresentation; myRawValue = XValuePresentationUtil.computeValueText(valuePresentation); if (XDebuggerSettingsManager.getInstance().getDataViewSettings().isShowValuesInline() && !alreadyHasInline) { updateInlineDebuggerData(); } updateText(); setLeaf(!hasChildren); fireNodeChanged(); myTree.nodeLoaded(this, myName); }
applyPresentation
296,138
void () { try { XDebugSession session = XDebugView.getSession(getTree()); final XSourcePosition mainPosition; final XSourcePosition altPosition; if (session instanceof XDebugSessionImpl) { XStackFrame currentFrame = session.getCurrentStackFrame(); mainPosition = ((XDebugSessionImpl)session).getFrameSourcePosition(currentFrame, XSourceKind.MAIN); altPosition = ((XDebugSessionImpl)session).getFrameSourcePosition(currentFrame, XSourceKind.ALTERNATIVE); } else { mainPosition = session == null ? null : session.getCurrentPosition(); altPosition = null; } if (mainPosition == null && altPosition == null) { return; } final XInlineDebuggerDataCallback callback = new XInlineDebuggerDataCallback() { @Override public void computed(XSourcePosition position) { if (isObsolete() || position == null) return; VirtualFile file = position.getFile(); // filter out values from other files VirtualFile mainFile = mainPosition != null ? mainPosition.getFile() : null; VirtualFile altFile = altPosition != null ? altPosition.getFile() : null; if (!Comparing.equal(mainFile, file) && !Comparing.equal(altFile, file)) { return; } final Document document = FileDocumentManager.getInstance().getDocument(file); if (document == null) return; if (position.getLine() >= 0) { XDebuggerInlayUtil.getInstance(session.getProject()).createLineEndInlay(XValueNodeImpl.this, session, position); } } }; if (getValueContainer().computeInlineDebuggerData(callback) == ThreeState.UNSURE) { getValueContainer().computeSourcePosition(callback::computed); } } catch (Exception ignore) { } }
updateInlineDebuggerData
296,139
void (XSourcePosition position) { if (isObsolete() || position == null) return; VirtualFile file = position.getFile(); // filter out values from other files VirtualFile mainFile = mainPosition != null ? mainPosition.getFile() : null; VirtualFile altFile = altPosition != null ? altPosition.getFile() : null; if (!Comparing.equal(mainFile, file) && !Comparing.equal(altFile, file)) { return; } final Document document = FileDocumentManager.getInstance().getDocument(file); if (document == null) return; if (position.getLine() >= 0) { XDebuggerInlayUtil.getInstance(session.getProject()).createLineEndInlay(XValueNodeImpl.this, session, position); } }
computed
296,140
void (@NotNull final XFullValueEvaluator fullValueEvaluator) { invokeNodeUpdate(() -> { myFullValueEvaluator = fullValueEvaluator; fireNodeChanged(); }); }
setFullValueEvaluator
296,141
void (@NotNull XDebuggerTreeNodeHyperlink link) { invokeNodeUpdate(() -> { myAdditionalHyperLinks.add(link); fireNodeChanged(); }); }
addAdditionalHyperlink
296,142
void () { invokeNodeUpdate(() -> { myAdditionalHyperLinks.clear(); }); }
clearAdditionalHyperlinks
296,143
void () { myFullValueEvaluator = null; }
clearFullValueEvaluator
296,144
void () { myText.clear(); XValueMarkers<?, ?> markers = myTree.getValueMarkers(); if (markers != null) { ValueMarkup markup = markers.getMarkup(getValueContainer()); if (markup != null) { myText.append("[" + markup.getText() + "] ", new SimpleTextAttributes(SimpleTextAttributes.STYLE_BOLD, markup.getColor())); } } if (myValuePresentation.isShowName()) { appendName(); } buildText(myValuePresentation, myText); }
updateText
296,145
void () { if (!StringUtil.isEmpty(myName)) { SimpleTextAttributes attributes = myChanged ? XDebuggerUIConstants.CHANGED_VALUE_ATTRIBUTES : XDebuggerUIConstants.VALUE_NAME_ATTRIBUTES; XValuePresentationUtil.renderValue(myName, myText, attributes, MAX_NAME_LENGTH, null); } }
appendName
296,146
void (@NotNull XValuePresentation valuePresenter, @NotNull ColoredTextContainer text) { buildText(valuePresenter, text, true); }
buildText
296,147
void (@NotNull XValuePresentation valuePresenter, @NotNull ColoredTextContainer text, boolean appendSeparator) { if (appendSeparator) { XValuePresentationUtil.appendSeparator(text, valuePresenter.getSeparator()); } String type = valuePresenter.getType(); if (type != null) { text.append("{" + type + "} ", XDebuggerUIConstants.TYPE_ATTRIBUTES); } valuePresenter.renderValue(new XValueTextRendererImpl(text)); }
buildText
296,148
void () { if (myChanged) return; ThreadingAssertions.assertEventDispatchThread(); myChanged = true; if (myName != null && myValuePresentation != null) { updateText(); fireNodeChanged(); } }
markChanged
296,149
Promise<XExpression> () { return myValueContainer.calculateEvaluationExpression(); }
calculateEvaluationExpression
296,150
XFullValueEvaluator () { return myFullValueEvaluator; }
getFullValueEvaluator
296,151
XDebuggerTreeNodeHyperlink () { if (myFullValueEvaluator != null && myFullValueEvaluator.isEnabled()) { return new XDebuggerTreeNodeHyperlink(myFullValueEvaluator.getLinkText(), myFullValueEvaluator.getLinkAttributes()) { @Override public boolean alwaysOnScreen() { return true; } @Override public void onClick(MouseEvent event) { if (myFullValueEvaluator.isShowValuePopup()) { DebuggerUIUtil.showValuePopup(myFullValueEvaluator, event, myTree.getProject(), null); } else { new HeadlessValueEvaluationCallback(XValueNodeImpl.this).startFetchingValue(myFullValueEvaluator); } event.consume(); } }; } return null; }
getLink
296,152
boolean () { return true; }
alwaysOnScreen
296,153
void (MouseEvent event) { if (myFullValueEvaluator.isShowValuePopup()) { DebuggerUIUtil.showValuePopup(myFullValueEvaluator, event, myTree.getProject(), null); } else { new HeadlessValueEvaluationCallback(XValueNodeImpl.this).startFetchingValue(myFullValueEvaluator); } event.consume(); }
onClick
296,154
void (@NotNull ColoredTextContainer component) { super.appendToComponent(component); for (XDebuggerTreeNodeHyperlink hyperlink : getAdditionalLinks()) { component.append(hyperlink.getLinkText(), hyperlink.getTextAttributes(), hyperlink); } }
appendToComponent
296,155
String () { return myName; }
getName
296,156
XValuePresentation () { return myValuePresentation; }
getValuePresentation
296,157
String () { return myRawValue; }
getRawValue
296,158
boolean () { return myValuePresentation != null; }
isComputed
296,159
void () { ThreadingAssertions.assertEventDispatchThread(); myRawValue = null; myText.clear(); appendName(); XValuePresentationUtil.appendSeparator(myText, myValuePresentation.getSeparator()); myText.append(XDebuggerUIConstants.getModifyingValueMessage(), XDebuggerUIConstants.MODIFYING_VALUE_HIGHLIGHT_ATTRIBUTES); setLeaf(true); fireNodeStructureChanged(); }
setValueModificationStarted
296,160
String () { return getName(); }
toString
296,161
Object () { if (!getTree().getPinToTopManager().isEnabled()) { return null; } if (!PinToTopUtilKt.canBePinned(this)) return null; return new XDebuggerTreeNodeHyperlink(XDebuggerBundle.message("xdebugger.pin.to.top.action")) { @Override public void onClick(MouseEvent event) { XDebuggerPinToTopAction.Companion.pinToTopField(event, XValueNodeImpl.this); } }; }
getIconTag
296,162
void (MouseEvent event) { XDebuggerPinToTopAction.Companion.pinToTopField(event, XValueNodeImpl.this); }
onClick
296,163
TreeNode (final int childIndex) { return isLeaf() ? null : getChildren().get(childIndex); }
getChildAt
296,164
int () { return isLeaf() ? 0 : getChildren().size(); }
getChildCount
296,165
TreeNode () { return myParent; }
getParent
296,166
int (@NotNull TreeNode node) { if (isLeaf()) return -1; return getChildren().indexOf(node); }
getIndex
296,167
boolean () { return true; }
getAllowsChildren
296,168
boolean () { return myLeaf; }
isLeaf
296,169
Enumeration () { if (isLeaf()) { return Collections.emptyEnumeration(); } return Collections.enumeration(getChildren()); }
children
296,170
void (final Icon icon) { myIcon = icon; }
setIcon
296,171
void (final boolean leaf) { myLeaf = leaf; }
setLeaf
296,172
XDebuggerTreeNodeHyperlink () { return null; }
getLink
296,173
SimpleColoredText () { return myText; }
getText
296,174
Icon () { return myIcon; }
getIcon
296,175
Object () { return null; }
getIconTag
296,176
void () { myTree.getTreeModel().nodeChanged(this); }
fireNodeChanged
296,177
void (int[] indices, TreeNode[] nodes) { if (indices.length > 0) { myTree.getTreeModel().nodesWereRemoved(this, indices, nodes); } }
fireNodesRemoved
296,178
void (Collection<? extends TreeNode> added) { if (!added.isEmpty()) { myTree.getTreeModel().nodesWereInserted(this, getNodesIndices(added)); } }
fireNodesInserted
296,179
TreeNode[] (int[] indices) { final TreeNode[] children = new TreeNode[indices.length]; for (int i = 0; i < indices.length; i++) { children[i] = getChildAt(indices[i]); } return children; }
getChildNodes
296,180
int[] (@Nullable Collection<? extends TreeNode> children) { if (children == null) return ArrayUtilRt.EMPTY_INT_ARRAY; final int[] ints = new int[children.size()]; int i = 0; for (TreeNode node : children) { ints[i++] = getIndex(node); } Arrays.sort(ints); return ints; }
getNodesIndices
296,181
void () { fireNodeStructureChanged(this); }
fireNodeStructureChanged
296,182
void (final TreeNode node) { myTree.getTreeModel().nodeStructureChanged(node); }
fireNodeStructureChanged
296,183
XDebuggerTree () { return myTree; }
getTree
296,184
TreePath () { if (myPath == null) { TreePath path; if (myParent == null) { path = new TreePath(this); } else { path = myParent.getPath().pathByAddingChild(this); } myPath = path; } return myPath; }
getPath
296,185
void (@NotNull ColoredTextContainer component) { getText().appendToComponent(component); XDebuggerTreeNodeHyperlink link = getLink(); if (link != null) { component.append(link.getLinkText(), link.getTextAttributes(), link); } }
appendToComponent
296,186
void (Runnable runnable) { myTree.invokeLater(runnable); }
invokeNodeUpdate
296,187
String () { return myText.toString(); }
toString
296,188
XExpression () { return myExpression; }
getExpression
296,189
XValue () { XValue container = super.getValueContainer(); if (container instanceof XWatchValue) { XValue value = ((XWatchValue)container).myValue; if (value != null) { return value; } } return container; }
getValueContainer
296,190
void () { }
evaluated
296,191
void () { if (getValuePresentation() == null) { getValueContainer().computePresentation(this, XValuePlace.TREE); } }
computePresentationIfNeeded
296,192
void (@NotNull XCompositeNode node) { if (myValue != null) { myValue.computeChildren(node); } }
computeChildren
296,193
void (@NotNull XValueNode node, @NotNull XValuePlace place) { if (myStackFrame != null) { if (myTree.isShowing() || ApplicationManager.getApplication().isUnitTestMode()) { XDebuggerEvaluator evaluator = myStackFrame.getEvaluator(); if (evaluator != null) { evaluator.evaluate(myExpression, new MyEvaluationCallback(node, place), myStackFrame.getSourcePosition()); return; } } else { return; // do not set anything if view is not visible, otherwise the code in computePresentationIfNeeded() will not work } } node.setPresentation(AllIcons.Debugger.Db_watch, EMPTY_PRESENTATION, false); }
computePresentation
296,194
boolean () { return myNode.isObsolete(); }
isObsolete
296,195
void (@NotNull XValue result) { myValue = result; if (myNode instanceof WatchNodeImpl watchNode) { watchNode.evaluated(); } result.computePresentation(myNode, myPlace); }
evaluated
296,196
void (@NotNull String errorMessage) { myNode.setPresentation(XDebuggerUIConstants.ERROR_MESSAGE_ICON, new XErrorValuePresentation(errorMessage), false); }
errorOccurred
296,197
String () { return ""; }
getSeparator
296,198
void (@NotNull XValueTextRenderer renderer) { }
renderValue
296,199
String () { return myValue != null ? myValue.getEvaluationExpression() : null; }
getEvaluationExpression