Class EditorSite
- All Implemented Interfaces:
- IAdaptable,- IShellProvider,- IEditorSite,- IWorkbenchPartSite,- IWorkbenchSite,- IServiceLocator
- 
Field SummaryFields inherited from class org.eclipse.ui.internal.PartSitemenuExtenders, model, serviceLocator
- 
Constructor SummaryConstructorsConstructorDescriptionEditorSite(MPart model, IWorkbenchPart part, IWorkbenchPartReference ref, IConfigurationElement element) Constructs an EditorSite for an editor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidactivateActionBars(boolean forceVisibility) voiddeactivateActionBars(boolean forceHide) voiddispose()Dispose the contributions.Returns the editor action bar contributor for this editor.Returns the editorReturns the extension editor action bar contributor for this editor.protected Stringfinal voidregisterContextMenu(String menuId, MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput) Registers a pop-up menu with a particular id for extension.final voidregisterContextMenu(MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput) Registers a pop-up menu with the default id for extension.voidsetActionBars(SubActionBars bars) Sets the action bars for the part.Methods inherited from class org.eclipse.ui.internal.PartSitegetActionBars, getAdapter, getContext, getContextMenuIds, getId, getKeyBindingService, getModel, getPage, getPart, getPartReference, getPluginId, getRegisteredName, getSelectionProvider, getService, getShell, getWorkbenchWindow, hasService, registerContextMenu, registerContextMenu, registerContextMenu, setPart, setSelectionProvider, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptablegetAdapterMethods inherited from interface org.eclipse.ui.IEditorSitegetActionBarsMethods inherited from interface org.eclipse.ui.services.IServiceLocatorgetService, hasServiceMethods inherited from interface org.eclipse.ui.IWorkbenchPartSitegetId, getKeyBindingService, getPart, getPluginId, getRegisteredName, registerContextMenu, registerContextMenuMethods inherited from interface org.eclipse.ui.IWorkbenchSitegetPage, getSelectionProvider, getShell, getWorkbenchWindow, setSelectionProvider
- 
Constructor Details- 
EditorSitepublic EditorSite(MPart model, IWorkbenchPart part, IWorkbenchPartReference ref, IConfigurationElement element) Constructs an EditorSite for an editor.
 
- 
- 
Method Details- 
setActionBarsDescription copied from class:PartSiteSets the action bars for the part.- Overrides:
- setActionBarsin class- PartSite
 
- 
activateActionBarspublic void activateActionBars(boolean forceVisibility) - Overrides:
- activateActionBarsin class- PartSite
 
- 
deactivateActionBarspublic void deactivateActionBars(boolean forceHide) - Overrides:
- deactivateActionBarsin class- PartSite
 
- 
getActionBarContributorReturns the editor action bar contributor for this editor.An action contributor is responsable for the creation of actions. By design, this contributor is used for one or more editors of the same type. Thus, the contributor returned by this method is not owned completely by the editor. It is shared. - Specified by:
- getActionBarContributorin interface- IEditorSite
- Returns:
- the editor action bar contributor
 
- 
getExtensionActionBarContributorReturns the extension editor action bar contributor for this editor.
- 
getEditorPartReturns the editor
- 
getInitialScopeId- Overrides:
- getInitialScopeIdin class- PartSite
 
- 
disposepublic void dispose()Description copied from class:PartSiteDispose the contributions.
- 
registerContextMenupublic final void registerContextMenu(MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput) Description copied from interface:IEditorSiteRegisters a pop-up menu with the default id for extension. The default id is defined as the part id. By default, context menus include object contributions based on the editor input for the current editor. It is possible to override this behaviour by calling this method with includeEditorInputasfalse. This might be desirable for editors that present a localized view of an editor input (e.g., a node in a model editor).For a detailed description of context menu registration see IWorkbenchPartSite.registerContextMenu(MenuManager, ISelectionProvider)- Specified by:
- registerContextMenuin interface- IEditorSite
- Parameters:
- menuManager- the menu manager; must not be- null.
- selectionProvider- the selection provider; must not be- null.
- includeEditorInput- Whether the editor input should be included when adding object contributions to this context menu.
- See Also:
 
- 
registerContextMenupublic final void registerContextMenu(String menuId, MenuManager menuManager, ISelectionProvider selectionProvider, boolean includeEditorInput) Description copied from interface:IEditorSiteRegisters a pop-up menu with a particular id for extension. This method should only be called if the target part has more than one context menu to register. By default, context menus include object contributions based on the editor input for the current editor. It is possible to override this behaviour by calling this method with includeEditorInputasfalse. This might be desirable for editors that present a localized view of an editor input (e.g., a node in a model editor).For a detailed description of context menu registration see IWorkbenchPartSite.registerContextMenu(MenuManager, ISelectionProvider)- Specified by:
- registerContextMenuin interface- IEditorSite
- Parameters:
- menuId- the menu id; must not be- null.
- menuManager- the menu manager; must not be- null.
- selectionProvider- the selection provider; must not be- null.
- includeEditorInput- Whether the editor input should be included when adding object contributions to this context menu.
- See Also:
 
 
-