@@ -19,6 +19,8 @@ import com.intellij.execution.process.ProcessHandler
19
19
import com.intellij.execution.process.ProcessTerminatedListener
20
20
import com.intellij.execution.runners.ProgramRunner
21
21
import com.intellij.execution.ui.ConsoleViewContentType
22
+ import com.intellij.execution.ui.RunContentDescriptor
23
+ import com.intellij.execution.ui.RunContentManager
22
24
import com.intellij.openapi.actionSystem.ActionManager
23
25
import com.intellij.openapi.actionSystem.DefaultActionGroup
24
26
import com.intellij.openapi.application.ApplicationManager
@@ -29,6 +31,7 @@ import com.intellij.ui.components.panels.NonOpaquePanel
29
31
import kotlinx.coroutines.flow.*
30
32
import kotlinx.coroutines.launch
31
33
import kotlinx.coroutines.runBlocking
34
+ import org.jetbrains.concurrency.resolvedPromise
32
35
import java.awt.BorderLayout
33
36
import java.io.OutputStream
34
37
import javax.swing.JComponent
@@ -78,7 +81,7 @@ open class DevInsRunConfigurationProfileState(
78
81
if (agent != null ) {
79
82
agentRun(output, console, processHandler, agent)
80
83
} else {
81
- defaultRun(output, console, processHandler, compileResult.isLocalCommand)
84
+ defaultRun(output, console, processHandler, compileResult.isLocalCommand, executor, runner )
82
85
}
83
86
84
87
return DefaultExecutionResult (console, processHandler)
@@ -122,7 +125,9 @@ open class DevInsRunConfigurationProfileState(
122
125
output : String ,
123
126
console : ConsoleViewWrapperBase ,
124
127
processHandler : ProcessHandler ,
125
- isLocalMode : Boolean
128
+ isLocalMode : Boolean ,
129
+ executor : Executor ? ,
130
+ runner : ProgramRunner <* >
126
131
) {
127
132
// contains <DevInsError> means error
128
133
output.split(" \n " ).forEach {
@@ -153,6 +158,14 @@ open class DevInsRunConfigurationProfileState(
153
158
console.print (" \n Done!" , ConsoleViewContentType .SYSTEM_OUTPUT )
154
159
processHandler.detachProcess()
155
160
}
161
+
162
+ // val manager = RunContentManager.getInstance(myProject)
163
+ // val descriptor = manager.findContentDescriptor(executor, processHandler)
164
+ // resolvedPromise(descriptor).then {
165
+ // if (descriptor != null) {
166
+ // println(descriptor)
167
+ // }
168
+ // }
156
169
}
157
170
}
158
171
0 commit comments