Package org.eclipse.gmf.runtime.common.ui.services.editor
Provides an editor service for manipulating
Eclipse Editors
, including an operation to open an
editor from an
org.eclipse.ui.IEditorInput
.
See:
Description
Package org.eclipse.gmf.runtime.common.ui.services.editor Description
Provides an editor service for manipulating
Eclipse Editors
, including an operation to open an
editor from an
org.eclipse.ui.IEditorInput
.
The Editor Service also includes methods to get registered editors and to
register and unregister editors.
Using this Package
The
Editor Service
implements
org.eclipse.gmf.runtime.common.ui.services.editor.IEditorProvider
.
The interface contains only one method,
openEditor(IEditorInput)
, which takes the editor input for the editor to be
opened.
Providers may subclass
AbstractEditorProvider
, which implements the required
IEditorProvider
. The only operation executed by the service is
OpenEditorOperation
, whose
constructor
takes the same parameters as the interface's method.
The Editor Service
In addition to the openEditor method, the EditorService contains methods
to keep track of editors and other methods that should be called when the editor
is initialized and disposed. The static instance of the EditorService class
is obtained using the
getInstance()
method.
The
registerEditor(IEditorPart)
method should be called
when the editor is initialized, and the
unregisterEditor(IEditorPart)
method should be called
when the editor is disposed. Calling these methods will ensure the map of
editors is updated. This is important to obtain the expected results when
either
getRegisteredEditors(String)
or
getRegisteredEditorParts()
is called. These methods return the registered
editors matching the editor's
ID from the editor site
and all the editors, respectively.
Package Specification
For more information on Eclipse editors, please see
org.eclipse.ui.IEditorPart
For more information on the Service Infrastructure, please see
org.eclipse.gmf.runtime.common.core.service.Service
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.