1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Bug 558474 - [CDT]CleanUp deprecated methods

Initial with Gerrit
Clean up deprecated methods

Change-Id: Iff82715d7415d0512a8a1fe3f9625e7c27fb01d8
Signed-off-by: Sergey Kovalchuk <sergei.kovalchuk@arsysop.ru>
This commit is contained in:
Sergey Kovalchuk 2019-12-19 23:02:35 +03:00 committed by Sergei Kov
parent 995bf9320c
commit a95c9a486e

View file

@ -292,7 +292,7 @@ public class CUIPlugin extends AbstractUIPlugin {
} }
public static IWorkbenchWindow getActiveWorkbenchWindow() { public static IWorkbenchWindow getActiveWorkbenchWindow() {
return getDefault().getWorkbench().getActiveWorkbenchWindow(); return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
} }
public static IWorkbenchPage getActivePage() { public static IWorkbenchPage getActivePage() {
@ -459,7 +459,7 @@ public class CUIPlugin extends AbstractUIPlugin {
* The code template context type registry for the C editor. * The code template context type registry for the C editor.
* @since 5.0 * @since 5.0
*/ */
private ContextTypeRegistry fCodeTemplateContextTypeRegistry; private ContributionContextTypeRegistry fCodeTemplateContextTypeRegistry;
/** /**
* The code template store for the C editor. * The code template store for the C editor.
@ -805,7 +805,7 @@ public class CUIPlugin extends AbstractUIPlugin {
public static IEditorPart[] getDirtyEditors() { public static IEditorPart[] getDirtyEditors() {
Set<IEditorInput> inputs = new HashSet<>(); Set<IEditorInput> inputs = new HashSet<>();
List<IEditorPart> result = new ArrayList<>(0); List<IEditorPart> result = new ArrayList<>(0);
IWorkbench workbench = getDefault().getWorkbench(); IWorkbench workbench = PlatformUI.getWorkbench();
for (IWorkbenchWindow window : workbench.getWorkbenchWindows()) { for (IWorkbenchWindow window : workbench.getWorkbenchWindows()) {
for (IWorkbenchPage page : window.getPages()) { for (IWorkbenchPage page : window.getPages()) {
for (IEditorReference editorRef : page.getEditorReferences()) { for (IEditorReference editorRef : page.getEditorReferences()) {
@ -828,7 +828,7 @@ public class CUIPlugin extends AbstractUIPlugin {
*/ */
public static IEditorPart[] getInstanciatedEditors() { public static IEditorPart[] getInstanciatedEditors() {
List<IEditorPart> result = new ArrayList<>(0); List<IEditorPart> result = new ArrayList<>(0);
IWorkbench workbench = getDefault().getWorkbench(); IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow[] windows = workbench.getWorkbenchWindows(); IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
for (IWorkbenchWindow window : windows) { for (IWorkbenchWindow window : windows) {
IWorkbenchPage[] pages = window.getPages(); IWorkbenchPage[] pages = window.getPages();
@ -1093,7 +1093,7 @@ public class CUIPlugin extends AbstractUIPlugin {
if (getActiveWorkbenchShell() != null) { if (getActiveWorkbenchShell() != null) {
return getActiveWorkbenchShell(); return getActiveWorkbenchShell();
} }
IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows(); IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
return windows[0].getShell(); return windows[0].getShell();
} }