本文整理汇总了Java中com.intellij.execution.ui.ExecutionConsole类的典型用法代码示例。如果您正苦于以下问题:Java ExecutionConsole类的具体用法?Java ExecutionConsole怎么用?Java ExecutionConsole使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ExecutionConsole类属于com.intellij.execution.ui包,在下文中一共展示了ExecutionConsole类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showHelperProcessRunContent
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public static final ConsoleView showHelperProcessRunContent(String header, OSProcessHandler runHandler, Project project, Executor defaultExecutor) {
ProcessTerminatedListener.attach(runHandler);
ConsoleViewImpl consoleView = new ConsoleViewImpl(project, true);
DefaultActionGroup toolbarActions = new DefaultActionGroup();
JPanel panel = new JPanel((LayoutManager) new BorderLayout());
panel.add((Component) consoleView.getComponent(), "Center");
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("unknown", (ActionGroup) toolbarActions, false);
toolbar.setTargetComponent(consoleView.getComponent());
panel.add((Component) toolbar.getComponent(), "West");
RunContentDescriptor runDescriptor = new RunContentDescriptor((ExecutionConsole) consoleView,
(ProcessHandler) runHandler, (JComponent) panel, header, AllIcons.RunConfigurations.Application);
AnAction[]
consoleActions = consoleView.createConsoleActions();
toolbarActions.addAll((AnAction[]) Arrays.copyOf(consoleActions, consoleActions.length));
toolbarActions.add((AnAction) new StopProcessAction("Stop process", "Stop process", (ProcessHandler) runHandler));
toolbarActions.add((AnAction) new CloseAction(defaultExecutor, runDescriptor, project));
consoleView.attachToProcess((ProcessHandler) runHandler);
// ExecutionManager.getInstance(environment.getProject()).getContentManager().showRunContent(environment.getExecutor(), runDescriptor);
showConsole(project, defaultExecutor, runDescriptor);
return (ConsoleView) consoleView;
}
示例2: showRerunNotification
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public static void showRerunNotification(@Nullable RunContentDescriptor contentToReuse,
@NotNull final ExecutionConsole executionConsole) {
if (contentToReuse == null) {
return;
}
String lastActionId = ActionManagerEx.getInstanceEx().getPrevPreformedActionId();
boolean showNotification = !RerunTestsAction.ID.equals(lastActionId);
if (showNotification && !PropertiesComponent.getInstance().isTrueValue(KEY)) {
UiNotifyConnector.doWhenFirstShown(executionConsole.getComponent(), new Runnable() {
@Override
public void run() {
doShow(executionConsole);
}
});
}
}
示例3: createDebugProcess
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
protected PyDebugProcess createDebugProcess(@NotNull XDebugSession session,
ServerSocket serverSocket,
ExecutionResult result,
PythonCommandLineState pyState) {
ExecutionConsole executionConsole = result.getExecutionConsole();
ProcessHandler processHandler = result.getProcessHandler();
boolean isMultiProcess = pyState.isMultiprocessDebug();
String scriptName = getScriptName(pyState);
if (scriptName != null) {
VirtualFile file = VfsUtil.findFileByIoFile(new File(scriptName), true);
if (file != null) {
int line = getBreakpointLineNumber(file, session.getProject());
if (line != NO_LINE) {
return new PyEduDebugProcess(session, serverSocket,
executionConsole, processHandler,
isMultiProcess, scriptName, line + 1);
}
}
}
LOG.info("Failed to create PyEduDebugProcess. PyDebugProcess created instead.");
return new PyDebugProcess(session, serverSocket, executionConsole,
processHandler, isMultiProcess);
}
示例4: attachRerunFailedTestsAction
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public static DefaultExecutionResult attachRerunFailedTestsAction(DefaultExecutionResult result) {
ExecutionConsole console = result.getExecutionConsole();
if (!(console instanceof SMTRunnerConsoleView)) {
return result;
}
SMTRunnerConsoleView smConsole = (SMTRunnerConsoleView) console;
TestConsoleProperties consoleProperties = smConsole.getProperties();
if (!(consoleProperties instanceof BlazeTestConsoleProperties)) {
return result;
}
BlazeTestConsoleProperties properties = (BlazeTestConsoleProperties) consoleProperties;
AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(smConsole);
if (action != null) {
action.init(properties);
action.setModelProvider(smConsole::getResultsViewer);
result.setRestartActions(action);
}
return result;
}
示例5: createDebugProcessStarter
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
private XDebugProcessStarter createDebugProcessStarter(@NotNull final TheRXProcessHandler processHandler,
@NotNull final ExecutionConsole executionConsole,
@NotNull final TheRDebugger debugger,
@NotNull final TheROutputReceiver outputReceiver,
@NotNull final TheRResolvingSession resolvingSession) {
return new XDebugProcessStarter() {
@NotNull
@Override
public XDebugProcess start(@NotNull final XDebugSession session) throws ExecutionException {
return new TheRDebugProcess(
session,
processHandler,
executionConsole,
debugger,
outputReceiver,
resolvingSession,
ConcurrencyUtil.newSingleThreadExecutor(EXECUTOR_NAME)
);
}
};
}
示例6: TheRDebugProcess
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public TheRDebugProcess(@NotNull final XDebugSession session,
@NotNull final TheRXProcessHandler processHandler,
@NotNull final ExecutionConsole executionConsole,
@NotNull final TheRDebugger debugger,
@NotNull final TheROutputReceiver outputReceiver,
@NotNull final TheRResolvingSession resolvingSession,
@NotNull final ExecutorService executor) {
super(session);
myProcessHandler = processHandler;
myExecutionConsole = executionConsole;
myDebugger = debugger;
myOutputReceiver = outputReceiver;
myStack = new TheRXStack(myDebugger.getStack(), resolvingSession, executor);
myExecutor = executor;
myBreakpoints = new HashMap<XSourcePositionWrapper, XLineBreakpoint<XBreakpointProperties>>();
myTempBreakpoints = new HashSet<XSourcePositionWrapper>();
myEditorsProvider = new TheREditorsProvider();
myBreakpointHandlers = new XBreakpointHandler[]{new TheRXLineBreakpointHandler()};
myProcessHandler.addListener(this);
}
示例7: createConsole
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
public ExecutionConsole createConsole() {
myExecutionConsole = (ConsoleView) executionResult.getExecutionConsole();
controller.setConsole(myExecutionConsole);
return myExecutionConsole;
}
示例8: createConsole
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
public ExecutionConsole createConsole() {
ExecutionConsole console = myJavaSession.getProcess().getExecutionResult().getExecutionConsole();
if (console != null) return console;
return super.createConsole();
}
示例9: attachExecutionConsole
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
ExecutionConsole attachExecutionConsole(@NotNull ExternalSystemTask task,
@NotNull Project project,
@NotNull ExternalSystemRunConfiguration configuration,
@NotNull Executor executor,
@NotNull ExecutionEnvironment env,
@NotNull ProcessHandler processHandler) throws ExecutionException;
示例10: registerConsoleContent
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
/**
* Registers tab for the given {@code console}.
*
* @param console {@code ExecutionConsole} instance
* @param ui {@code RunnerLayoutUi} instance
* @return registered {@code Content} instance
*/
@NotNull
public Content registerConsoleContent(@NotNull RunnerLayoutUi ui, @NotNull ExecutionConsole console) {
Content content = ui.createContent(DebuggerContentInfo.CONSOLE_CONTENT, console.getComponent(),
XDebuggerBundle.message("debugger.session.tab.console.content.name"),
AllIcons.Debugger.Console,
console.getPreferredFocusableComponent());
content.setCloseable(false);
ui.addContent(content, 1, PlaceInGrid.bottom, false);
return content;
}
示例11: attachExecutionConsole
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@NotNull
@Override
public ExecutionConsole attachExecutionConsole(@NotNull ExternalSystemTask task,
@NotNull Project project,
@NotNull ExternalSystemRunConfiguration configuration,
@NotNull Executor executor,
@NotNull ExecutionEnvironment env,
@NotNull ProcessHandler processHandler) throws ExecutionException {
myProcessHandler = processHandler;
ConsoleView executionConsole = new TextConsoleBuilderImpl(project).getConsole();
executionConsole.attachToProcess(processHandler);
return executionConsole;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DefaultExternalSystemExecutionConsoleManager.java
示例12: getDebugSession
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
@Override
@Nullable
public XDebugSession getDebugSession(@NotNull ExecutionConsole executionConsole) {
for (final XDebugSessionImpl debuggerSession : mySessions.values()) {
XDebugSessionTab sessionTab = debuggerSession.getSessionTab();
if (sessionTab != null) {
RunContentDescriptor contentDescriptor = sessionTab.getRunContentDescriptor();
if (contentDescriptor != null && executionConsole == contentDescriptor.getExecutionConsole()) {
return debuggerSession;
}
}
}
return null;
}
示例13: doShow
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
private static void doShow(@NotNull final ExecutionConsole executionConsole) {
final Alarm alarm = new Alarm();
alarm.addRequest(new Runnable() {
@Override
public void run() {
String shortcutText = KeymapUtil.getFirstKeyboardShortcutText(
ActionManager.getInstance().getAction(RerunTestsAction.ID)
);
if (shortcutText.isEmpty()) {
return;
}
GotItMessage message = GotItMessage.createMessage("Rerun tests with " + shortcutText, "");
message.setDisposable(executionConsole);
message.setCallback(new Runnable() {
@Override
public void run() {
PropertiesComponent.getInstance().setValue(KEY, true);
}
});
message.setShowCallout(false);
Dimension consoleSize = executionConsole.getComponent().getSize();
message.show(
new RelativePoint(
executionConsole.getComponent(),
new Point(consoleSize.width - 185, consoleSize.height - 60)
),
Balloon.Position.below
);
Disposer.dispose(alarm);
}
}, 1000);
}
示例14: MyConsolePanel
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public MyConsolePanel(ExecutionConsole consoleView, ActionGroup toolbarActions) {
super(new BorderLayout());
JPanel toolbarPanel = new JPanel(new BorderLayout());
toolbarPanel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarActions,false).getComponent());
add(toolbarPanel, BorderLayout.WEST);
add(consoleView.getComponent(), BorderLayout.CENTER);
}
示例15: PyEduDebugProcess
import com.intellij.execution.ui.ExecutionConsole; //导入依赖的package包/类
public PyEduDebugProcess(@NotNull XDebugSession session,
@NotNull ServerSocket serverSocket,
@NotNull ExecutionConsole executionConsole,
@Nullable ProcessHandler processHandler, boolean multiProcess,
String scriptName,
int line) {
super(session, serverSocket, executionConsole, processHandler, multiProcess);
myScriptName = scriptName;
myLine = line;
}