Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2019-10-25 12:39:28 +0000
committerKarsten Thoms2019-10-25 12:39:28 +0000
commitefac15e6530e2172ed2fd55d90f1171f68a91f1b (patch)
treebeca1f71e67ad3e906bb26928ceade7b7cb22a14
parent8c86157a414ac49f969763b050396c43ced40a1e (diff)
downloadeclipse.platform.team-I20191102-1800.tar.gz
eclipse.platform.team-I20191102-1800.tar.xz
eclipse.platform.team-I20191102-1800.zip
Change-Id: I2d91baeccedbcfc8f8e8e6baa7cfbfb1a5b355f2 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java11
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java5
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java3
-rw-r--r--examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java7
18 files changed, 35 insertions, 36 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
index eb2f655b2..c602c549a 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java
@@ -450,10 +450,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
}
public static IWorkbench getActiveWorkbench() {
- CompareUIPlugin plugin= getDefault();
- if (plugin == null)
- return null;
- return plugin.getWorkbench();
+ return PlatformUI.getWorkbench();
}
public static IWorkbenchWindow getActiveWorkbenchWindow() {
@@ -694,7 +691,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
if (image == null) {
if (fgComparePlugin != null) {
if (ITypedElement.FOLDER_TYPE.equals(type)) {
- image= getDefault().getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
+ image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
//image= SharedImages.getImage(ISharedImages.IMG_OBJ_FOLDER);
} else {
image= createWorkbenchImage(type);
@@ -749,7 +746,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
}
private static Image createWorkbenchImage(String type) {
- IEditorRegistry er= getDefault().getWorkbench().getEditorRegistry();
+ IEditorRegistry er= PlatformUI.getWorkbench().getEditorRegistry();
ImageDescriptor id= er.getImageDescriptor("foo." + type); //$NON-NLS-1$
return id.createImage();
}
@@ -1413,7 +1410,7 @@ public final class CompareUIPlugin extends AbstractUIPlugin {
public static IEditorPart[] getDirtyEditors() {
Set<IEditorInput> inputs= new HashSet<IEditorInput>();
List<IEditorPart> result= new ArrayList<IEditorPart>(0);
- IWorkbench workbench= getDefault().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow[] windows= workbench.getWorkbenchWindows();
for (IWorkbenchWindow window : windows) {
IWorkbenchPage[] pages = window.getPages();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
index 58ddc939b..1660dcf45 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLightweightDecorator.java
@@ -468,7 +468,7 @@ public class CVSLightweightDecorator extends LabelProvider implements ILightweig
* Perform a blanket refresh of all CVS decorations
*/
public static void refresh() {
- CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().update(CVSUIPlugin.DECORATOR_ID);
+ PlatformUI.getWorkbench().getDecoratorManager().update(CVSUIPlugin.DECORATOR_ID);
}
/*
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
index a88999cd0..b5f47920c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSUIPlugin.java
@@ -519,7 +519,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
public static void openDialog(Shell providedShell, final IOpenableInShell openable, int flags) {
// If no shell was provided, try to get one from the active window
if (providedShell == null) {
- IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
providedShell = window.getShell();
// sync-exec when we do this just in case
@@ -743,8 +743,7 @@ public class CVSUIPlugin extends AbstractUIPlugin {
}
public IEditorPart openEditor(ICVSRemoteFile file, IProgressMonitor monitor) throws InvocationTargetException {
- IWorkbench workbench = getWorkbench();
- IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage();
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
try {
return Utils.openEditor(page, file.getAdapter(IFileRevision.class), monitor);
} catch (CoreException e) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
index 4c3988e08..9d004bca2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CheckoutProjectOperation.java
@@ -511,7 +511,7 @@ public abstract class CheckoutProjectOperation extends CheckoutOperation {
}
/* private */ void createWorkingSet(String workingSetName, IProject[] projects) {
- IWorkingSetManager manager = CVSUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
+ IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
IWorkingSet oldSet = manager.getWorkingSet(workingSetName);
if (oldSet == null) {
IWorkingSet newSet = manager.createWorkingSet(workingSetName, projects);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java
index a2aa5f96f..529f1ee96 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/repo/NewCVSRepositoryAction.java
@@ -18,17 +18,18 @@ import org.eclipse.jface.action.Action;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.wizards.NewLocationWizard;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
/**
* Called from Welcome page only.
*/
public class NewCVSRepositoryAction extends Action {
+ @Override
public void run() {
Shell shell;
- IWorkbenchWindow window = CVSUIPlugin.getPlugin().getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window != null) {
shell = window.getShell();
} else {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
index 2dc1197da..899c732f4 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/CVSWizardPage.java
@@ -31,6 +31,7 @@ import org.eclipse.swt.widgets.*;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.operations.RemoteProjectFolder;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.model.WorkbenchContentProvider;
import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.views.navigator.ResourceComparator;
@@ -233,7 +234,7 @@ public abstract class CVSWizardPage extends WizardPage {
tree.setLabelProvider(
new DecoratingLabelProvider(
new WorkbenchLabelProvider(),
- CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().getLabelDecorator()));
+ PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
tree.setComparator(new ResourceComparator(ResourceComparator.NAME));
GridData data = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
index bb81ea9df..1334726c0 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/RestoreFromRepositoryFileSelectionPage.java
@@ -222,7 +222,7 @@ public class RestoreFromRepositoryFileSelectionPage extends CVSWizardPage {
return text;
}
},
- CVSUIPlugin.getPlugin().getWorkbench().getDecoratorManager().getLabelDecorator()));
+ PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
tree.setComparator(new ResourceComparator(ResourceComparator.NAME));
tree.setInput(treeInput);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
index bd87b9d44..445898e6d 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/ProjectSetImporter.java
@@ -152,7 +152,7 @@ public class ProjectSetImporter {
//try working sets
IMemento[] sets = xmlMemento.getChildren("workingSets"); //$NON-NLS-1$
- IWorkingSetManager wsManager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
+ IWorkingSetManager wsManager = PlatformUI.getWorkbench().getWorkingSetManager();
boolean replaceAll = false;
boolean mergeAll = false;
boolean skipAll = false;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index 8848cd264..511bffdea 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -152,7 +152,7 @@ public class TeamUIPlugin extends AbstractUIPlugin {
* @return the active workbench page
*/
public static IWorkbenchPage getActivePage() {
- IWorkbenchWindow window = getPlugin().getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) return null;
return window.getActivePage();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index 5fad0c007..2019b9ea2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -311,7 +311,7 @@ public class Utils {
if (!shell.isDisposed())
return shell;
}
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench != null) {
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
index 6653f89d3..12f99ce0e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/actions/TeamAction.java
@@ -63,6 +63,7 @@ import org.eclipse.ui.IWorkbenchPartReference;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.ide.ResourceUtil;
@@ -281,7 +282,7 @@ public abstract class TeamAction extends AbstractHandler implements IObjectActio
} else if (window != null) {
return window.getShell();
} else {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench == null) return null;
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window == null) return null;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
index 60101a8ae..88eea79ec 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/OpenLocalFileAction.java
@@ -27,6 +27,7 @@ import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
public class OpenLocalFileAction extends BaseSelectionListenerAction {
@@ -61,7 +62,7 @@ public class OpenLocalFileAction extends BaseSelectionListenerAction {
}
/* private */String getEditorID(String fileName, InputStream contents) {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IEditorRegistry registry = workbench.getEditorRegistry();
IContentType type = null;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index 2a3cd25a1..472bcd309 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -459,7 +459,7 @@ public class SynchronizeManager implements ISynchronizeManager {
@Override
public ISynchronizeView showSynchronizeViewInActivePage() {
- IWorkbench workbench = TeamUIPlugin.getPlugin().getWorkbench();
+ IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
boolean switchPerspectives = promptForPerspectiveSwitch();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
index 04c8b274f..0ce623310 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetMainPage.java
@@ -57,7 +57,6 @@ import org.eclipse.team.core.RepositoryProvider;
import org.eclipse.team.internal.ui.IHelpContextIds;
import org.eclipse.team.internal.ui.SWTUtils;
import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.internal.ui.Utils;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
@@ -96,7 +95,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
public TreePath[] getParents(Object element) {
if (element instanceof IProject){
ArrayList<IWorkingSet> treePaths = new ArrayList<>();
- IWorkingSet[] workingSets = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets();
+ IWorkingSet[] workingSets = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets();
for (IWorkingSet workingSet : workingSets) {
IAdaptable[] elements = workingSet.getElements();
for (IAdaptable d : elements) {
@@ -556,7 +555,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
updateEnablement();
});
- wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
+ wsTableViewer.setInput(PlatformUI.getWorkbench().getWorkingSetManager());
}
private void addButtons(Composite projectComposite){
@@ -621,7 +620,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
newWorkingSet.setLayoutData(data);
newWorkingSet.setText(TeamUIMessages.ExportProjectSetMainPage_EditButton);
newWorkingSet.addListener(SWT.Selection, event -> {
- final IWorkingSetManager workingSetManager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
+ final IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
IWorkingSetSelectionDialog wsWizard = workingSetManager.createWorkingSetSelectionDialog(getShell(), false);
if (wsWizard != null) {
IPropertyChangeListener propListener = null;
@@ -669,7 +668,7 @@ public class ExportProjectSetMainPage extends TeamWizardPage {
}
public void refresh(){
- wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager());
+ wsTableViewer.setInput(PlatformUI.getWorkbench().getWorkingSetManager());
}
private void updateEnablement() {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
index f8d5c95d6..d8e6532b7 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ImportProjectSetOperation.java
@@ -21,10 +21,10 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableContext;
import org.eclipse.team.internal.ui.ProjectSetImporter;
import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.ui.TeamOperation;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.IWorkingSetManager;
+import org.eclipse.ui.PlatformUI;
public class ImportProjectSetOperation extends TeamOperation {
@@ -112,7 +112,7 @@ public class ImportProjectSetOperation extends TeamOperation {
}
private void createWorkingSet(IWorkingSet[] workingSets, IProject[] projects) {
- IWorkingSetManager manager = TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager();
+ IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
String workingSetName;
for (IWorkingSet workingSet : workingSets) {
workingSetName = workingSet.getName();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
index 001fed4c1..18369648f 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
@@ -35,8 +35,8 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.team.internal.ui.TeamUIMessages;
-import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.ui.IWorkingSet;
+import org.eclipse.ui.PlatformUI;
public class WorkingSetsDialog extends TitleAreaDialog {
@@ -90,7 +90,7 @@ public class WorkingSetsDialog extends TitleAreaDialog {
wsTableViewer.setContentProvider(new ArrayContentProvider());
wsTableViewer.setLabelProvider(new WorkingSetLabelProvider());
- wsTableViewer.setInput(TeamUIPlugin.getPlugin().getWorkbench().getWorkingSetManager().getWorkingSets());
+ wsTableViewer.setInput(PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSets());
setupListeners();
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
index 84de2798f..74ec241be 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLPlugin.java
@@ -35,6 +35,7 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -352,7 +353,7 @@ public final class XMLPlugin extends AbstractUIPlugin {
}
public static IWorkbenchWindow getActiveWorkbenchWindow() {
- IWorkbenchWindow window= fgXMLPlugin.getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchWindow window= PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (window == null) {
final WindowRef windowRef= new WindowRef();
Display.getDefault().syncExec(() -> setActiveWorkbenchWindow(windowRef));
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
index b76fd02a8..ffc379ba9 100644
--- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
+++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/OpenFileSystemRevisionAction.java
@@ -26,13 +26,11 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.team.core.history.IFileRevision;
-import org.eclipse.team.examples.filesystem.FileSystemPlugin;
import org.eclipse.team.ui.history.HistoryPage;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IEditorRegistry;
-import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
import org.eclipse.ui.ide.IDE;
@@ -47,6 +45,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction {
super(text);
}
+ @Override
public void run() {
IStructuredSelection structSel = selection;
@@ -90,8 +89,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction {
}
/* private */String getEditorID(String fileName, InputStream contents) {
- IWorkbench workbench = FileSystemPlugin.getPlugin().getWorkbench();
- IEditorRegistry registry = workbench.getEditorRegistry();
+ IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
IContentType type = null;
if (contents != null) {
try {
@@ -114,6 +112,7 @@ public class OpenFileSystemRevisionAction extends BaseSelectionListenerAction {
return id;
}
+ @Override
protected boolean updateSelection(IStructuredSelection selection) {
this.selection = selection;
return shouldShow();

Back to the top