Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-08-13 22:46:19 +0000
committerLars Vogel2019-08-13 22:46:19 +0000
commit3b32132b5b0ca1c747fd4c73ad615d546a882225 (patch)
treed99ecf8b612d57e88259786a1c3b6e587d3ec451
parent20f43fbcbdfa4b57d784a4e3ae8b499734ffc32f (diff)
downloadeclipse.platform.ua-3b32132b5b0ca1c747fd4c73ad615d546a882225.tar.gz
eclipse.platform.ua-3b32132b5b0ca1c747fd4c73ad615d546a882225.tar.xz
eclipse.platform.ua-3b32132b5b0ca1c747fd4c73ad615d546a882225.zip
Bug 549858 - Use PlatformUI.getWorkbench instead of
AbstractUIPlugin.getWorkbench Change-Id: Ibc595a9725ef7fbd559c9a6c4fcfe46bc7808edc Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java2
-rw-r--r--org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java3
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/actions/CheatSheetMenu.java3
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewUtilities.java3
-rw-r--r--org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java2
5 files changed, 7 insertions, 6 deletions
diff --git a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
index a697da616..628887ffe 100644
--- a/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
+++ b/org.eclipse.help.ui/src/org/eclipse/help/ui/internal/ContextHelpDialog.java
@@ -332,7 +332,7 @@ public class ContextHelpDialog {
}
// create dynamic help link if current context allows dynamic help
- IWorkbenchWindow wbWindow = HelpUIPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchWindow wbWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (DefaultHelpUI.isActiveShell(parentShell, wbWindow) || HelpTray.isAppropriateFor(parentShell)) {
// Create separator.
label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
diff --git a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java
index fef2863d3..7965ec190 100644
--- a/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java
+++ b/org.eclipse.ua.tests/cheatsheet/org/eclipse/ua/tests/cheatsheet/execution/TestCommandExecution.java
@@ -30,7 +30,6 @@ import org.eclipse.core.commands.ParameterizedCommand;
import org.eclipse.core.commands.SerializationException;
import org.eclipse.core.commands.common.NotDefinedException;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.ua.tests.plugin.UserAssistanceTestPlugin;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.commands.ICommandService;
@@ -73,7 +72,7 @@ public class TestCommandExecution {
}
private ICommandService getService() {
- IWorkbench wb =UserAssistanceTestPlugin.getDefault().getWorkbench(); //.getCommandSupport();
+ IWorkbench wb = PlatformUI.getWorkbench();
Object serviceObject = wb.getAdapter(ICommandService.class);
if (serviceObject != null) {
ICommandService service = (ICommandService)serviceObject;
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/actions/CheatSheetMenu.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/actions/CheatSheetMenu.java
index 79ef431b8..9523e4041 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/actions/CheatSheetMenu.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/actions/CheatSheetMenu.java
@@ -27,6 +27,7 @@ import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.cheatsheets.OpenCheatSheetAction;
import org.eclipse.ui.internal.cheatsheets.CheatSheetHistory;
import org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin;
@@ -181,7 +182,7 @@ public class CheatSheetMenu extends ContributionItem {
* @return IWorkbenchPage
*/
private IWorkbenchPage getActiveWorkbenchPage() {
- IWorkbench workbench = CheatSheetPlugin.getPlugin().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
//get the active cheatsheet view, if opened
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewUtilities.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewUtilities.java
index e9a96f4b7..fe8159e6c 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewUtilities.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewUtilities.java
@@ -20,6 +20,7 @@ import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin;
import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
import org.eclipse.ui.internal.cheatsheets.Messages;
@@ -58,7 +59,7 @@ public class ViewUtilities {
*/
public static CheatSheetView showCheatSheetView() {
CheatSheetView view;
- IWorkbench workbench = CheatSheetPlugin.getPlugin().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
diff --git a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
index 7dcb25819..94ba0f83c 100644
--- a/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
+++ b/org.eclipse.ui.intro/src/org/eclipse/ui/internal/intro/impl/IntroPlugin.java
@@ -94,7 +94,7 @@ public class IntroPlugin extends AbstractUIPlugin {
launchBar.close();
launchBar = null;
}
- IntroLaunchBar.destroyAll(getWorkbench());
+ IntroLaunchBar.destroyAll(PlatformUI.getWorkbench());
}
public void setLaunchBar(IntroLaunchBar launchBar) {

Back to the top