Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Webster2009-04-06 15:21:10 +0000
committerPaul Webster2009-04-06 15:21:10 +0000
commit0ddc3f888040c9d670d88e76d20ba4340ad6eda7 (patch)
tree6d70ced7a1a6a98ee25128369f8b98b78cc65e8d
parentf56654ab9c7f29de39de4622a8863dafaaf45285 (diff)
downloadorg.eclipse.e4.ui-0ddc3f888040c9d670d88e76d20ba4340ad6eda7.tar.gz
org.eclipse.e4.ui-0ddc3f888040c9d670d88e76d20ba4340ad6eda7.tar.xz
org.eclipse.e4.ui-0ddc3f888040c9d670d88e76d20ba4340ad6eda7.zip
Bug 271020 [Compatibility] Build the main menu from the IDE action bar advisor
make the menu service context aware
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyHandlerService.java199
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyMenuService.java68
-rw-r--r--bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/part/LegacyWPSImpl.java175
3 files changed, 171 insertions, 271 deletions
diff --git a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyHandlerService.java b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyHandlerService.java
deleted file mode 100644
index cbb89ff5..00000000
--- a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyHandlerService.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.e4.workbench.ui.api;
-
-import java.util.Collection;
-
-import org.eclipse.core.commands.Command;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.IHandler;
-import org.eclipse.core.commands.NotEnabledException;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.commands.ParameterizedCommand;
-import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.expressions.Expression;
-import org.eclipse.core.expressions.IEvaluationContext;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.ISourceProvider;
-import org.eclipse.ui.handlers.IHandlerActivation;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * @since 3.3
- *
- */
-public class LegacyHandlerService implements IHandlerService {
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#activateHandler(org.eclipse.ui.handlers.IHandlerActivation)
- */
- public IHandlerActivation activateHandler(IHandlerActivation activation) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#activateHandler(java.lang.String, org.eclipse.core.commands.IHandler)
- */
- public IHandlerActivation activateHandler(String commandId, IHandler handler) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#activateHandler(java.lang.String, org.eclipse.core.commands.IHandler, org.eclipse.core.expressions.Expression)
- */
- public IHandlerActivation activateHandler(String commandId,
- IHandler handler, Expression expression) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#activateHandler(java.lang.String, org.eclipse.core.commands.IHandler, org.eclipse.core.expressions.Expression, boolean)
- */
- public IHandlerActivation activateHandler(String commandId,
- IHandler handler, Expression expression, boolean global) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#activateHandler(java.lang.String, org.eclipse.core.commands.IHandler, org.eclipse.core.expressions.Expression, int)
- */
- public IHandlerActivation activateHandler(String commandId,
- IHandler handler, Expression expression, int sourcePriorities) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#createContextSnapshot(boolean)
- */
- public IEvaluationContext createContextSnapshot(boolean includeSelection) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#createExecutionEvent(org.eclipse.core.commands.Command, org.eclipse.swt.widgets.Event)
- */
- public ExecutionEvent createExecutionEvent(Command command, Event event) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#createExecutionEvent(org.eclipse.core.commands.ParameterizedCommand, org.eclipse.swt.widgets.Event)
- */
- public ExecutionEvent createExecutionEvent(ParameterizedCommand command,
- Event event) {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#deactivateHandler(org.eclipse.ui.handlers.IHandlerActivation)
- */
- public void deactivateHandler(IHandlerActivation activation) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#deactivateHandlers(java.util.Collection)
- */
- public void deactivateHandlers(Collection activations) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#executeCommand(java.lang.String, org.eclipse.swt.widgets.Event)
- */
- public Object executeCommand(String commandId, Event event)
- throws ExecutionException, NotDefinedException,
- NotEnabledException, NotHandledException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#executeCommand(org.eclipse.core.commands.ParameterizedCommand, org.eclipse.swt.widgets.Event)
- */
- public Object executeCommand(ParameterizedCommand command, Event event)
- throws ExecutionException, NotDefinedException,
- NotEnabledException, NotHandledException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#executeCommandInContext(org.eclipse.core.commands.ParameterizedCommand, org.eclipse.swt.widgets.Event, org.eclipse.core.expressions.IEvaluationContext)
- */
- public Object executeCommandInContext(ParameterizedCommand command,
- Event event, IEvaluationContext context) throws ExecutionException,
- NotDefinedException, NotEnabledException, NotHandledException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#getCurrentState()
- */
- public IEvaluationContext getCurrentState() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#readRegistry()
- */
- public void readRegistry() {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.handlers.IHandlerService#setHelpContextId(org.eclipse.core.commands.IHandler, java.lang.String)
- */
- public void setHelpContextId(IHandler handler, String helpContextId) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.services.IServiceWithSources#addSourceProvider(org.eclipse.ui.ISourceProvider)
- */
- public void addSourceProvider(ISourceProvider provider) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.services.IServiceWithSources#removeSourceProvider(org.eclipse.ui.ISourceProvider)
- */
- public void removeSourceProvider(ISourceProvider provider) {
- // TODO Auto-generated method stub
-
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.services.IDisposable#dispose()
- */
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
-}
diff --git a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyMenuService.java b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyMenuService.java
index 0c00ca03..48cc68c0 100644
--- a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyMenuService.java
+++ b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/e4/workbench/ui/api/LegacyMenuService.java
@@ -12,35 +12,51 @@
package org.eclipse.e4.workbench.ui.api;
import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.e4.core.services.context.IEclipseContext;
import org.eclipse.jface.action.ContributionManager;
import org.eclipse.ui.ISourceProvider;
+import org.eclipse.ui.LegacyEvalContext;
import org.eclipse.ui.menus.AbstractContributionFactory;
import org.eclipse.ui.menus.IMenuService;
/**
* @since 3.3
- *
+ *
*/
public class LegacyMenuService implements IMenuService {
+ private IEclipseContext context;
+
+ public LegacyMenuService(IEclipseContext context) {
+ this.context = context;
+ }
- /* (non-Javadoc)
- * @see org.eclipse.ui.menus.IMenuService#addContributionFactory(org.eclipse.ui.menus.AbstractContributionFactory)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.menus.IMenuService#addContributionFactory(org.eclipse.
+ * ui.menus.AbstractContributionFactory)
*/
public void addContributionFactory(AbstractContributionFactory factory) {
// TODO Auto-generated method stub
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.menus.IMenuService#getCurrentState()
*/
public IEvaluationContext getCurrentState() {
- // TODO Auto-generated method stub
- return null;
+ return new LegacyEvalContext(context);
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.menus.IMenuService#populateContributionManager(org.eclipse.jface.action.ContributionManager, java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.menus.IMenuService#populateContributionManager(org.eclipse
+ * .jface.action.ContributionManager, java.lang.String)
*/
public void populateContributionManager(ContributionManager mgr,
String location) {
@@ -48,39 +64,57 @@ public class LegacyMenuService implements IMenuService {
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.menus.IMenuService#releaseContributions(org.eclipse.jface.action.ContributionManager)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.menus.IMenuService#releaseContributions(org.eclipse.jface
+ * .action.ContributionManager)
*/
public void releaseContributions(ContributionManager mgr) {
// TODO Auto-generated method stub
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.menus.IMenuService#removeContributionFactory(org.eclipse.ui.menus.AbstractContributionFactory)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.menus.IMenuService#removeContributionFactory(org.eclipse
+ * .ui.menus.AbstractContributionFactory)
*/
public void removeContributionFactory(AbstractContributionFactory factory) {
// TODO Auto-generated method stub
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.services.IServiceWithSources#addSourceProvider(org.eclipse.ui.ISourceProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.services.IServiceWithSources#addSourceProvider(org.eclipse
+ * .ui.ISourceProvider)
*/
public void addSourceProvider(ISourceProvider provider) {
// TODO Auto-generated method stub
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.services.IServiceWithSources#removeSourceProvider(org.eclipse.ui.ISourceProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.services.IServiceWithSources#removeSourceProvider(org.
+ * eclipse.ui.ISourceProvider)
*/
public void removeSourceProvider(ISourceProvider provider) {
// TODO Auto-generated method stub
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.services.IDisposable#dispose()
*/
public void dispose() {
diff --git a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/part/LegacyWPSImpl.java b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/part/LegacyWPSImpl.java
index 963bdf2f..aabfe967 100644
--- a/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/part/LegacyWPSImpl.java
+++ b/bundles/org.eclipse.e4.ui.workbench.fragment/src/org/eclipse/ui/part/LegacyWPSImpl.java
@@ -15,7 +15,6 @@ import org.eclipse.e4.core.services.context.IContextFunction;
import org.eclipse.e4.core.services.context.IEclipseContext;
import org.eclipse.e4.ui.model.application.MContributedPart;
import org.eclipse.e4.ui.model.application.MPart;
-import org.eclipse.e4.workbench.ui.api.LegacyHandlerService;
import org.eclipse.e4.workbench.ui.api.LegacyMenuService;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
@@ -39,7 +38,6 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.internal.PartService;
import org.eclipse.ui.internal.misc.UIListenerLogging;
import org.eclipse.ui.internal.services.IServiceLocatorCreator;
@@ -49,23 +47,24 @@ import org.eclipse.ui.services.IServiceLocator;
/**
* @since 3.3
- *
+ *
*/
-public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite {
+public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite,
+ IEditorSite {
private MContributedPart<MPart<?>> part;
private WorkbenchPart implementation;
private IEclipseContext context;
-
+
/**
* @param e4Workbench
* @param part
- * @param impl
+ * @param impl
*/
public LegacyWPSImpl(MContributedPart<MPart<?>> part, WorkbenchPart impl) {
this.part = part;
this.implementation = impl;
context = part.getContext();
-
+
// Register any site-specific services with the context
registerServices();
}
@@ -76,17 +75,20 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
private void registerServices() {
context.set(IKeyBindingService.class.getName(), new IContextFunction() {
public Object compute(IEclipseContext context, Object[] arguments) {
- return new IKeyBindingService() {
+ return new IKeyBindingService() {
public String[] getScopes() {
return null;
}
+
public void registerAction(IAction action) {
}
+
public void setScopes(String[] scopes) {
}
+
public void unregisterAction(IAction action) {
}
- };
+ };
}
});
context.set(IActionBars.class.getName(), new IContextFunction() {
@@ -96,65 +98,80 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
private IMenuManager menuMgr;
private IToolBarManager tbMgr;
private IAction globalHandler;
-
+
public void clearGlobalActionHandlers() {
globalHandler = null;
}
+
public IAction getGlobalActionHandler(String actionId) {
return globalHandler;
}
+
public IMenuManager getMenuManager() {
if (menuMgr == null) {
menuMgr = new MenuManager();
}
return menuMgr;
}
+
public IServiceLocator getServiceLocator() {
return null;
}
+
public IStatusLineManager getStatusLineManager() {
if (slMgr == null) {
slMgr = new StatusLineManager();
}
return slMgr;
}
+
public IToolBarManager getToolBarManager() {
if (tbMgr == null) {
tbMgr = new ToolBarManager2();
}
return tbMgr;
}
- public void setGlobalActionHandler(String actionId, IAction handler) {
+
+ public void setGlobalActionHandler(String actionId,
+ IAction handler) {
globalHandler = handler;
}
+
public void updateActionBars() {
}
};
-
+
return actionBars;
}
});
context.set(ISelectionProvider.class.getName(), new IContextFunction() {
public Object compute(IEclipseContext context, Object[] arguments) {
ISelectionProvider selProvider = new ISelectionProvider() {
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
+ public void addSelectionChangedListener(
+ ISelectionChangedListener listener) {
}
+
public ISelection getSelection() {
return null;
}
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
+
+ public void removeSelectionChangedListener(
+ ISelectionChangedListener listener) {
}
+
public void setSelection(ISelection selection) {
- }
+ }
};
return selProvider;
}
});
- context.set(IServiceLocatorCreator.class.getName(), new IContextFunction() {
- public Object compute(IEclipseContext context, Object[] arguments) {
- return new ServiceLocatorCreator();
- }
- });
+ context.set(IServiceLocatorCreator.class.getName(),
+ new IContextFunction() {
+ public Object compute(IEclipseContext context,
+ Object[] arguments) {
+ return new ServiceLocatorCreator();
+ }
+ });
context.set(IPartService.class.getName(), new IContextFunction() {
public Object compute(IEclipseContext context, Object[] arguments) {
return new PartService(
@@ -164,39 +181,42 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
});
context.set(IMenuService.class.getName(), new IContextFunction() {
public Object compute(IEclipseContext context, Object[] arguments) {
- return new LegacyMenuService();
- }
- });
- context.set(IHandlerService.class.getName(), new IContextFunction() {
- public Object compute(IEclipseContext context, Object[] arguments) {
- return new LegacyHandlerService();
+ return new LegacyMenuService(context);
}
});
-
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchPartSite#getId()
*/
public String getId() {
return part.getId();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchPartSite#getKeyBindingService()
*/
public IKeyBindingService getKeyBindingService() {
- return (IKeyBindingService) context.get(IKeyBindingService.class.getName());
+ return (IKeyBindingService) context.get(IKeyBindingService.class
+ .getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchPartSite#getPart()
*/
public IWorkbenchPart getPart() {
return implementation;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchPartSite#getPluginId()
*/
public String getPluginId() {
@@ -204,7 +224,9 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
return null;
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchPartSite#getRegisteredName()
*/
public String getRegisteredName() {
@@ -212,16 +234,25 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPartSite#registerContextMenu(java.lang.String, org.eclipse.jface.action.MenuManager, org.eclipse.jface.viewers.ISelectionProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchPartSite#registerContextMenu(java.lang.String,
+ * org.eclipse.jface.action.MenuManager,
+ * org.eclipse.jface.viewers.ISelectionProvider)
*/
public void registerContextMenu(String menuId, MenuManager menuManager,
ISelectionProvider selectionProvider) {
System.out.println("registerContextMenu: " + menuManager.toString()); //$NON-NLS-1$
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchPartSite#registerContextMenu(org.eclipse.jface.action.MenuManager, org.eclipse.jface.viewers.ISelectionProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchPartSite#registerContextMenu(org.eclipse.jface
+ * .action.MenuManager, org.eclipse.jface.viewers.ISelectionProvider)
*/
public void registerContextMenu(MenuManager menuManager,
ISelectionProvider selectionProvider) {
@@ -229,77 +260,103 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchSite#getPage()
*/
public IWorkbenchPage getPage() {
- return PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ return PlatformUI.getWorkbench().getActiveWorkbenchWindow()
+ .getActivePage();
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchSite#getSelectionProvider()
*/
public ISelectionProvider getSelectionProvider() {
- return (ISelectionProvider) context.get(ISelectionProvider.class.getName());
+ return (ISelectionProvider) context.get(ISelectionProvider.class
+ .getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchSite#getShell()
*/
public Shell getShell() {
return (Shell) part.getContext().get(Shell.class.getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IWorkbenchSite#getWorkbenchWindow()
*/
public IWorkbenchWindow getWorkbenchWindow() {
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IWorkbenchSite#setSelectionProvider(org.eclipse.jface.viewers.ISelectionProvider)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IWorkbenchSite#setSelectionProvider(org.eclipse.jface.
+ * viewers.ISelectionProvider)
*/
public void setSelectionProvider(ISelectionProvider provider) {
context.set(ISelectionProvider.class.getName(), provider);
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
public Object getAdapter(Class adapter) {
return context.get(adapter.getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.services.IServiceLocator#getService(java.lang.Class)
*/
public Object getService(Class api) {
return context.get(api.getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.services.IServiceLocator#hasService(java.lang.Class)
*/
public boolean hasService(Class api) {
return context.containsKey(api.getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IViewSite#getActionBars()
*/
public IActionBars getActionBars() {
return (IActionBars) context.get(IActionBars.class.getName());
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IViewSite#getSecondaryId()
*/
public String getSecondaryId() {
return ""; //$NON-NLS-1$
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.ui.IEditorSite#getActionBarContributor()
*/
public IEditorActionBarContributor getActionBarContributor() {
@@ -307,15 +364,23 @@ public class LegacyWPSImpl implements IWorkbenchPartSite, IViewSite, IEditorSite
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorSite#registerContextMenu(org.eclipse.jface.action.MenuManager, org.eclipse.jface.viewers.ISelectionProvider, boolean)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.IEditorSite#registerContextMenu(org.eclipse.jface.action
+ * .MenuManager, org.eclipse.jface.viewers.ISelectionProvider, boolean)
*/
public void registerContextMenu(MenuManager menuManager,
ISelectionProvider selectionProvider, boolean includeEditorInput) {
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.IEditorSite#registerContextMenu(java.lang.String, org.eclipse.jface.action.MenuManager, org.eclipse.jface.viewers.ISelectionProvider, boolean)
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.IEditorSite#registerContextMenu(java.lang.String,
+ * org.eclipse.jface.action.MenuManager,
+ * org.eclipse.jface.viewers.ISelectionProvider, boolean)
*/
public void registerContextMenu(String menuId, MenuManager menuManager,
ISelectionProvider selectionProvider, boolean includeEditorInput) {

Back to the top