Search in sources :

Example 1 with HotSwapUI

use of com.intellij.debugger.ui.HotSwapUI in project intellij-plugins by JetBrains.

the class BndLaunchState method startProcess.

@NotNull
@Override
protected OSProcessHandler startProcess() throws ExecutionException {
    OSProcessHandler handler = super.startProcess();
    MessageBusConnection connection = myProject.getMessageBus().connect();
    connection.subscribe(CompilerTopics.COMPILATION_STATUS, this);
    HotSwapUI hotSwapManager = HotSwapUI.getInstance(myProject);
    hotSwapManager.addListener(this);
    handler.addProcessListener(new ProcessAdapter() {

        @Override
        public void processTerminated(ProcessEvent event) {
            connection.disconnect();
            hotSwapManager.removeListener(BndLaunchState.this);
            myLauncher.cleanup();
        }
    });
    return handler;
}
Also used : MessageBusConnection(com.intellij.util.messages.MessageBusConnection) ProcessAdapter(com.intellij.execution.process.ProcessAdapter) HotSwapUI(com.intellij.debugger.ui.HotSwapUI) ProcessEvent(com.intellij.execution.process.ProcessEvent) OSProcessHandler(com.intellij.execution.process.OSProcessHandler) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

HotSwapUI (com.intellij.debugger.ui.HotSwapUI)1 OSProcessHandler (com.intellij.execution.process.OSProcessHandler)1 ProcessAdapter (com.intellij.execution.process.ProcessAdapter)1 ProcessEvent (com.intellij.execution.process.ProcessEvent)1 MessageBusConnection (com.intellij.util.messages.MessageBusConnection)1 NotNull (org.jetbrains.annotations.NotNull)1