Java Code Examples for com.intellij.xdebugger.impl.XDebugSessionImpl#getSessionTab()

The following examples show how to use com.intellij.xdebugger.impl.XDebugSessionImpl#getSessionTab() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XDebugSessionTab.java    From consulo with Apache License 2.0 6 votes vote down vote up
private static void showView(@Nonnull XDebugSessionImpl session, String viewId) {
  XDebugSessionTab tab = session.getSessionTab();
  if (tab != null) {
    tab.toFront(false, null);
    // restore watches tab if minimized
    tab.restoreContent(viewId);

    JComponent component = tab.getUi().getComponent();
    if (component instanceof DataProvider) {
      RunnerContentUi ui = ((DataProvider)component).getDataUnchecked(RunnerContentUi.KEY);
      if (ui != null) {
        Content content = ui.findContent(viewId);

        // if the view is not visible (e.g. Console tab is selected, while Debugger tab is not)
        // make sure we make it visible to the user
        if (content != null) {
          ui.select(content, false);
        }
      }
    }
  }
}
 
Example 2
Source File: XDebugSessionTab.java    From consulo with Apache License 2.0 4 votes vote down vote up
public static void showWatchesView(@Nonnull XDebugSessionImpl session) {
  XDebugSessionTab tab = session.getSessionTab();
  if (tab != null) {
    showView(session, tab.getWatchesContentId());
  }
}