File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
org.eclipse.jdt.debug.ui/ui/org/eclipse/jdt/internal/debug/ui Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 3333import org .eclipse .swt .layout .GridData ;
3434import org .eclipse .swt .widgets .Button ;
3535import org .eclipse .swt .widgets .Composite ;
36- import org .eclipse .swt .widgets .Display ;
3736import org .eclipse .swt .widgets .Shell ;
37+ import org .eclipse .ui .PlatformUI ;
3838
3939/**
4040 * An error dialog reporting a problem with a debug
@@ -159,9 +159,14 @@ public void run() {
159159 @ Override
160160 public void handleDebugEvents (DebugEvent [] events ) {
161161 for (DebugEvent event : events ) {
162- if (event .getSource () instanceof JDIThread de ) {
163- if (de .isTerminated ()) {
164- Display .getDefault ().asyncExec (() -> this .close ());
162+ if (event .getSource () instanceof JDIThread jdiThread ) {
163+ if (!jdiThread .isTerminated ()) {
164+ continue ;
165+ }
166+ if (jdiThread .getDebugTarget ().equals (target .getDebugTarget ())) {
167+ DebugPlugin .getDefault ().removeDebugEventListener (this );
168+ PlatformUI .getWorkbench ().getDisplay ().asyncExec (this ::close );
169+ return ;
165170 }
166171 }
167172 }
You can’t perform that action at this time.
0 commit comments