本文整理汇总了Java中com.intellij.execution.ui.RunContentManager类的典型用法代码示例。如果您正苦于以下问题:Java RunContentManager类的具体用法?Java RunContentManager怎么用?Java RunContentManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RunContentManager类属于com.intellij.execution.ui包,在下文中一共展示了RunContentManager类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: connectToMessageBus
点赞 3
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
private void connectToMessageBus(Project project) {
logger.info("Connecting to message bus.");
MessageBusConnection bus = project.getMessageBus().connect();
bus.setDefaultHandler(
(method, objects) -> {
logger.info("Method call observed in message bus.");
for (Object object : objects) {
if (method.toString().toLowerCase().contains("contentselected")) {
if (object.toString().toLowerCase().contains("debug")) {
new ButtonInputListener().receiveDebugRunAction();
} else if (object.toString().contains("DefaultRunExecutor")) {
new ButtonInputListener().receiveRunAction();
}
}
}
});
logger.info("Subscribing to RunContentManager topic.");
bus.subscribe(RunContentManager.TOPIC);
}
开发者ID:testmycode,
项目名称:tmc-intellij,
代码行数:20,
代码来源:SpywareRunListener.java
示例2: findRunningConsole
点赞 3
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
public static Collection<RunContentDescriptor> findRunningConsole(@NotNull Project project,
@NotNull NotNullFunction<RunContentDescriptor, Boolean> descriptorMatcher) {
RunContentManager contentManager = ExecutionManager.getInstance(project).getContentManager();
final RunContentDescriptor selectedContent = contentManager.getSelectedContent();
if (selectedContent != null) {
final ToolWindow toolWindow = contentManager.getToolWindowByDescriptor(selectedContent);
if (toolWindow != null && toolWindow.isVisible()) {
if (descriptorMatcher.fun(selectedContent)) {
return Collections.singletonList(selectedContent);
}
}
}
final ArrayList<RunContentDescriptor> result = ContainerUtil.newArrayList();
for (RunContentDescriptor runContentDescriptor : contentManager.getAllDescriptors()) {
if (descriptorMatcher.fun(runContentDescriptor)) {
result.add(runContentDescriptor);
}
}
return result;
}
开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:22,
代码来源:ExecutionHelper.java
示例3: actionPerformed
点赞 3
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
List<RunContentDescriptor> descriptors = ContainerUtil.newArrayList(REGISTRY);
for (RunContentDescriptor descriptor : descriptors) {
if (Disposer.isDisposed(descriptor)) {
REGISTRY.remove(descriptor);
}
else {
Project project = e.getProject();
if (project != null) {
RunContentManager runContentManager = ExecutionManager.getInstance(project).getContentManager();
// check if the descriptor belongs to the current project
if (runContentManager.getToolWindowByDescriptor(descriptor) != null) {
ExecutionUtil.restart(descriptor);
}
}
}
}
}
开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:20,
代码来源:RerunTestsAction.java
示例4: getHandler
点赞 3
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
@Nullable
private static ProcessHandler getHandler(final DataContext dataContext) {
final RunContentDescriptor contentDescriptor = RunContentManager.RUN_CONTENT_DESCRIPTOR.getData(dataContext);
final ProcessHandler processHandler;
if (contentDescriptor != null) {
// toolwindow case
processHandler = contentDescriptor.getProcessHandler();
}
else {
// main menu toolbar
final Project project = PlatformDataKeys.PROJECT.getData(dataContext);
final RunContentDescriptor selectedContent =
project == null ? null : ExecutionManager.getInstance(project).getContentManager().getSelectedContent();
processHandler = selectedContent == null ? null : selectedContent.getProcessHandler();
}
return processHandler;
}
开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:18,
代码来源:StopAction.java
示例5: hasEnabledAutoTests
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
private boolean hasEnabledAutoTests() {
RunContentManager contentManager = ExecutionManager.getInstance(myProject).getContentManager();
for (RunContentDescriptor descriptor : contentManager.getAllDescriptors()) {
if (isAutoTestEnabledForDescriptor(descriptor)) {
return true;
}
}
return false;
}
开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:10,
代码来源:AutoTestManager.java
示例6: restartAllAutoTests
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
private void restartAllAutoTests(int modificationStamp) {
RunContentManager contentManager = ExecutionManager.getInstance(myProject).getContentManager();
boolean active = false;
for (RunContentDescriptor descriptor : contentManager.getAllDescriptors()) {
if (isAutoTestEnabledForDescriptor(descriptor)) {
restartAutoTest(descriptor, modificationStamp, myDocumentWatcher);
active = true;
}
}
if (!active) {
myDocumentWatcher.deactivate();
}
}
开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:14,
代码来源:AutoTestManager.java
示例7: setSelected
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
@Override
public void setSelected(AnActionEvent e, boolean state) {
Project project = e.getData(PlatformDataKeys.PROJECT);
RunContentDescriptor descriptor = e.getData(RunContentManager.RUN_CONTENT_DESCRIPTOR);
if (project != null && descriptor != null) {
AutoTestManager.getInstance(project).setAutoTestEnabled(descriptor, state);
}
}
开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:9,
代码来源:ToggleAutoTestAction.java
示例8: restartAllAutoTests
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
protected void restartAllAutoTests(int modificationStamp) {
RunContentManager contentManager = ExecutionManager.getInstance(myProject).getContentManager();
boolean active = false;
for (RunContentDescriptor descriptor : contentManager.getAllDescriptors()) {
if (isAutoTestEnabledForDescriptor(descriptor)) {
restartAutoTest(descriptor, modificationStamp, myWatcher);
active = true;
}
}
if (!active) {
myWatcher.deactivate();
}
}
开发者ID:consulo,
项目名称:consulo,
代码行数:14,
代码来源:AbstractAutoTestManager.java
示例9: toFront
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
public void toFront(boolean focus, @Nullable final Runnable onShowCallback) {
if (ApplicationManager.getApplication().isUnitTestMode()) return;
ApplicationManager.getApplication().invokeLater(() -> {
if (myRunContentDescriptor != null) {
RunContentManager manager = ExecutionManager.getInstance(myProject).getContentManager();
ToolWindow toolWindow = manager.getToolWindowByDescriptor(myRunContentDescriptor);
if (toolWindow != null) {
if (!toolWindow.isVisible()) {
toolWindow.show(() -> {
if (onShowCallback != null) {
onShowCallback.run();
}
myRebuildWatchesRunnable.run();
});
}
manager.selectRunContent(myRunContentDescriptor);
}
}
});
if (focus) {
ApplicationManager.getApplication().invokeLater(() -> {
boolean focusWnd = XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().isMayBringFrameToFrontOnBreakpoint();
ProjectUtil.focusProjectWindow(myProject, focusWnd);
if (!focusWnd) {
AppIcon.getInstance().requestAttention(myProject, true);
}
});
}
}
开发者ID:consulo,
项目名称:consulo,
代码行数:32,
代码来源:XDebugSessionTab.java
示例10: select
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
public void select() {
if (ApplicationManager.getApplication().isUnitTestMode()) return;
UIUtil.invokeLaterIfNeeded(() -> {
if (myRunContentDescriptor != null) {
RunContentManager manager = ExecutionManager.getInstance(myProject).getContentManager();
ToolWindow toolWindow = manager.getToolWindowByDescriptor(myRunContentDescriptor);
Content content = myRunContentDescriptor.getAttachedContent();
if (toolWindow == null || content == null) return;
manager.selectRunContent(myRunContentDescriptor);
}
});
}
开发者ID:consulo,
项目名称:consulo,
代码行数:14,
代码来源:DebuggerSessionTabBase.java
示例11: descriptorToFront
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
private static void descriptorToFront(final Project project, final RunContentDescriptor descriptor) {
ApplicationManager.getApplication().invokeLater(() -> {
RunContentManager manager = ExecutionManager.getInstance(project).getContentManager();
ToolWindow toolWindow = manager.getToolWindowByDescriptor(descriptor);
if (toolWindow != null) {
toolWindow.show(null);
manager.selectRunContent(descriptor);
}
}, project.getDisposed());
}
开发者ID:consulo,
项目名称:consulo,
代码行数:11,
代码来源:ExecutionHelper.java
示例12: isSelected
点赞 2
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
@Override
public boolean isSelected(AnActionEvent e) {
Project project = e.getData(PlatformDataKeys.PROJECT);
RunContentDescriptor descriptor = e.getData(RunContentManager.RUN_CONTENT_DESCRIPTOR);
return !(project == null || descriptor == null) && AutoTestManager.getInstance(project).isAutoTestEnabled(descriptor);
}
开发者ID:lshain-android-source,
项目名称:tools-idea,
代码行数:7,
代码来源:ToggleAutoTestAction.java
示例13: getContentManager
点赞 1
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
/**
* Returns the manager of running process tabs in Run and Debug toolwindows.
*
* @return the run content manager instance.
*/
@NotNull
public abstract RunContentManager getContentManager();
开发者ID:jskierbi,
项目名称:intellij-ce-playground,
代码行数:8,
代码来源:ExecutionManager.java
示例14: getContentManager
点赞 1
import com.intellij.execution.ui.RunContentManager; //导入依赖的package包/类
/**
* Returns the manager of running process tabs in Run and Debug toolwindows.
*
* @return the run content manager instance.
*/
@Nonnull
public abstract RunContentManager getContentManager();
开发者ID:consulo,
项目名称:consulo,
代码行数:8,
代码来源:ExecutionManager.java