Search in sources :

Example 1 with SideBorder

use of com.intellij.ui.SideBorder in project intellij-community by JetBrains.

the class PydevConsoleRunnerImpl method initAndRun.

private void initAndRun() throws ExecutionException {
    // Create Server process
    final Process process = createProcess();
    UIUtil.invokeLaterIfNeeded(() -> {
        // Init console view
        myConsoleView = createConsoleView();
        if (myConsoleView != null) {
            ((JComponent) myConsoleView).setBorder(new SideBorder(JBColor.border(), SideBorder.LEFT));
        }
        myProcessHandler = createProcessHandler(process);
        myConsoleExecuteActionHandler = createExecuteActionHandler();
        ProcessTerminatedListener.attach(myProcessHandler);
        PythonConsoleView consoleView = myConsoleView;
        myProcessHandler.addProcessListener(new ProcessAdapter() {

            @Override
            public void processTerminated(ProcessEvent event) {
                consoleView.setEditable(false);
            }
        });
        // Attach to process
        myConsoleView.attachToProcess(myProcessHandler);
        createContentDescriptorAndActions();
        // Run
        myProcessHandler.startNotify();
    });
}
Also used : ProcessAdapter(com.intellij.execution.process.ProcessAdapter) ProcessEvent(com.intellij.execution.process.ProcessEvent) RemoteProcess(com.intellij.remote.RemoteProcess) XDebugProcess(com.intellij.xdebugger.XDebugProcess) SideBorder(com.intellij.ui.SideBorder)

Example 2 with SideBorder

use of com.intellij.ui.SideBorder in project intellij-community by JetBrains.

the class AbstractConsoleRunnerWithHistory method initAndRun.

/**
   * Launch process, setup history, actions etc.
   *
   * @throws ExecutionException
   */
public void initAndRun() throws ExecutionException {
    // Create Server process
    final Process process = createProcess();
    UIUtil.invokeLaterIfNeeded(() -> {
        // Init console view
        myConsoleView = createConsoleView();
        if (myConsoleView instanceof JComponent) {
            ((JComponent) myConsoleView).setBorder(new SideBorder(JBColor.border(), SideBorder.LEFT));
        }
        myProcessHandler = createProcessHandler(process);
        myConsoleExecuteActionHandler = createExecuteActionHandler();
        ProcessTerminatedListener.attach(myProcessHandler);
        myProcessHandler.addProcessListener(new ProcessAdapter() {

            @Override
            public void processTerminated(ProcessEvent event) {
                finishConsole();
            }
        });
        // Attach to process
        myConsoleView.attachToProcess(myProcessHandler);
        // Runner creating
        createContentDescriptorAndActions();
        // Run
        myProcessHandler.startNotify();
    });
}
Also used : SideBorder(com.intellij.ui.SideBorder)

Aggregations

SideBorder (com.intellij.ui.SideBorder)2 ProcessAdapter (com.intellij.execution.process.ProcessAdapter)1 ProcessEvent (com.intellij.execution.process.ProcessEvent)1 RemoteProcess (com.intellij.remote.RemoteProcess)1 XDebugProcess (com.intellij.xdebugger.XDebugProcess)1