Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-02-04 09:16:52 +0000
committerAlexander Kurtakov2020-02-04 12:43:53 +0000
commitf90f900e4890497679f3f4b01cc1e12876725526 (patch)
tree3384efa4d0954854caf3f7ac33c80e08e8881cff /testsrunner/org.eclipse.cdt.testsrunner
parent2f2082914481e31ce6bfb6b9e1b4db0ad06d81f6 (diff)
downloadorg.eclipse.cdt-f90f900e4890497679f3f4b01cc1e12876725526.tar.gz
org.eclipse.cdt-f90f900e4890497679f3f4b01cc1e12876725526.tar.xz
org.eclipse.cdt-f90f900e4890497679f3f4b01cc1e12876725526.zip
Move away of the deprecated AbstractUIPlugin.getWorkbench
Use PlatformUI.getWorkbench instead. Change-Id: I8c0eb2c4b3b414e61f03fc9d9becd1d574f7e26d Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'testsrunner/org.eclipse.cdt.testsrunner')
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/ResultsView.java3
-rw-r--r--testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java6
2 files changed, 5 insertions, 4 deletions
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/ResultsView.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/ResultsView.java
index 03bb3134084..5b86ae620c3 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/ResultsView.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/internal/ui/view/ResultsView.java
@@ -43,6 +43,7 @@ import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.part.ViewPart;
@@ -121,7 +122,7 @@ public class ResultsView extends ViewPart {
@Override
public void createPartControl(Composite parent) {
sessionsManager = TestsRunnerPlugin.getDefault().getTestingSessionsManager();
- IWorkbench workbench = TestsRunnerPlugin.getDefault().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
Clipboard clipboard = new Clipboard(parent.getDisplay());
this.parent = parent;
diff --git a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java
index 3da86e1c9e3..72aa6076124 100644
--- a/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java
+++ b/testsrunner/org.eclipse.cdt.testsrunner/src/org/eclipse/cdt/testsrunner/launcher/BaseTestsLaunchDelegate.java
@@ -43,6 +43,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
/**
* Launch delegate implementation that redirects its queries to the preferred
@@ -239,11 +240,10 @@ public abstract class BaseTestsLaunchDelegate extends LaunchConfigurationDelegat
private void activateTestingView() {
Display.getDefault().syncExec(() -> {
try {
- IWorkbenchWindow activeWindow = TestsRunnerPlugin.getDefault().getWorkbench()
- .getActiveWorkbenchWindow();
+ IWorkbenchWindow activeWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
IViewPart view = activeWindow.getActivePage()
.showView(ITestsRunnerConstants.TESTS_RUNNER_RESULTS_VIEW_ID);
- TestsRunnerPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(view);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().activate(view);
} catch (PartInitException e) {
TestsRunnerPlugin.log(e);
}

Back to the top