Skip to content

Commit 9ff5fa0

Browse files
author
Jonas Kutscha
committed
Show the view using sync and don't activate
1 parent 3b8b3ba commit 9ff5fa0

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

bundles/org.pitest.pitclipse.ui/src/org/pitest/pitclipse/ui/mutation/marker/PitclipseMutantMarkerFactory.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import org.eclipse.jdt.core.JavaCore;
3434
import org.eclipse.jdt.core.JavaModelException;
3535
import org.eclipse.swt.widgets.Display;
36-
import org.eclipse.ui.IViewPart;
37-
import org.eclipse.ui.IWorkbenchPage;
3836
import org.eclipse.ui.PartInitException;
3937
import org.eclipse.ui.PlatformUI;
4038
import org.pitest.pitclipse.core.extension.point.ResultNotifier;
@@ -102,11 +100,10 @@ public class PitclipseMutantMarkerFactory implements ResultNotifier<MutationsMod
102100
public void handleResults(MutationsModel results) {
103101
createMarkers(results);
104102
// open and show tasks view after the marker are created
105-
Display.getDefault().asyncExec(() -> {
103+
Display.getDefault().syncExec(() -> {
106104
try {
107-
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
108-
IViewPart view = page.showView(TASKS_VIEW_ID);
109-
page.activate(view);
105+
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
106+
.showView(TASKS_VIEW_ID);
110107
} catch (PartInitException e) {
111108
throw new RuntimeException("Could not show task view.", e);
112109
}

0 commit comments

Comments
 (0)