Unnamed: 0
int64
0
305k
body
stringlengths
7
52.9k
name
stringlengths
1
185
295,700
String (PsiFile file, int[] startOffsets, int[] endOffsets, String text) { return null; }
preprocessOnCopy
295,701
String (Project project, PsiFile file, Editor editor, String text, RawText rawText) { if (editor.getUserData(REMOVE_NEWLINES_ON_PASTE) != null) { return StringUtil.convertLineSeparators(text, " "); } return text; }
preprocessOnPaste
295,702
boolean (@NotNull Editor editor, @NotNull Project project) { return false; }
requiresAllDocumentsToBeCommitted
295,703
JPanel () { return myMainPanel; }
getMainPanel
295,704
void () { AnAction action = ActionManager.getInstance().getAction(XDebuggerActions.VIEW_BREAKPOINTS); String shortcutText = action != null ? KeymapUtil.getFirstKeyboardShortcutText(action) : null; String text = XDebuggerBundle.message("xbreakpoints.popup.more.label"); if (shortcutText != null) { text += " (" + shortcutText + ")"; } myShowMoreOptionsLink = new ActionLink(text, e -> { if (myDelegate != null) { myDelegate.more(); } }); }
createUIComponents
295,705
void (boolean b) { myShowMoreOptionsLink.setVisible(b); }
setShowMoreOptionsLink
295,706
void (ActionEvent actionEvent) { done(); }
actionPerformed
295,707
void (@NotNull AnActionEvent e) { super.update(e); Project project = getEventProject(e); Editor editor = e.getData(CommonDataKeys.EDITOR); boolean disabled = project != null && (LookupManager.getInstance(project).getActiveLookup() != null || (editor != null && TemplateManager.getInstance(project).getActiveTemplate(editor) != null)); final Component owner = IdeFocusManager.findInstance().getFocusOwner(); if (owner != null) { final JComboBox comboBox = ComponentUtil.getParentOfType((Class<? extends JComboBox>)JComboBox.class, owner); if (comboBox != null && comboBox.isPopupVisible()) { disabled = true; } } e.getPresentation().setEnabled(!disabled && (editor == null || StringUtil.isEmpty(editor.getSelectionModel().getSelectedText())) ); }
update
295,708
ActionUpdateThread () { return ActionUpdateThread.EDT; }
getActionUpdateThread
295,709
void (@NotNull AnActionEvent e) { done(); }
actionPerformed
295,710
void () { if (myDelegate != null) { myDelegate.done(); } }
done
295,711
void (JComponent p) { myPropertiesPlaceholder.removeAll(); myPropertiesPlaceholder.add(p, BorderLayout.CENTER); }
setPropertiesPanel
295,712
void (Delegate d) { myDelegate = d; }
setDelegate
295,713
EditorEx () { final EditorEx editor = super.createEditor(); editor.setHorizontalScrollbarVisible(multiline); editor.setVerticalScrollbarVisible(multiline); editor.getSettings().setUseSoftWraps(isUseSoftWraps()); editor.getSettings().setLineCursorWidth(EditorUtil.getDefaultCaretWidth()); editor.getColorsScheme().setEditorFontName(getFont().getFontName()); editor.getColorsScheme().setEditorFontSize(getFont().getSize()); prepareEditor(editor); if (multiline) { editor.getContentComponent().setBorder(new CompoundBorder(editor.getContentComponent().getBorder(), JBUI.Borders.emptyLeft(2))); editor.setContextMenuGroupId("XDebugger.Evaluate.Code.Fragment.Editor.Popup"); } else { foldNewLines(editor); if (showEditor) { setExpandable(editor); } } return editor; }
createEditor
295,714
Object (@NotNull String dataId) { if (LangDataKeys.CONTEXT_LANGUAGES.is(dataId)) { return new Language[]{myExpression.getLanguage()}; } else if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { return (DataProvider)slowId -> getSlowData(slowId); } return super.getData(dataId); }
getData
295,715
JComponent () { return myComponent; }
getComponent
295,716
JComponent () { return myEditorTextField; }
getEditorComponent
295,717
void (XExpression text) { myExpression = text; myEditorTextField.setNewDocumentAndFileType(getFileType(text), createDocument(text)); }
doSetText
295,718
XExpression () { return getEditorsProvider().createExpression(getProject(), myEditorTextField.getDocument(), myExpression.getLanguage(), myExpression.getMode()); }
getExpression
295,719
JComponent () { final Editor editor = myEditorTextField.getEditor(); return editor != null ? editor.getContentComponent() : null; }
getPreferredFocusedComponent
295,720
void (boolean enable) { if (enable == myComponent.isEnabled()) return; UIUtil.setEnabled(myComponent, enable, true); }
setEnabled
295,721
Editor () { return myEditorTextField.getEditor(); }
getEditor
295,722
void () { myEditorTextField.selectAll(); }
selectAll
295,723
String () { return XDebuggerBundle.message("xdebugger.colors.page.name"); }
getDisplayName
295,724
Icon () { return AllIcons.Actions.StartDebugger; }
getIcon
295,725
SyntaxHighlighter () { return new PlainSyntaxHighlighter(); }
getHighlighter
295,726
String () { return " "; }
getDemoText
295,727
DisplayPriority () { return DisplayPriority.COMMON_SETTINGS; }
getPriority
295,728
void (ComboBoxUI ui) { BorderlessCombBoxUI newUI = new BorderlessCombBoxUI(); if (myEmbeddedComponent != null) { newUI.setEmbeddedComponent(myEmbeddedComponent); } super.setUI(newUI); }
setUI
295,729
void (JComponent component) { getUI().setEmbeddedComponent(myEmbeddedComponent = component); }
setExtension
295,730
EmbeddedComboBoxUI () { return (EmbeddedComboBoxUI)ui; }
getUI
295,731
void (Component c, Graphics g, int x, int y, int width, int height) { Graphics2D g2 = (Graphics2D)g.create(); try { DarculaUIUtil.paintCellEditorBorder(g2, c, new Rectangle(x, y, width, height), hasFocus(c)); } finally { g2.dispose(); } }
paintBorder
295,732
Insets (Component c) { return JBUI.insets(2); }
getBorderInsets
295,733
RectangularShape (Rectangle r, float bw, float arc) { return r; }
getOuterShape
295,734
void (@NotNull JComponent panel) { myPanel.setContent(panel); }
setEmbeddedComponent
295,735
void () { super.installDefaults(); // there's no 'ComboBox.padding' option in the tests, // because they don't use DarculaLaF if (padding == null) { padding = JBInsets.emptyInsets(); } }
installDefaults
295,736
void () { super.installComponents(); comboBox.add(myPanel); }
installComponents
295,737
LayoutManager () { return new ComboBoxLayoutManager() { final LayoutManager lm = EmbeddedComboBoxUI.super.createLayoutManager(); @Override public void layoutContainer(Container parent) { lm.layoutContainer(parent); JComboBox cb = (JComboBox)parent; Dimension aps = arrowButton.getPreferredSize(); Dimension pps = myPanel.getPreferredSize(); int availableWidth = cb.getWidth() - aps.width; if (comboBox.getComponentOrientation().isLeftToRight()) { myPanel.setBounds( Math.max(availableWidth - pps.width, 0), (cb.getHeight() - pps.height) / 2, Math.min(pps.width, availableWidth), pps.height ); } else { myPanel.setBounds( arrowButton.getWidth(), (cb.getHeight() - pps.height) / 2, Math.min(pps.width, availableWidth), pps.height ); } } }; }
createLayoutManager
295,738
void (Container parent) { lm.layoutContainer(parent); JComboBox cb = (JComboBox)parent; Dimension aps = arrowButton.getPreferredSize(); Dimension pps = myPanel.getPreferredSize(); int availableWidth = cb.getWidth() - aps.width; if (comboBox.getComponentOrientation().isLeftToRight()) { myPanel.setBounds( Math.max(availableWidth - pps.width, 0), (cb.getHeight() - pps.height) / 2, Math.min(pps.width, availableWidth), pps.height ); } else { myPanel.setBounds( arrowButton.getWidth(), (cb.getHeight() - pps.height) / 2, Math.min(pps.width, availableWidth), pps.height ); } }
layoutContainer
295,739
Rectangle () { Rectangle rectangle = super.rectangleForCurrentValue(); rectangle.width -= myPanel.getWidth(); if (!comboBox.getComponentOrientation().isLeftToRight()) { rectangle.x += arrowButton.getWidth() + myPanel.getWidth(); } return rectangle; }
rectangleForCurrentValue
295,740
void (@NotNull XSourcePosition position, boolean notTopFrame, @Nullable GutterIconRenderer gutterIconRenderer) { show(position, notTopFrame, gutterIconRenderer, true); }
show
295,741
void (@NotNull XSourcePosition position, boolean notTopFrame, @Nullable GutterIconRenderer gutterIconRenderer, boolean navigate) { updateRequested.set(false); AppUIExecutor .onWriteThread(ModalityState.nonModal()) .expireWith(myProject) .submit(() -> { updateRequested.set(false); mySourcePosition = position; clearDescriptor(); myOpenFileDescriptor = createOpenFileDescriptor(myProject, position); myOpenFileDescriptor.setUsePreviewTab(true); if (!XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().isScrollToCenter()) { myOpenFileDescriptor.setScrollType(notTopFrame ? ScrollType.CENTER : ScrollType.MAKE_VISIBLE); } //see IDEA-125645 and IDEA-63459 //myOpenFileDescriptor.setUseCurrentWindow(true); myGutterIconRenderer = gutterIconRenderer; myNotTopFrame = notTopFrame; }).thenAsync(ignored -> AppUIExecutor .onUiThread() .expireWith(myProject) .submit(() -> doShow(navigate))); }
show
295,742
void () { AppUIUtil.invokeOnEdt(() -> { updateRequested.set(false); removeHighlighter(); clearDescriptor(); myEditor = null; myGutterIconRenderer = null; }); }
hide
295,743
void () { if (myOpenFileDescriptor != null) { myOpenFileDescriptor.dispose(); myOpenFileDescriptor = null; } }
clearDescriptor
295,744
void () { if (myOpenFileDescriptor != null && myOpenFileDescriptor.getFile().isValid()) { myOpenFileDescriptor.navigateInEditor(myProject, true); } }
navigateTo
295,745
VirtualFile () { return myOpenFileDescriptor != null ? myOpenFileDescriptor.getFile() : null; }
getCurrentFile
295,746
void (final boolean navigate) { if (updateRequested.compareAndSet(false, true)) { ApplicationManager.getApplication().invokeLater(() -> { if (updateRequested.compareAndSet(true, false)) { doShow(navigate); } }, myProject.getDisposed()); } }
update
295,747
void (@Nullable final GutterIconRenderer renderer) { AppUIUtil.invokeOnEdt(() -> { if (myRangeHighlighter != null && myGutterIconRenderer != null) { myRangeHighlighter.setGutterIconRenderer(renderer); } }); }
updateGutterIcon
295,748
void (boolean navigate) { ThreadingAssertions.assertEventDispatchThread(); if (ApplicationManager.getApplication().isUnitTestMode()) return; removeHighlighter(); myEditor = null; if (myOpenFileDescriptor != null) { if (!navigate) { FileEditor editor = FileEditorManager.getInstance(myProject).getSelectedEditor(myOpenFileDescriptor.getFile()); if (editor instanceof TextEditor) { myEditor = ((TextEditor)editor).getEditor(); } } else { myEditor = XDebuggerUtil.getInstance().openTextEditor(myOpenFileDescriptor); } } if (myEditor != null) { addHighlighter(); } }
doShow
295,749
void () { if (myEditor != null) { disableMouseHoverPopups(myEditor, false); } //if (myNotTopFrame && myEditor != null) { // myEditor.getSelectionModel().removeSelection(); //} if (myRangeHighlighter != null) { myRangeHighlighter.dispose(); myRangeHighlighter = null; } }
removeHighlighter
295,750
void () { disableMouseHoverPopups(myEditor, true); int line = mySourcePosition.getLine(); Document document = myEditor.getDocument(); if (line < 0 || line >= document.getLineCount()) return; //if (myNotTopFrame) { // myEditor.getSelectionModel().setSelection(document.getLineStartOffset(line), document.getLineEndOffset(line) + document.getLineSeparatorLength(line)); // return; //} if (myRangeHighlighter != null) return; TextAttributesKey attributesKey = myNotTopFrame ? DebuggerColors.NOT_TOP_FRAME_ATTRIBUTES : DebuggerColors.EXECUTIONPOINT_ATTRIBUTES; MarkupModel markupModel = DocumentMarkupModel.forDocument(document, myProject, true); if (mySourcePosition instanceof HighlighterProvider highlighterProvider) { TextRange range = highlighterProvider.getHighlightRange(); if (range != null) { myRangeHighlighter = markupModel .addRangeHighlighter(attributesKey, range.getStartOffset(), range.getEndOffset(), DebuggerColors.EXECUTION_LINE_HIGHLIGHTERLAYER, HighlighterTargetArea.EXACT_RANGE); } } if (myRangeHighlighter == null) { myRangeHighlighter = markupModel.addLineHighlighter(attributesKey, line, DebuggerColors.EXECUTION_LINE_HIGHLIGHTERLAYER); } myRangeHighlighter.putUserData(EXECUTION_POINT_HIGHLIGHTER_TOP_FRAME_KEY, !myNotTopFrame); myRangeHighlighter.setEditorFilter(editor -> editor.getEditorKind() == EditorKind.MAIN_EDITOR); myRangeHighlighter.setGutterIconRenderer(myGutterIconRenderer); }
addHighlighter
295,751
boolean () { ThreadingAssertions.assertEventDispatchThread(); return myRangeHighlighter != null && myRangeHighlighter.getTargetArea() == HighlighterTargetArea.LINES_IN_RANGE; }
isFullLineHighlighter
295,752
void (@NotNull final Editor editor, final boolean disable) { Project project = editor.getProject(); if (ApplicationManager.getApplication().isUnitTestMode() || project == null) return; // need to always invoke later to maintain order of enabling/disabling SwingUtilities.invokeLater(() -> { if (disable) { EditorMouseHoverPopupControl.disablePopups(project); } else { EditorMouseHoverPopupControl.enablePopups(project); } }); }
disableMouseHoverPopups
295,753
OpenFileDescriptor (@NotNull Project project, @NotNull XSourcePosition position) { Navigatable navigatable = position.createNavigatable(project); if (navigatable instanceof OpenFileDescriptor) { return (OpenFileDescriptor)navigatable; } else { return XDebuggerUtilImpl.createOpenFileDescriptor(project, position); } }
createOpenFileDescriptor
295,754
XDebugSessionTab (@NotNull XDebugSessionImpl session, @Nullable Icon icon, @Nullable ExecutionEnvironment environment, @Nullable RunContentDescriptor contentToReuse) { if (contentToReuse != null && SystemProperties.getBooleanProperty("xdebugger.reuse.session.tab", false)) { JComponent component = contentToReuse.getComponent(); if (component != null) { XDebugSessionTab oldTab = TAB_KEY.getData(DataManager.getInstance().getDataContext(component)); if (oldTab != null) { oldTab.setSession(session, environment, icon); oldTab.attachToSession(session); return oldTab; } } } XDebugSessionTab tab; if (UIExperiment.isNewDebuggerUIEnabled() || XDebugSessionTabCustomizerKt.forceShowNewDebuggerUi(session.getDebugProcess())) { if (XDebugSessionTabCustomizerKt.allowFramesViewCustomization(session.getDebugProcess())) { tab = new XDebugSessionTab3(session, icon, environment); } else { tab = new XDebugSessionTabNewUI(session, icon, environment); } } else { tab = new XDebugSessionTab(session, icon, environment, true); } tab.init(session); tab.myRunContentDescriptor.setActivateToolWindowWhenAdded(contentToReuse == null || contentToReuse.isActivateToolWindowWhenAdded()); return tab; }
create
295,755
RunnerLayoutUi () { return myUi; }
getUi
295,756
void (XDebugSessionImpl session) { initDebuggerTab(session); initFocusingVariablesFromFramesView(); attachToSession(session); DefaultActionGroup focus = new DefaultActionGroup(); focus.add(ActionManager.getInstance().getAction(XDebuggerActions.FOCUS_ON_BREAKPOINT)); focus.add(ActionManager.getInstance().getAction(XDebuggerActions.FOCUS_ON_FINISH)); myUi.getOptions().setAdditionalFocusActions(focus).setMinimizeActionEnabled(true).setMoveToGridActionEnabled(true); initListeners(myUi); rebuildViews(); }
init
295,757
void () { XFramesView framesView = getView(DebuggerContentInfo.FRAME_CONTENT, XFramesView.class); XVariablesViewBase variablesView = getView(DebuggerContentInfo.VARIABLES_CONTENT, XVariablesViewBase.class); if (framesView == null || variablesView == null) return; framesView.onFrameSelectionKeyPressed(frame -> { Content content = findOrRestoreContentIfNeeded(DebuggerContentInfo.VARIABLES_CONTENT); if (content == null) return; getUi().selectAndFocus(content, true, true).doWhenDone(() -> { // Don't ruin an old selection from the saved tree state (if any) while it's being restored. // Most of the time restoring the selection is fast enough. But even if it's not, // the variables view is focused instantly, so the user can still use the arrow keys // for navigating through the variables loaded so far. The tree restorer, in turn, // is careful enough to not reset the selection if the user happened to change it already. variablesView.onReady().whenComplete((node, throwable) -> { if (node != null && node.getTree().isSelectionEmpty()) { node.getTree().setSelectionRow(0); } }); }); }); }
initFocusingVariablesFromFramesView
295,758
void (XDebugSessionImpl session) { createDefaultTabs(session); CustomActionsListener.subscribe(this, () -> initToolbars(session)); }
initDebuggerTab
295,759
void (XDebugSessionImpl session) { Content framesContent = createFramesContent(); myUi.addContent(framesContent, 0, PlaceInGrid.left, false); if (Registry.is("debugger.new.threads.view")) { myUi.addContent(createThreadsContent(), 0, PlaceInGrid.right, true); } addVariablesAndWatches(session); }
createDefaultTabs
295,760
void (RunnerLayoutUi ui) { ui.addListener(new ContentManagerListener() { @Override public void selectionChanged(@NotNull ContentManagerEvent event) { Content content = event.getContent(); if (mySession != null && content.isSelected() && getWatchesContentId().equals(ViewImpl.ID.get(content))) { computeWatches(); } } }, myRunContentDescriptor); }
initListeners
295,761
void (@NotNull ContentManagerEvent event) { Content content = event.getContent(); if (mySession != null && content.isSelected() && getWatchesContentId().equals(ViewImpl.ID.get(content))) { computeWatches(); } }
selectionChanged
295,762
void (@NotNull XDebugSessionImpl session) { myUi.addContent(createVariablesContent(session), 0, PlaceInGrid.center, false); if (!myWatchesInVariables) { myUi.addContent(createWatchesContent(session, null), 0, PlaceInGrid.right, false); } }
addVariablesAndWatches
295,763
void (@NotNull XDebugSessionImpl session, @Nullable ExecutionEnvironment environment, @Nullable Icon icon) { myEnvironment = environment; mySession = session; mySessionData = session.getSessionData(); myConsole = session.getConsoleView(); AnAction[] restartActions; List<AnAction> restartActionsList = session.getRestartActions(); if (restartActionsList.isEmpty()) { restartActions = AnAction.EMPTY_ARRAY; } else { restartActions = restartActionsList.toArray(AnAction.EMPTY_ARRAY); } myRunContentDescriptor = new RunContentDescriptor(myConsole, session.getDebugProcess().getProcessHandler(), myUi.getComponent(), session.getSessionName(), icon, this::computeWatches, restartActions); myRunContentDescriptor.setRunnerLayoutUi(myUi); Disposer.register(myRunContentDescriptor, this); Disposer.register(myProject, myRunContentDescriptor); }
setSession
295,764
Object (@NotNull @NonNls String dataId) { if (XWatchesView.DATA_KEY.is(dataId)) { return myWatchesView; } else if (TAB_KEY.is(dataId)) { return this; } else if (XDebugSessionData.DATA_KEY.is(dataId)) { return mySessionData; } if (mySession != null) { if (XDebugSession.DATA_KEY.is(dataId)) { return mySession; } else if (LangDataKeys.CONSOLE_VIEW.is(dataId)) { return mySession.getConsoleView(); } } return super.getData(dataId); }
getData
295,765
Content (@NotNull XDebugSessionImpl session) { XVariablesView variablesView; if (myWatchesInVariables) { variablesView = myWatchesView = new XWatchesViewImpl(session, myWatchesInVariables, false, false); } else { variablesView = new XVariablesView(session); } registerView(DebuggerContentInfo.VARIABLES_CONTENT, variablesView); Content result = myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(), XDebuggerBundle.message("debugger.session.tab.variables.title"), null, variablesView.getDefaultFocusedComponent()); result.setCloseable(false); ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP); result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree()); return result; }
createVariablesContent
295,766
Content (@NotNull XDebugSessionImpl session, @Nullable XWatchesViewImpl watchesView) { myWatchesView = watchesView != null ? watchesView : new XWatchesViewImpl(session, myWatchesInVariables); registerView(DebuggerContentInfo.WATCHES_CONTENT, myWatchesView); Content watchesContent = myUi.createContent(DebuggerContentInfo.WATCHES_CONTENT, myWatchesView.getPanel(), XDebuggerBundle.message("debugger.session.tab.watches.title"), null, myWatchesView.getDefaultFocusedComponent()); watchesContent.setCloseable(false); return watchesContent; }
createWatchesContent
295,767
Content () { XFramesView framesView = new XFramesView(mySession); registerView(DebuggerContentInfo.FRAME_CONTENT, framesView); Content framesContent = myUi.createContent(DebuggerContentInfo.FRAME_CONTENT, framesView.getMainPanel(), XDebuggerBundle.message("debugger.session.tab.frames.title"), null, framesView.getDefaultFocusedComponent()); framesContent.setCloseable(false); return framesContent; }
createFramesContent
295,768
Content () { XThreadsView stacksView = new XThreadsView(myProject, mySession); registerView(DebuggerContentInfo.THREADS_CONTENT, stacksView); Content framesContent = myUi.createContent(DebuggerContentInfo.THREADS_CONTENT, stacksView.getPanel(), XDebuggerBundle.message("debugger.session.tab.threads.title"), null, stacksView.getDefaultFocusedComponent()); framesContent.setCloseable(false); return framesContent; }
createThreadsContent
295,769
void () { AppUIUtil.invokeLaterIfProjectAlive(myProject, () -> { if (mySession != null) { mySession.rebuildViews(); } }); }
rebuildViews
295,770
XWatchesView () { return myWatchesView; }
getWatchesView
295,771
void (@NotNull XDebugSessionImpl session) { for (XDebugView view : myViews.values()) { attachViewToSession(session, view); } XDebugTabLayouter layouter = session.getDebugProcess().createTabLayouter(); Content consoleContent = layouter.registerConsoleContent(myUi, myConsole); attachNotificationTo(consoleContent); layouter.registerAdditionalContent(myUi); RunContentBuilder.addAdditionalConsoleEditorActions(myConsole, consoleContent); if (ApplicationManager.getApplication().isUnitTestMode()) { return; } consoleContent.setHelpId(DefaultDebugExecutor.getDebugExecutorInstance().getHelpId()); initToolbars(session); if (myEnvironment != null) { initLogConsoles(myEnvironment.getRunProfile(), myRunContentDescriptor, myConsole); } }
attachToSession
295,772
void (@NotNull XDebugSessionImpl session) { ActionGroup leftGroup = getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_LEFT_TOOLBAR_GROUP); DefaultActionGroup leftToolbar = new DefaultActionGroupWithDelegate(leftGroup); if (myEnvironment != null) { leftToolbar.add(ActionManager.getInstance().getAction(IdeActions.ACTION_RERUN)); leftToolbar.addAll(session.getRestartActions()); leftToolbar.add(new CreateAction(AllIcons.General.Settings)); leftToolbar.addSeparator(); leftToolbar.addAll(session.getExtraActions()); } leftToolbar.addAll(leftGroup); for (AnAction action : session.getExtraStopActions()) { leftToolbar.add(action, new Constraints(Anchor.AFTER, IdeActions.ACTION_STOP_PROGRAM)); } //group.addSeparator(); //addAction(group, DebuggerActions.EXPORT_THREADS); leftToolbar.addSeparator(); leftToolbar.add(myUi.getOptions().getLayoutActions()); final AnAction[] commonSettings = myUi.getOptions().getSettingsActionsList(); DefaultActionGroup settings = DefaultActionGroup.createPopupGroup(ActionsBundle.messagePointer("group.XDebugger.settings.text")); settings.getTemplatePresentation().setIcon(myUi.getOptions().getSettingsActions().getTemplatePresentation().getIcon()); settings.addAll(commonSettings); leftToolbar.add(settings); leftToolbar.addSeparator(); leftToolbar.add(PinToolwindowTabAction.getPinAction()); ActionGroup topGroup = getCustomizedActionGroup(XDebuggerActions.TOOL_WINDOW_TOP_TOOLBAR_GROUP); DefaultActionGroup topLeftToolbar = new DefaultActionGroupWithDelegate(topGroup); topLeftToolbar.addAll(topGroup); registerAdditionalActions(leftToolbar, topLeftToolbar, settings); myUi.getOptions().setLeftToolbar(leftToolbar, ActionPlaces.DEBUGGER_TOOLBAR); myUi.getOptions().setTopLeftToolbar(topLeftToolbar, ActionPlaces.DEBUGGER_TOOLBAR); }
initToolbars
295,773
void (DefaultActionGroup leftToolbar, DefaultActionGroup topLeftToolbar, DefaultActionGroup settings) { if (mySession != null) { mySession.getDebugProcess().registerAdditionalActions(leftToolbar, topLeftToolbar, settings); } }
registerAdditionalActions
295,774
void (@NotNull XDebugSessionImpl session, @Nullable XDebugView view) { if (view != null) { XDebugViewSessionListener.attach(view, session); } }
attachViewToSession
295,775
void () { assert mySession != null; mySession = null; }
detachFromSession
295,776
RunContentDescriptor () { return myRunContentDescriptor; }
getRunContentDescriptor
295,777
boolean () { return myWatchesInVariables; }
isWatchesInVariables
295,778
void (boolean watchesInVariables) { if (myWatchesInVariables != watchesInVariables) { myWatchesInVariables = watchesInVariables; Registry.get("debugger.watches.in.variables").setValue(watchesInVariables); if (mySession != null) { setWatchesInVariablesImpl(); } } }
setWatchesInVariables
295,779
void () { if (mySession == null) return; removeContent(DebuggerContentInfo.VARIABLES_CONTENT); removeContent(DebuggerContentInfo.WATCHES_CONTENT); addVariablesAndWatches(mySession); attachViewToSession(mySession, myViews.get(DebuggerContentInfo.VARIABLES_CONTENT)); attachViewToSession(mySession, myViews.get(DebuggerContentInfo.WATCHES_CONTENT)); myUi.selectAndFocus(myUi.findContent(DebuggerContentInfo.VARIABLES_CONTENT), true, false); rebuildViews(); }
setWatchesInVariablesImpl
295,780
void (@NotNull XDebugSessionImpl session) { XDebugSessionTab tab = session.getSessionTab(); if (tab != null) { showView(session, tab.getWatchesContentId()); } }
showWatchesView
295,781
void (@Nullable XDebugSessionImpl session) { XDebugSessionTab tab = session != null ? session.getSessionTab() : null; if (tab != null) { showView(session, tab.getFramesContentId()); } }
showFramesView
295,782
void (@Nullable XDebugSessionImpl session, String viewId) { XDebugSessionTab tab = session != null ? session.getSessionTab() : null; if (tab != null) { tab.toFront(false, null); Content content = tab.findOrRestoreContentIfNeeded(viewId); // make sure we make it visible to the user if (content != null) { tab.myUi.selectAndFocus(content, false, false); } } }
showView
295,783
void (boolean focus, @Nullable final Runnable onShowCallback) { if (ApplicationManager.getApplication().isUnitTestMode()) return; ApplicationManager.getApplication().invokeLater(() -> { if (myRunContentDescriptor != null) { RunContentManager manager = RunContentManager.getInstance(myProject); ToolWindow toolWindow = manager.getToolWindowByDescriptor(myRunContentDescriptor); if (toolWindow != null) { if (!toolWindow.isVisible()) { toolWindow.show(() -> { if (onShowCallback != null) { onShowCallback.run(); } computeWatches(); }); } manager.selectRunContent(myRunContentDescriptor); } } }); if (focus) { ApplicationManager.getApplication().invokeLater(() -> { boolean stealFocus = Registry.is("debugger.mayBringFrameToFrontOnBreakpoint"); ProjectUtil.focusProjectWindow(myProject, stealFocus); }); } }
toFront
295,784
void () { if (myWatchesView != null) { myWatchesView.computeWatches(); } }
computeWatches
295,785
String () { return myWatchesInVariables ? DebuggerContentInfo.VARIABLES_CONTENT : DebuggerContentInfo.WATCHES_CONTENT; }
getWatchesContentId
295,786
String () { return DebuggerContentInfo.FRAME_CONTENT; }
getFramesContentId
295,787
void (String contentId, @NotNull XDebugView view) { myViews.put(contentId, view); Disposer.register(myRunContentDescriptor, view); }
registerView
295,788
void (String contentId) { myUi.removeContent(findOrRestoreContentIfNeeded(contentId), true); unregisterView(contentId); }
removeContent
295,789
void (String contentId) { XDebugView view = myViews.remove(contentId); if (view != null) { Disposer.dispose(view); } }
unregisterView
295,790
void (@NotNull List<XExpression> watchExpressions) { myWatchExpressions = watchExpressions; }
setWatchExpressions
295,791
List<XExpression> () { return myWatchExpressions; }
getWatchExpressions
295,792
boolean () { return myBreakpointsMuted; }
isBreakpointsMuted
295,793
void (boolean breakpointsMuted) { myBreakpointsMuted = breakpointsMuted; }
setBreakpointsMuted
295,794
String () { return myConfigurationName; }
getConfigurationName
295,795
ComboBox<XExpression> (CollectionComboBoxModel<XExpression> model, int width) { return new ComboBox<>(model, width); }
createComboBox
295,796
ComboBox () { return myComboBox; }
getComboBox
295,797
JComponent () { return myComponent; }
getComponent
295,798
Editor () { return myEditor.getEditorTextField().getEditor(true); }
getEditor
295,799
JComponent () { return myEditor.getEditorTextField(); }
getEditorComponent