From 77e27d7bf245e044ac5cae18a8c9b68c94dd7b3a Mon Sep 17 00:00:00 2001 From: Fabian Stemmler Date: Wed, 2 Oct 2019 03:17:04 +0200 Subject: [PATCH] Display now accessed via PlatformUI for e.g. highlight requests --- .../src/net/mograsim/plugin/util/SingleSWTRequest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/SingleSWTRequest.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/SingleSWTRequest.java index c4a1eee3..9ffa7728 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/SingleSWTRequest.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/SingleSWTRequest.java @@ -2,7 +2,7 @@ package net.mograsim.plugin.util; import java.util.concurrent.atomic.AtomicBoolean; -import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; /** * A utility class that requests the asynchronous execution of a Runnable in the SWT Thread. Making a new request before the old one is @@ -21,7 +21,7 @@ public class SingleSWTRequest if (!waiting.get()) { waiting.set(true); - Display.getDefault().asyncExec(() -> + PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { synchronized (waiting) { -- 2.17.1