From a95c9a486e97f08062ccc2d5bf673a0a7dd76baf Mon Sep 17 00:00:00 2001 From: Sergey Kovalchuk Date: Thu, 19 Dec 2019 23:02:35 +0300 Subject: [PATCH] Bug 558474 - [CDT]CleanUp deprecated methods Initial with Gerrit Clean up deprecated methods Change-Id: Iff82715d7415d0512a8a1fe3f9625e7c27fb01d8 Signed-off-by: Sergey Kovalchuk --- .../src/org/eclipse/cdt/ui/CUIPlugin.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java index 406e2322840..8211abea2f0 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CUIPlugin.java @@ -292,7 +292,7 @@ public class CUIPlugin extends AbstractUIPlugin { } public static IWorkbenchWindow getActiveWorkbenchWindow() { - return getDefault().getWorkbench().getActiveWorkbenchWindow(); + return PlatformUI.getWorkbench().getActiveWorkbenchWindow(); } public static IWorkbenchPage getActivePage() { @@ -459,7 +459,7 @@ public class CUIPlugin extends AbstractUIPlugin { * The code template context type registry for the C editor. * @since 5.0 */ - private ContextTypeRegistry fCodeTemplateContextTypeRegistry; + private ContributionContextTypeRegistry fCodeTemplateContextTypeRegistry; /** * The code template store for the C editor. @@ -805,7 +805,7 @@ public class CUIPlugin extends AbstractUIPlugin { public static IEditorPart[] getDirtyEditors() { Set inputs = new HashSet<>(); List result = new ArrayList<>(0); - IWorkbench workbench = getDefault().getWorkbench(); + IWorkbench workbench = PlatformUI.getWorkbench(); for (IWorkbenchWindow window : workbench.getWorkbenchWindows()) { for (IWorkbenchPage page : window.getPages()) { for (IEditorReference editorRef : page.getEditorReferences()) { @@ -828,7 +828,7 @@ public class CUIPlugin extends AbstractUIPlugin { */ public static IEditorPart[] getInstanciatedEditors() { List result = new ArrayList<>(0); - IWorkbench workbench = getDefault().getWorkbench(); + IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchWindow[] windows = workbench.getWorkbenchWindows(); for (IWorkbenchWindow window : windows) { IWorkbenchPage[] pages = window.getPages(); @@ -1093,7 +1093,7 @@ public class CUIPlugin extends AbstractUIPlugin { if (getActiveWorkbenchShell() != null) { return getActiveWorkbenchShell(); } - IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows(); + IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); return windows[0].getShell(); }