Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-10-17 14:17:58 +0000
committerAlexander Kurtakov2019-10-17 15:59:47 +0000
commit40e441871eef74946138b0ef8610d4c10efa48cc (patch)
tree40dd91fdb2382e7e5183c1767f5809be248e71b9 /examples
parent3ecf6b0dcc62154585bdeb8c490016cd11afc6c8 (diff)
downloadeclipse.platform.swt-40e441871eef74946138b0ef8610d4c10efa48cc.tar.gz
eclipse.platform.swt-40e441871eef74946138b0ef8610d4c10efa48cc.tar.xz
eclipse.platform.swt-40e441871eef74946138b0ef8610d4c10efa48cc.zip
Move away of deprecated AbstractUIPlugin.getWorkbench.
Change-Id: Ib82a2e295e05f80244a21c898df180684d5a20df Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples.watchdog/src/org/eclipse/swt/examples/watchdog/WatchdogPlugin.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/org.eclipse.swt.examples.watchdog/src/org/eclipse/swt/examples/watchdog/WatchdogPlugin.java b/examples/org.eclipse.swt.examples.watchdog/src/org/eclipse/swt/examples/watchdog/WatchdogPlugin.java
index 63179df903..74e94bbfd0 100644
--- a/examples/org.eclipse.swt.examples.watchdog/src/org/eclipse/swt/examples/watchdog/WatchdogPlugin.java
+++ b/examples/org.eclipse.swt.examples.watchdog/src/org/eclipse/swt/examples/watchdog/WatchdogPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2016 Google Inc. and others.
+ * Copyright (c) 2013, 2018 Google Inc. and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -17,6 +17,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IStartup;
import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -31,7 +32,7 @@ public class WatchdogPlugin extends AbstractUIPlugin implements IStartup {
super();
plugin = this;
- IWorkbench workbench = getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
display = (workbench != null) ? workbench.getDisplay() : null;
Thread displayThread = (display != null) ? display.getThread() : null;

Back to the top