• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RunnerContentUi类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中com.intellij.execution.ui.layout.impl.RunnerContentUi的典型用法代码示例。如果您正苦于以下问题:Java RunnerContentUi类的具体用法?Java RunnerContentUi怎么用?Java RunnerContentUi使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

RunnerContentUi类属于com.intellij.execution.ui.layout.impl包,在下文中一共展示了RunnerContentUi类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: showView

点赞 3

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
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);
        }
      }
    }
  }
}
 

开发者ID:consulo,
项目名称:consulo,
代码行数:23,
代码来源:XDebugSessionTab.java

示例2: addThreadDump

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
public static void addThreadDump(Project project, List<ThreadState> threads, final RunnerLayoutUi ui, DebuggerSession session) {
  final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
  consoleBuilder.filters(ExceptionFilters.getFilters(session.getSearchScope()));
  final ConsoleView consoleView = consoleBuilder.getConsole();
  final DefaultActionGroup toolbarActions = new DefaultActionGroup();
  consoleView.allowHeavyFilters();
  final ThreadDumpPanel panel = new ThreadDumpPanel(project, consoleView, toolbarActions, threads);

  final String id = THREAD_DUMP_CONTENT_PREFIX + " #" + myCurrentThreadDumpId;
  final Content content = ui.createContent(id, panel, id, null, null);
  content.putUserData(RunnerContentUi.LIGHTWEIGHT_CONTENT_MARKER, Boolean.TRUE);
  content.setCloseable(true);
  content.setDescription("Thread Dump");
  ui.addContent(content);
  ui.selectAndFocus(content, true, true);
  myThreadDumpsCount++;
  myCurrentThreadDumpId++;
  Disposer.register(content, new Disposable() {
    @Override
    public void dispose() {
      myThreadDumpsCount--;
      if (myThreadDumpsCount == 0) {
        myCurrentThreadDumpId = 1;
      }
    }
  });
  Disposer.register(content, consoleView);
  ui.selectAndFocus(content, true, false);
  if (threads.size() > 0) {
    panel.selectStackFrame(0);
  }
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:33,
代码来源:DebuggerUtilsEx.java

示例3: showWatchesTab

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
private static void showWatchesTab(@NotNull XDebugSessionImpl session) {
  XDebugSessionTab tab = session.getSessionTab();
  if (tab != null) {
    tab.toFront(false, null);
    // restore watches tab if minimized
    JComponent component = tab.getUi().getComponent();
    if (component instanceof DataProvider) {
      RunnerContentUi ui = RunnerContentUi.KEY.getData(((DataProvider)component));
      if (ui != null) {
        ui.restoreContent(DebuggerContentInfo.WATCHES_CONTENT);
      }
    }
  }
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:15,
代码来源:XWatchesViewImpl.java

示例4: restoreContent

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
private void restoreContent(String contentId) {
  JComponent component = myUi.getComponent();
  if (component instanceof DataProvider) {
    RunnerContentUi ui = ((DataProvider)component).getDataUnchecked(RunnerContentUi.KEY);
    if (ui != null) {
      ui.restoreContent(contentId);
    }
  }
}
 

开发者ID:consulo,
项目名称:consulo,
代码行数:10,
代码来源:XDebugSessionTab.java

示例5: addThreadDump

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
public static void addThreadDump(Project project, List<ThreadState> threads, final RunnerLayoutUi ui, DebuggerSession session)
{
	final TextConsoleBuilder consoleBuilder = TextConsoleBuilderFactory.getInstance().createBuilder(project);
	consoleBuilder.filters(ExceptionFilters.getFilters(session.getSearchScope()));
	final ConsoleView consoleView = consoleBuilder.getConsole();
	final DefaultActionGroup toolbarActions = new DefaultActionGroup();
	consoleView.allowHeavyFilters();
	final ThreadDumpPanel panel = new ThreadDumpPanel(project, consoleView, toolbarActions, threads);

	final String id = THREAD_DUMP_CONTENT_PREFIX + " #" + myCurrentThreadDumpId;
	final Content content = ui.createContent(id, panel, id, null, null);
	content.putUserData(RunnerContentUi.LIGHTWEIGHT_CONTENT_MARKER, Boolean.TRUE);
	content.setCloseable(true);
	content.setDescription("Thread Dump");
	ui.addContent(content);
	ui.selectAndFocus(content, true, true);
	myThreadDumpsCount++;
	myCurrentThreadDumpId++;
	Disposer.register(content, new Disposable()
	{
		@Override
		public void dispose()
		{
			myThreadDumpsCount--;
			if(myThreadDumpsCount == 0)
			{
				myCurrentThreadDumpId = 1;
			}
		}
	});
	Disposer.register(content, consoleView);
	ui.selectAndFocus(content, true, false);
	if(threads.size() > 0)
	{
		panel.selectStackFrame(0);
	}
}
 

开发者ID:consulo,
项目名称:consulo-java
代码行数:38,
代码来源:DebuggerUtilsEx.java

示例6: isSelected

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
@Override
public boolean isSelected(@NotNull AnActionEvent e) {
  RunnerContentUi ui = getRunnerUi(e);
  return ui != null && ui.isHorizontalToolbar();
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:6,
代码来源:ToggleToolbarLayoutAction.java

示例7: getRunnerUi

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
@Nullable
public static RunnerContentUi getRunnerUi(@NotNull AnActionEvent e) {
  return RunnerContentUi.KEY.getData(e.getDataContext());
}
 

开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:5,
代码来源:ToggleToolbarLayoutAction.java

示例8: createContentDescriptor

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
private static RunContentDescriptor createContentDescriptor(
    @Nullable final CloudDebugProcessState processState,
    @NotNull final ExecutionEnvironment environment)
    throws ExecutionException {

  final XDebugSession debugSession =
      XDebuggerManager.getInstance(environment.getProject())
          .startSession(
              environment,
              new XDebugProcessStarter() {
                @NotNull
                @Override
                public XDebugProcess start(@NotNull final XDebugSession session)
                    throws ExecutionException {

                  // Clear out the stash state which is queried on debug exit.
                  if (processState != null) {
                    ProjectRepositoryState.fromProcessState(processState).clearForNextSession();
                  }

                  CloudDebugProcessState state = processState;
                  CloudAttachDialog attachDialog =
                      new CloudAttachDialog(session.getProject(), null);
                  attachDialog.setInputState(state);
                  DialogManager.show(attachDialog);
                  state = attachDialog.getResultState();

                  ProjectRepositoryValidator validator = null;
                  if (state != null) {
                    validator = new ProjectRepositoryValidator(state);
                  }
                  if (!attachDialog.isOK() || state == null || !validator.isValidDebuggee()) {
                    throw new RunCanceledByUserException();
                  }

                  if (environment.getRunnerAndConfigurationSettings() != null
                      && environment.getRunnerAndConfigurationSettings().getConfiguration()
                          instanceof CloudDebugRunConfiguration) {
                    CloudDebugRunConfiguration config =
                        (CloudDebugRunConfiguration)
                            environment.getRunnerAndConfigurationSettings().getConfiguration();
                    // State is only stored in the run config between active sessions.
                    // Otherwise, the background watcher may hit a check during debug session
                    // startup.
                    config.setProcessState(null);
                  }

                  CloudDebugProcess process = new CloudDebugProcess(session);
                  process.initialize(state);
                  return process;
                }
              });

  RunnerLayoutUi ui = debugSession.getUI();
  if (ui instanceof DataProvider) {
    final RunnerContentUi contentUi =
        (RunnerContentUi) ((DataProvider) ui).getData(RunnerContentUi.KEY.getName());
    final Project project = debugSession.getProject();

    if (contentUi != null) {
      ApplicationManager.getApplication()
          .invokeLater(
              new Runnable() {
                @Override
                public void run() {
                  if (project.isOpen() && !project.isDisposed()) {
                    contentUi.restoreLayout();
                  }
                }
              });
    }
  }

  return debugSession.getRunContentDescriptor();
}
 

开发者ID:GoogleCloudPlatform,
项目名称:google-cloud-intellij,
代码行数:76,
代码来源:CloudDebuggerRunner.java

示例9: isSelected

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
@Override
public boolean isSelected(final AnActionEvent e) {
  final RunnerContentUi ui = getRunnerUi(e);
  return ui != null && ui.isHorizontalToolbar();
}
 

开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:6,
代码来源:ToggleToolbarLayoutAction.java

示例10: getRunnerUi

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
@Nullable
public static RunnerContentUi getRunnerUi(final AnActionEvent e) {
  return RunnerContentUi.KEY.getData(e.getDataContext());
}
 

开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:5,
代码来源:ToggleToolbarLayoutAction.java

示例11: getRunnerUi

点赞 2

import com.intellij.execution.ui.layout.impl.RunnerContentUi; //导入依赖的package包/类
@Nullable
public static RunnerContentUi getRunnerUi(final AnActionEvent e) {
  return e.getDataContext().getData(RunnerContentUi.KEY);
}
 

开发者ID:consulo,
项目名称:consulo,
代码行数:5,
代码来源:ToggleToolbarLayoutAction.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)