Unnamed: 0 int64 0 305k | body stringlengths 7 52.9k | name stringlengths 1 185 |
|---|---|---|
296,600 | XSourcePosition () { return myWatch.getPosition(); } | getPosition |
296,601 | InlineWatch () { return myWatch; } | getWatch |
296,602 | void () { UIUtil.invokeLaterIfNeeded(() -> { myInlays.forEach(Disposer::dispose); myInlays.clear(); }); } | nodeRemoved |
296,603 | XDebuggerTreeNodeHyperlink () { return new XDebuggerTreeNodeHyperlink(" " + myWatch.getPosition().getFile().getName() + ":" + (myWatch.getPosition().getLine() + 1)) { @Override public boolean alwaysOnScreen() { return true; } @Override public void onClick(MouseEvent event) { myWatch.getPosition().createNavigatable(myTree.getProject()).navigate(true); event.consume(); } }; } | getLink |
296,604 | boolean () { return true; } | alwaysOnScreen |
296,605 | void (MouseEvent event) { myWatch.getPosition().createNavigatable(myTree.getProject()).navigate(true); event.consume(); } | onClick |
296,606 | void (@NotNull XCompositeNode node) { if (myValue != null) { myValue.computeChildren(node); } } | computeChildren |
296,607 | void (@NotNull XValueNode node, @NotNull XValuePlace place) { if (myStackFrame != null) { if (sessionIsInOtherFileThanNode()) { node.setPresentation(AllIcons.Debugger.Db_watch, EMPTY_PRESENTATION, false); return; } XDebuggerEvaluator evaluator = myStackFrame.getEvaluator(); if (evaluator != null) { evaluator.evaluate(myExpression, new MyEvaluationCallback(node, place), myStackFrame.getSourcePosition()); return; } } node.setPresentation(AllIcons.Debugger.Db_watch, EMPTY_PRESENTATION, false); } | computePresentation |
296,608 | boolean () { XDebugSession session = XDebugView.getSession(myTree); if (session != null) { XSourcePosition sessionCurrentPosition = session.getCurrentPosition(); if (sessionCurrentPosition != null && !sessionCurrentPosition.getFile().equals(myPosition.getFile())) { return true; } } return false; } | sessionIsInOtherFileThanNode |
296,609 | boolean () { return myValue != null && myValue instanceof XValueTextProvider && ((XValueTextProvider)myValue).shouldShowTextValue(); } | shouldShowTextValue |
296,610 | boolean () { return myNode.isObsolete(); } | isObsolete |
296,611 | void (@NotNull XValue result) { myValue = result; result.computePresentation(myNode, myPlace); } | evaluated |
296,612 | void (@NotNull String errorMessage) { myNode.setPresentation(XDebuggerUIConstants.ERROR_MESSAGE_ICON, new XErrorValuePresentation(errorMessage), false); } | errorOccurred |
296,613 | String () { return ""; } | getSeparator |
296,614 | void (@NotNull XValueTextRenderer renderer) { } | renderValue |
296,615 | void (@NotNull XNavigatable navigatable) { navigatable.setSourcePosition(myPosition); } | computeSourcePosition |
296,616 | ThreeState (@NotNull XInlineDebuggerDataCallback callback) { callback.computed(myPosition); return ThreeState.YES; } | computeInlineDebuggerData |
296,617 | void (XStackFrame frame, InlineWatch watch, int index, boolean navigateToWatchNode) { InlineWatchNodeImpl message = new InlineWatchNodeImpl(myTree, myInlinesRootNode, watch, frame); if (index == -1) { myInlinesGroup.getChildren().add(message); index = myInlinesGroup.getChildren().size() - 1; } else { myInlinesGroup.getChildren().add(index, message); } if (myInlinesGroup.getChildren().size() == 1) { myTree.getTreeModel().reload(); } fireInlineNodeInserted(index); message.computePresentationIfNeeded(); TreeUtil.selectNode(myTree, message); if (navigateToWatchNode) { myTree.scrollPathToVisible(message.getPath()); } } | addInlineWatchExpression |
296,618 | void (int index) { myTree.getTreeModel().nodesWereInserted(myInlinesRootNode, new int[]{index}); } | fireInlineNodeInserted |
296,619 | void (List<InlineWatchNode> inlines) { List<? extends InlineWatchNode> children = getInlineWatchChildren(); int[] indices = inlines.stream().mapToInt(node -> children.indexOf(node)).filter(ind -> ind >= 0).toArray(); TreeNode[] removed = Arrays.stream(indices).mapToObj(ind -> ((TreeNode)children.get(ind))).toArray(s -> new TreeNode[s]); children.removeAll(inlines); if (indices.length > 0) { inlineNodesRemoved(indices, removed); } if (children.isEmpty()) { allChildrenRemoved(); } } | removeInlineChildren |
296,620 | void (int[] indices, TreeNode[] removed) { myTree.getTreeModel().nodesWereRemoved(myInlinesRootNode, indices, removed); for (TreeNode node : removed) { ((InlineWatchNodeImpl)node).nodeRemoved(); } } | inlineNodesRemoved |
296,621 | void () { myTree.getTreeModel().nodesWereRemoved(this, new int[]{0}, new XValueGroupNodeImpl[]{myInlinesRootNode}); } | allChildrenRemoved |
296,622 | void (@NotNull XCompositeNode node) { if (myInlinesInWatches) { XValueChildrenList list = new XValueChildrenList(); for (InlineWatchNodeImpl child : myChildren) { list.add((XNamedValue)child.getValueContainer()); } node.addChildren(list, true); } else { node.addChildren(XValueChildrenList.EMPTY, true); } } | computeChildren |
296,623 | boolean () { return !getInlineWatchChildren().isEmpty(); } | inlinesRootNodeIsShown |
296,624 | void () { super.clearChildren(); getInlineWatchChildren().clear(); } | clearChildren |
296,625 | void () { super.computeWatches(); ((List<InlineWatchNodeImpl>)getInlineWatchChildren()).forEach(WatchNodeImpl::computePresentationIfNeeded); } | computeWatches |
296,626 | int (XDebuggerTreeNode node) { if (node instanceof InlineWatchNodeImpl) { List<? extends InlineWatchNode> children = getInlineWatchChildren(); int index = children.indexOf(node); if (index != -1) { children.remove(node); inlineNodesRemoved(new int[]{index}, new TreeNode[]{node}); } if (children.isEmpty()) { allChildrenRemoved(); } return index; } else { return super.removeChildNode(node); } } | removeChildNode |
296,627 | void () { getInlineWatchChildren().clear(); fireNodeStructureChanged(myInlinesRootNode); super.removeAllChildren(); } | removeAllChildren |
296,628 | void (@Nullable WatchNodeImpl node) { if (node instanceof InlineWatchNodeImpl) { new WatchInplaceEditor(this, myWatchesView, node, node).show(); } else { super.editWatch(node); } } | editWatch |
296,629 | int () { return inlinesRootNodeIsShown() ? 1 : 0; } | headerNodesCount |
296,630 | void (WatchNode node) { int index = getIndex(node); if (inlinesRootNodeIsShown()) { index--; } if (index > 0) { ContainerUtil.swapElements(getWatchChildren(), index, index - 1); } fireNodeStructureChanged(); int selectionRow = inlinesRootNodeIsShown() ? index : index - 1; getTree().setSelectionRow(selectionRow); } | moveUp |
296,631 | void (WatchNode node) { int index = getIndex(node); if (inlinesRootNodeIsShown()) { index--; } if (index < getWatchChildren().size() - 1) { ContainerUtil.swapElements(getWatchChildren(), index, index + 1); } fireNodeStructureChanged(); int selectionRow = inlinesRootNodeIsShown() ? index + 2 : index + 1; getTree().setSelectionRow(selectionRow); } | moveDown |
296,632 | DefaultActionGroup () { DefaultActionGroup toolbarActions = super.getToolbarActions(); if (Registry.is("debugger.watches.inline.enabled")) { AnAction watchAction = myValueNode instanceof InlineWatchNodeImpl ? new EditInlineWatch() : new AddInlineWatch(); toolbarActions.add(watchAction, Constraints.LAST); } return toolbarActions; } | getToolbarActions |
296,633 | void (Runnable hideTreeRunnable) { XDebuggerTreeInlayPopup.showTreePopup(myTreeCreator, myInitialItem, myValueNode, myEditor, myPoint, myPosition, mySession, hideTreeRunnable); } | showTreePopup |
296,634 | void (@NotNull String initialText, @NotNull XDebuggerTreeCreator creator, @NotNull Pair<XValue, String> initialItem, @NotNull XValueNodeImpl valueNode, @NotNull Editor editor, @NotNull Point point, @NotNull XSourcePosition position, @NotNull XDebugSession session, Runnable hideRunnable) { new XDebuggerTextInlayPopup<>(creator, initialItem.first, initialItem, editor, point, position, session, hideRunnable, valueNode) .show(initialText); } | showTextPopup |
296,635 | boolean () { return true; } | displayTextInToolbar |
296,636 | void (@NotNull AnActionEvent e) { InlineWatchNodeImpl watch = (InlineWatchNodeImpl)myValueNode; XDebuggerWatchesManager watchesManager = ((XDebuggerManagerImpl)XDebuggerManager.getInstance(mySession.getProject())).getWatchesManager(); watchesManager.inlineWatchesRemoved(Collections.singletonList(watch.getWatch()), null); watchesManager.showInplaceEditor(watch.getPosition(), myEditor, mySession, watch.getExpression()); hideTextPopup(); } | actionPerformed |
296,637 | void (@NotNull AnActionEvent e) { myValueNode.calculateEvaluationExpression() .thenAsync(expr -> { return Promises.resolvedPromise(expr); }).onSuccess(expr -> { AppUIUtil.invokeOnEdt(() -> { XDebuggerWatchesManager manager = ((XDebuggerManagerImpl)XDebuggerManager.getInstance(mySession.getProject())).getWatchesManager(); manager.showInplaceEditor(myPosition, myEditor, mySession, expr); hideTextPopup(); }); }); } | actionPerformed |
296,638 | DebuggerActionHandler (@NotNull DebuggerSupport debuggerSupport) { return debuggerSupport.getAddToInlineWatchesActionHandler(); } | getHandler |
296,639 | XExpression () { return myExpression; } | getExpression |
296,640 | XSourcePosition () { return myPosition; } | getPosition |
296,641 | boolean () { return myRangeMarker != null && myRangeMarker.isValid(); } | isValid |
296,642 | int () { return myPosition.getLine(); } | getLine |
296,643 | void () { if (myRangeMarker != null && myRangeMarker.isValid()) { int line = myRangeMarker.getDocument().getLineNumber(myRangeMarker.getStartOffset()); if (line != myPosition.getLine()) { myPosition = Objects.requireNonNull(XDebuggerUtil.getInstance().createPosition(myFile, line)); } } } | updatePosition |
296,644 | void () { Document document = FileDocumentManager.getInstance().getDocument(myFile); if (document == null) return; int offset = document.getLineEndOffset(myPosition.getLine()); myRangeMarker = document.createRangeMarker(offset, offset, true); } | setMarker |
296,645 | XDebuggerInlayUtil (Project project) { return project.getService(XDebuggerInlayUtil.class); } | getInstance |
296,646 | void (@NotNull XDebugProcess debugProcess) { XVariablesView.InlineVariablesInfo.set(debugProcess.getSession(), null); } | processStopped |
296,647 | void (@Nullable XDebugSession previousSession, @Nullable XDebugSession currentSession) { ApplicationManager.getApplication().invokeLater(() -> { if (previousSession != null && !previousSession.isStopped()) { XVariablesView.InlineVariablesInfo info = XVariablesView.InlineVariablesInfo.get(previousSession); if (info != null) { info.setInlays(clearInlaysInt(project)); } } if (currentSession != null) { XVariablesView.InlineVariablesInfo info = XVariablesView.InlineVariablesInfo.get(currentSession); if (info != null) { info.getInlays().forEach(renderer -> createInlayInt(currentSession, renderer)); } } DebuggerUIUtil.repaintCurrentEditor(project); // to update inline debugger data }, ModalityState.nonModal(), project.getDisposed()); } | currentSessionChanged |
296,648 | void (@NotNull EditorFactoryEvent event) { clearInlaysInEditor(event.getEditor()); } | editorReleased |
296,649 | boolean (@NotNull XValueNodeImpl valueNode, @NotNull XDebugSession session, @NotNull XSourcePosition position) { if (valueNode.getValuePresentation() != null) { ApplicationManager.getApplication().invokeLater(() -> { createInlayInt(session, new InlineDebugRenderer(valueNode, position, session)); }, ModalityState.nonModal(), session.getProject().getDisposed()); return true; } return false; } | createLineEndInlay |
296,650 | void (@NotNull XDebugSession session, InlineDebugRenderer renderer) { EDT.assertIsEdt(); XSourcePosition position = renderer.getPosition(); FileEditor editor = XDebuggerUtil.getInstance().getSelectedEditor(session.getProject(), position.getFile()); if (editor instanceof TextEditor) { Editor e = ((TextEditor)editor).getEditor(); int line = position.getLine(); if (!DocumentUtil.isValidLine(line, e.getDocument())) return; int lineStart = e.getDocument().getLineStartOffset(line); int lineEnd = e.getDocument().getLineEndOffset(line); // Don't add the same value twice. List<Inlay<? extends InlineDebugRenderer>> existingInlays = e.getInlayModel().getAfterLineEndElementsInRange(lineStart, lineEnd, InlineDebugRenderer.class); if (ContainerUtil.exists(existingInlays, i -> i.getRenderer().getValueNode().equals(renderer.getValueNode()))) { return; } Inlay<InlineDebugRenderer> inlay = e.getInlayModel().addAfterLineEndElement(lineEnd, new InlayProperties() .disableSoftWrapping(true) .priority(renderer.isCustomNode() ? 0 : -1), renderer); if (inlay == null) { return; } XValueNodeImpl valueNode = renderer.getValueNode(); valueNode.getTree().addTreeListener(new XDebuggerTreeListener() { @Override public void nodeLoaded(@NotNull RestorableStateNode node, @NotNull String name) { if (node == valueNode) { renderer.updatePresentation(); inlay.update(); } } }, inlay); if (renderer.isCustomNode()) { ((InlineWatchNodeImpl)valueNode).inlayCreated(inlay); } } } | createInlayInt |
296,651 | void (@NotNull RestorableStateNode node, @NotNull String name) { if (node == valueNode) { renderer.updatePresentation(); inlay.update(); } } | nodeLoaded |
296,652 | void () { ApplicationManager.getApplication().invokeLater(() -> clearInlaysInt(myProject), ModalityState.nonModal(), myProject.getDisposed()); } | clearInlays |
296,653 | List<Inlay> (@NotNull Editor editor) { EDT.assertIsEdt(); List<? extends Inlay> inlays = editor.getInlayModel().getAfterLineEndElementsInRange(0, editor.getDocument().getTextLength(), InlineDebugRenderer.class); inlays.forEach(Disposer::dispose); //noinspection unchecked return (List<Inlay>)inlays; } | clearInlaysInEditor |
296,654 | List<InlineDebugRenderer> (@NotNull Project project) { return StreamEx.of(FileEditorManager.getInstance(project).getAllEditors()) .select(TextEditor.class) .flatCollection(textEditor -> clearInlaysInEditor(textEditor.getEditor())) .map(Inlay::getRenderer) .select(InlineDebugRenderer.class) .toList(); } | clearInlaysInt |
296,655 | void () { TextAttributes attributes = LinePainter.getAttributes(myPosition.getLine(), myPosition.getFile(), mySession); SimpleColoredText valuePresentation = LinePainter.createPresentation(myValueNode); myPresentation = LinePainter .computeVariablePresentationWithChanges(myValueNode.getName(), valuePresentation, attributes, myPosition.getLine(), mySession.getProject()); } | updatePresentation |
296,656 | boolean () { return LinePainter.isFullLineHighlighter(mySession, myPosition.getFile(), myPosition.getLine(), false); } | isInExecutionPointHighlight |
296,657 | Font (@NotNull Editor editor) { EditorColorsScheme colorsScheme = editor.getColorsScheme(); TextAttributes attributes = editor.getColorsScheme().getAttributes(DebuggerColors.INLINED_VALUES_EXECUTION_LINE); int fontStyle = attributes == null ? Font.PLAIN : attributes.getFontType(); return UIUtil.getFontWithFallback(colorsScheme.getFont(EditorFontType.forJavaStyle(fontStyle))); } | getFont |
296,658 | void (Inlay inlay, @NotNull EditorMouseEvent event) { int x = event.getMouseEvent().getX(); boolean isRemoveIconClick = myCustomNode && x >= myRemoveXCoordinate; if (isRemoveIconClick) { XDebugSessionTab tab = ((XDebugSessionImpl)mySession).getSessionTab(); if (tab != null) { tab.getWatchesView().removeWatches(Collections.singletonList(myValueNode)); } inlay.update(); } else if (x >= myTextStartXCoordinate) { handleClick(inlay); } } | onClick |
296,659 | void (Inlay inlay) { InlineDebugRenderer inlayRenderer = (InlineDebugRenderer)inlay.getRenderer(); if (inlayRenderer.myPopupIsShown) { return; } Pair<XValue, String> descriptor = getXValueDescriptor(myValueNode); Rectangle bounds = inlay.getBounds(); Point point = new Point(bounds.x, bounds.y + bounds.height); inlayRenderer.myPopupIsShown = true; Runnable hidePopupRunnable = () -> { ApplicationManager.getApplication().invokeLater(() -> { inlayRenderer.myPopupIsShown = false; }); }; Editor editor = inlay.getEditor(); InlineValuePopupProvider popupProvider = InlineValuePopupProvider.EP_NAME.findFirstSafe(a -> a.accepts(myValueNode)); if (popupProvider != null) { popupProvider.showPopup(myValueNode, mySession, myPosition, myTreeCreator, editor, point, hidePopupRunnable); } else { XDebuggerTreeInlayPopup.showTreePopup(myTreeCreator, descriptor, myValueNode, editor, point, myPosition, mySession, hidePopupRunnable); } } | handleClick |
296,660 | void (@NotNull Inlay inlay) { setHovered(false, inlay); } | onMouseExit |
296,661 | void (@NotNull Inlay inlay, @NotNull EditorMouseEvent event) { setHovered(event.getMouseEvent().getX() >= myTextStartXCoordinate, inlay); } | onMouseMove |
296,662 | void (boolean active, @NotNull Inlay inlay) { boolean oldState = isHovered; isHovered = active; Cursor cursor = active ? Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) : null; ((EditorEx)inlay.getEditor()).setCustomCursor(InlineDebugRenderer.class, cursor); if (oldState != active) { inlay.update(); } } | setHovered |
296,663 | int (@NotNull Inlay inlay) { int width = getInlayTextWidth(inlay); width += myCustomNode ? AllIcons.Actions.Close.getIconWidth() : AllIcons.General.LinkDropTriangle.getIconWidth(); if (myCustomNode) { width += AllIcons.Debugger.Watch.getIconWidth(); } return width; } | calcWidthInPixels |
296,664 | int (@NotNull Inlay inlay) { Font font = getFont(inlay.getEditor()); String text; if (isErrorMessage()) { text = myPresentation.getTexts().get(0); } else { text = myPresentation.toString() + NAME_VALUE_SEPARATION; } return getFontMetrics(font, inlay.getEditor()).stringWidth(text + INDENT); } | getInlayTextWidth |
296,665 | FontMetrics (Font font, @NotNull Editor editor) { return FontInfo.getFontMetrics(font, FontInfo.getFontRenderContext(editor.getContentComponent())); } | getFontMetrics |
296,666 | int (Icon icon, Rectangle r) { return r.y + r.height / 2 - icon.getIconHeight() / 2; } | getIconY |
296,667 | void (@NotNull Inlay inlay, @NotNull Graphics g, @NotNull Rectangle r, @NotNull TextAttributes textAttributes) { EditorImpl editor = (EditorImpl)inlay.getEditor(); TextAttributes inlineAttributes = getAttributes(editor); if (inlineAttributes == null || inlineAttributes.getForegroundColor() == null) return; Font font = getFont(editor); g.setFont(font); FontMetrics metrics = getFontMetrics(font, editor); int gap = 1;//(r.height < fontMetrics.lineHeight + 2) ? 1 : 2; int margin = metrics.charWidth(' ') / 4; Color backgroundColor = inlineAttributes.getBackgroundColor(); int curX = r.x + metrics.charWidth(' '); if (backgroundColor != null) { GraphicsConfig config = GraphicsUtil.setupAAPainting(g); GraphicsUtil.paintWithAlpha(g, BACKGROUND_ALPHA); g.setColor(backgroundColor); g.fillRoundRect(curX + margin, r.y + gap, r.width - (2 * margin) - metrics.charWidth(' '), r.height - gap * 2, 6, 6); config.restore(); } curX += (2 * margin); if (myCustomNode) { Icon watchIcon = AllIcons.Debugger.Watch; watchIcon.paintIcon(inlay.getEditor().getComponent(), g, curX, getIconY(watchIcon, r)); curX += watchIcon.getIconWidth() + margin * 2; } myTextStartXCoordinate = curX; for (int i = 0; i < myPresentation.getTexts().size(); i++) { String curText = myPresentation.getTexts().get(i); if (i == 0 && !isErrorMessage()) { curText += NAME_VALUE_SEPARATION; } SimpleTextAttributes attr = myPresentation.getAttributes().get(i); Color fgColor = isHovered ? inlineAttributes.getForegroundColor() : attr.getFgColor(); g.setColor(fgColor); g.drawString(curText, curX, r.y + inlay.getEditor().getAscent()); curX += metrics.stringWidth(curText); if (isErrorMessage()) { break; } } if (isHovered) { Icon icon; if (myCustomNode) { icon = AllIcons.Actions.Close; myRemoveXCoordinate = curX; } else { icon = AllIcons.General.LinkDropTriangle; } icon.paintIcon(inlay.getEditor().getComponent(), g, curX, getIconY(icon, r)); } paintEffects(g, r, editor, inlineAttributes, font, metrics); } | paint |
296,668 | boolean () { return XDebuggerUIConstants.ERROR_MESSAGE_ICON.equals(myValueNode.getIcon()); } | isErrorMessage |
296,669 | void (@NotNull Graphics g, @NotNull Rectangle r, EditorImpl editor, TextAttributes inlineAttributes, Font font, FontMetrics metrics) { Color effectColor = inlineAttributes.getEffectColor(); EffectType effectType = inlineAttributes.getEffectType(); if (effectColor != null) { g.setColor(effectColor); Graphics2D g2d = (Graphics2D)g; int xStart = r.x; int xEnd = r.x + r.width; int y = r.y + metrics.getAscent(); if (effectType == EffectType.LINE_UNDERSCORE) { EffectPainter.LINE_UNDERSCORE.paint(g2d, xStart, y, xEnd - xStart, metrics.getDescent(), font); } else if (effectType == EffectType.BOLD_LINE_UNDERSCORE) { EffectPainter.BOLD_LINE_UNDERSCORE.paint(g2d, xStart, y, xEnd - xStart, metrics.getDescent(), font); } else if (effectType == EffectType.STRIKEOUT) { EffectPainter.STRIKE_THROUGH.paint(g2d, xStart, y, xEnd - xStart, editor.getCharHeight(), font); } else if (effectType == EffectType.WAVE_UNDERSCORE) { EffectPainter.WAVE_UNDERSCORE.paint(g2d, xStart, y, xEnd - xStart, metrics.getDescent(), font); } else if (effectType == EffectType.BOLD_DOTTED_LINE) { EffectPainter.BOLD_DOTTED_UNDERSCORE.paint(g2d, xStart, y, xEnd - xStart, metrics.getDescent(), font); } } } | paintEffects |
296,670 | TextAttributes (Editor editor) { TextAttributesKey key = isInExecutionPointHighlight() ? DebuggerColors.INLINED_VALUES_EXECUTION_LINE : DebuggerColors.INLINED_VALUES; EditorColorsScheme scheme = editor.getColorsScheme(); TextAttributes inlinedAttributes = scheme.getAttributes(key); if (isHovered) { TextAttributes hoveredInlineAttr = new TextAttributes(); hoveredInlineAttr.copyFrom(inlinedAttributes); Color hoveredAndSelectedColor = scheme.getAttributes(DebuggerColors.EXECUTIONPOINT_ATTRIBUTES).getForegroundColor(); Color foregroundColor = isInExecutionPointHighlight() ? hoveredAndSelectedColor : scheme.getAttributes(REFERENCE_HYPERLINK_COLOR).getForegroundColor(); if (foregroundColor == null) foregroundColor = scheme.getDefaultForeground(); hoveredInlineAttr.setForegroundColor(foregroundColor); return hoveredInlineAttr; } return inlinedAttributes; } | getAttributes |
296,671 | SimpleColoredText (String name, SimpleColoredText text, TextAttributes attributes, int lineNumber, Project project) { Map<Variable, VariableValue> oldValues = getOldValues(project); VariableText variableText = computeVariablePresentationWithChanges(name, text, attributes, lineNumber, oldValues); SimpleColoredText coloredText = new SimpleColoredText(); for (LineExtensionInfo info : variableText.infos) { TextAttributes textAttributes = new TextAttributes(info.getColor(), info.getBgColor(), info.getEffectColor(),info.getEffectType(), info.getFontType()); coloredText.append(info.getText(), SimpleTextAttributes.fromTextAttributes(textAttributes)); } return coloredText; } | computeVariablePresentationWithChanges |
296,672 | TextAttributes (int lineNumber, @NotNull VirtualFile file, XDebugSession session) { return isFullLineHighlighter(session, file, lineNumber, true) ? getTopFrameSelectedAttributes() : getNormalAttributes(); } | getAttributes |
296,673 | boolean (@NotNull XDebugSession session, @NotNull VirtualFile file, int lineNumber, boolean isToCheckTopFrameOnly) { Project project = session.getProject(); XDebuggerManagerImpl debuggerManager = (XDebuggerManagerImpl)XDebuggerManager.getInstance(project); XDebuggerExecutionPointManager executionPointManager = debuggerManager.getExecutionPointManager(); return executionPointManager.isFullLineHighlighterAt(file, lineNumber, project, isToCheckTopFrameOnly); } | isFullLineHighlighter |
296,674 | SimpleColoredText (@NotNull XValueNodeImpl value) { SimpleColoredText text = new SimpleColoredText(); XValueTextRendererImpl renderer = new XValueTextRendererImpl(text); final XValuePresentation presentation = value.getValuePresentation(); if (presentation == null) return null; try { if (presentation instanceof XValueCompactPresentation && !value.getTree().isUnderRemoteDebug()) { ((XValueCompactPresentation)presentation).renderValue(renderer, value); } else { presentation.renderValue(renderer); } if (StringUtil.isEmpty(text.toString())) { final String type = value.getValuePresentation().getType(); if (!StringUtil.isEmpty(type)) { text.append(type, SimpleTextAttributes.REGULAR_ATTRIBUTES); } } } catch (Exception e) { LOG.error(e); return null; } return text; } | createPresentation |
296,675 | TextAttributes () { TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.INLINED_VALUES); if (attributes == null || attributes.getForegroundColor() == null) { return new TextAttributes(JBColor.lazy(() -> EditorColorsManager.getInstance().isDarkEditor() ? new Color(0x3d8065) : Gray._135), null, null, null, Font.ITALIC); } return attributes; } | getNormalAttributes |
296,676 | TextAttributes () { TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.INLINED_VALUES_MODIFIED); if (attributes == null || attributes.getForegroundColor() == null) { return new TextAttributes(JBColor.lazy(() -> EditorColorsManager.getInstance().isDarkEditor() ? new Color(0xa1830a) : new Color(0xca8021)), null, null, null, Font.ITALIC); } return attributes; } | getChangedAttributes |
296,677 | TextAttributes () { TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.INLINED_VALUES_EXECUTION_LINE); if (attributes == null || attributes.getForegroundColor() == null) { //noinspection UseJBColor return new TextAttributes(EditorColorsManager.getInstance().isDarkEditor() ? new Color(255, 235, 9) : new Color(0, 255, 86), null, null, null, Font.ITALIC); } return attributes; } | getTopFrameSelectedAttributes |
296,678 | boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Variable variable = (Variable)o; if (lineNumber != variable.lineNumber) return false; if (!name.equals(variable.name)) return false; return true; } | equals |
296,679 | int () { return Objects.hash(lineNumber, name); } | hashCode |
296,680 | boolean () { return old != null && !StringUtil.equals(actual, old) && !isCollecting(actual); } | isChanged |
296,681 | boolean (@NotNull String text) { return text.contains(XDebuggerUIConstants.getCollectingDataMessage()); } | isCollecting |
296,682 | Couple<String> (@Nullable String s) { if (s == null) { return null; } return ContainerUtil.find(ARRAYS_WRAPPERS, w -> s.startsWith(w.first) && s.endsWith(w.second)); } | getArrayWrapper |
296,683 | Icon (@NotNull String path, int cacheKey, int flags) { return IconManager.getInstance().loadRasterizedIcon(path, PlatformDebuggerImplIcons.class.getClassLoader(), cacheKey, flags); } | load |
296,684 | XBreakpoint<MyBreakpointProperties> (XBreakpointManagerImpl breakpointManager, MyBreakpointProperties abc) { return breakpointManager.addBreakpoint(MY_SIMPLE_BREAKPOINT_TYPE, abc); } | addBreakpoint |
296,685 | XLineBreakpoint<MyBreakpointProperties> (XBreakpointManagerImpl breakpointManager, String url, int line, MyBreakpointProperties properties) { return breakpointManager.addLineBreakpoint(MY_LINE_BREAKPOINT_TYPE, url, line, properties); } | addLineBreakpoint |
296,686 | void (XBreakpointManagerImpl breakpointManager, XBreakpoint<?> breakpoint) { breakpointManager.removeBreakpoint(breakpoint); } | removeBreakPoint |
296,687 | MyBreakpointProperties (@NotNull final VirtualFile file, final int line) { return null; } | createBreakpointProperties |
296,688 | MyBreakpointProperties () { return new MyBreakpointProperties(); } | createProperties |
296,689 | String (final XBreakpoint<MyBreakpointProperties> breakpoint) { return ""; } | getDisplayText |
296,690 | MyBreakpointProperties () { return new MyBreakpointProperties(); } | createProperties |
296,691 | XBreakpoint<MyBreakpointProperties> (@NotNull XBreakpointCreator<MyBreakpointProperties> creator) { final XBreakpoint<MyBreakpointProperties> breakpoint = creator.createBreakpoint(new MyBreakpointProperties("default")); breakpoint.setEnabled(true); return breakpoint; } | createDefaultBreakpoint |
296,692 | MyBreakpointProperties () { return this; } | getState |
296,693 | void (@NotNull final MyBreakpointProperties state) { myOption = state.myOption; } | loadState |
296,694 | XBreakpointManager () { return XDebuggerManager.getInstance(myProject).getBreakpointManager(); } | getBreakpointManager |
296,695 | void (@Nullable Element element) { myBreakpointManager.loadState(element == null ? new BreakpointManagerState() : deserialize(element, BreakpointManagerState.class)); } | load |
296,696 | Element () { BreakpointManagerState state = new BreakpointManagerState(); myBreakpointManager.saveState(state); return serialize(state); } | save |
296,697 | void () { Set<XBreakpoint<MyBreakpointProperties>> defaultBreakpoints = myBreakpointManager.getDefaultBreakpoints(MY_SIMPLE_BREAKPOINT_TYPE); assertOneElement(defaultBreakpoints); XBreakpoint<MyBreakpointProperties> defaultBreakpoint = ContainerUtil.getOnlyItem(defaultBreakpoints); assertSameElements(getAllBreakpoints(), defaultBreakpoint); XLineBreakpoint<MyBreakpointProperties> lineBreakpoint = addLineBreakpoint(myBreakpointManager, "url", 239, new MyBreakpointProperties("123")); XBreakpoint<MyBreakpointProperties> breakpoint = addBreakpoint(myBreakpointManager, new MyBreakpointProperties("abc")); assertSameElements(getAllBreakpoints(), breakpoint, lineBreakpoint, defaultBreakpoint); assertSame(lineBreakpoint, assertOneElement(myBreakpointManager.getBreakpoints(MY_LINE_BREAKPOINT_TYPE))); assertSameElements(myBreakpointManager.getBreakpoints(MY_SIMPLE_BREAKPOINT_TYPE), breakpoint, defaultBreakpoint); removeBreakPoint(myBreakpointManager, lineBreakpoint); assertSameElements(getAllBreakpoints(), breakpoint, defaultBreakpoint); assertTrue(myBreakpointManager.getBreakpoints(MY_LINE_BREAKPOINT_TYPE).isEmpty()); assertSameElements(myBreakpointManager.getBreakpoints(MY_SIMPLE_BREAKPOINT_TYPE), breakpoint, defaultBreakpoint); removeBreakPoint(myBreakpointManager, breakpoint); assertSameElements(getAllBreakpoints(), defaultBreakpoint); assertSameElements(myBreakpointManager.getBreakpoints(MY_SIMPLE_BREAKPOINT_TYPE), defaultBreakpoint); } | testAddRemove |
296,698 | void () { XLineBreakpoint<MyBreakpointProperties> breakpoint = addLineBreakpoint(myBreakpointManager, "myurl", 239, new MyBreakpointProperties("z1")); breakpoint.setCondition("cond"); breakpoint.setLogExpression("log"); breakpoint.setSuspendPolicy(SuspendPolicy.NONE); breakpoint.setLogMessage(true); addBreakpoint(myBreakpointManager, new MyBreakpointProperties("z2")); reload(); List<XBreakpoint<?>> breakpoints = getAllBreakpoints(); assertEquals("Expected 3 breakpoints, actual: " + breakpoints, 3, breakpoints.size()); assertTrue(myBreakpointManager.isDefaultBreakpoint(breakpoints.get(0))); assertEquals("default", assertInstanceOf(breakpoints.get(0).getProperties(), MyBreakpointProperties.class).myOption); assertTrue(breakpoints.get(0).isEnabled()); XLineBreakpoint lineBreakpoint = assertInstanceOf(breakpoints.get(1), XLineBreakpoint.class); assertEquals(239, lineBreakpoint.getLine()); assertEquals("myurl", lineBreakpoint.getFileUrl()); assertEquals("z1", assertInstanceOf(lineBreakpoint.getProperties(), MyBreakpointProperties.class).myOption); assertEquals("cond", lineBreakpoint.getConditionExpression().getExpression()); assertEquals("log", lineBreakpoint.getLogExpressionObject().getExpression()); assertTrue(lineBreakpoint.isLogMessage()); assertEquals(SuspendPolicy.NONE, lineBreakpoint.getSuspendPolicy()); assertEquals("z2", assertInstanceOf(breakpoints.get(2).getProperties(), MyBreakpointProperties.class).myOption); assertEquals(SuspendPolicy.ALL, breakpoints.get(2).getSuspendPolicy()); assertFalse(breakpoints.get(2).isLogMessage()); } | testSerialize |
296,699 | void () { reload(); assertThat(getSingleBreakpoint().getProperties().myOption).isEqualTo("default"); Element element = save(); assertThat(element).isNull(); } | testDoNotSaveUnmodifiedDefaultBreakpoint |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.