From 44a5177c51082223c8d50b5eef8d28019d953b6f Mon Sep 17 00:00:00 2001 From: Oleg Besedin Date: Mon, 9 Jan 2012 14:01:05 -0500 Subject: Bug 368187 - Services pre-API cleanup --- .../ui/internal/workbench/swt/E4Application.java | 72 ---------------------- .../e4/ui/workbench/modeling/EPartService.java | 2 - 2 files changed, 74 deletions(-) diff --git a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java index 7980e0a072b..e0de93784b8 100644 --- a/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java +++ b/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/internal/workbench/swt/E4Application.java @@ -487,78 +487,6 @@ public class E4Application implements IApplication { // setup for commands and handlers appContext.set(IServiceConstants.ACTIVE_PART, new ActivePartLookupFunction()); - // appContext.set(EPartService.PART_SERVICE_ROOT, new ContextFunction() - // { - // private void log() { - // StatusReporter statusReporter = (StatusReporter) appContext - // .get(StatusReporter.class.getName()); - // statusReporter.report(new Status(IStatus.ERROR, - // WorkbenchSWTActivator.PI_RENDERERS, - // "Internal error, please post the trace to bug 315270", - // new Exception()), StatusReporter.LOG); - // } - // - // @Override - // public Object compute(IEclipseContext context) { - // MContext perceivedRoot = (MContext) context.get(MWindow.class - // .getName()); - // if (perceivedRoot == null) { - // perceivedRoot = (MContext) context.get(MApplication.class - // .getName()); - // if (perceivedRoot == null) { - // IEclipseContext ctxt = appContext.getActiveChild(); - // if (ctxt == null) { - // return null; - // } - // log(); - // return ctxt.get(MWindow.class); - // } - // } - // - // IEclipseContext current = perceivedRoot.getContext(); - // if (current == null) { - // IEclipseContext ctxt = appContext.getActiveChild(); - // if (ctxt == null) { - // return null; - // } - // log(); - // return ctxt.get(MWindow.class); - // } - // - // IEclipseContext next = current.getActiveChild(); - // MPerspective candidate = null; - // while (next != null) { - // current = next; - // MPerspective perspective = current.get(MPerspective.class); - // if (perspective != null) { - // candidate = perspective; - // } - // next = current.getActiveChild(); - // } - // - // if (candidate != null) { - // return candidate; - // } - // - // // we need to consider detached windows - // MUIElement window = (MUIElement) current.get(MWindow.class - // .getName()); - // if (window == null) { - // IEclipseContext ctxt = appContext.getActiveChild(); - // if (ctxt == null) { - // return null; - // } - // log(); - // return ctxt.get(MWindow.class); - // } - // MElementContainer parent = window.getParent(); - // while (parent != null && !(parent instanceof MApplication)) { - // window = parent; - // parent = parent.getParent(); - // } - // return window; - // } - // }); appContext.set(IServiceConstants.ACTIVE_SHELL, new ActiveChildLookupFunction(IServiceConstants.ACTIVE_SHELL, diff --git a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EPartService.java b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EPartService.java index 752e049d203..c5a659fa7c0 100644 --- a/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EPartService.java +++ b/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/workbench/modeling/EPartService.java @@ -53,8 +53,6 @@ public interface EPartService { CREATE } - public static final String PART_SERVICE_ROOT = "partServiceRoot"; //$NON-NLS-1$ - /** * A tag on a part to indicate that it should be removed from the model when it is hidden. * -- cgit v1.2.3