Provides an editor service for manipulating {@link org.eclipse.ui.IEditorPart Eclipse Editors}, including an operation to open an editor from an {@link org.eclipse.ui.IEditorInput org.eclipse.ui.IEditorInput}. The Editor Service also includes methods to get registered editors and to register and unregister editors.

## Using this Package

The {@link org.eclipse.gmf.runtime.common.ui.services.editor.EditorService Editor Service} implements {@link org.eclipse.gmf.runtime.common.ui.services.editor.IEditorProvider org.eclipse.gmf.runtime.common.ui.services.editor.IEditorProvider}. The interface contains only one method, {@link org.eclipse.gmf.runtime.common.ui.services.editor.IEditorProvider#openEditor(org.eclipse.ui.IEditorInput) openEditor(IEditorInput)}, which takes the editor input for the editor to be opened.

Providers may subclass {@link org.eclipse.gmf.runtime.common.ui.services.editor.AbstractEditorProvider AbstractEditorProvider}, which implements the required {@link org.eclipse.gmf.runtime.common.ui.services.editor.IEditorProvider IEditorProvider}. The only operation executed by the service is {@link org.eclipse.gmf.runtime.common.ui.services.editor.OpenEditorOperation OpenEditorOperation}, whose {@link org.eclipse.gmf.runtime.common.ui.services.editor.OpenEditorOperation#OpenEditorOperation(org.eclipse.ui.IEditorInput) 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 {@link org.eclipse.gmf.runtime.common.ui.services.editor.EditorService#getInstance() getInstance()} method.

The {@link org.eclipse.gmf.runtime.common.ui.services.editor.EditorService#registerEditor(org.eclipse.ui.IEditorPart org.eclipse.ui.IEditorPart) registerEditor(IEditorPart)} method should be called when the editor is initialized, and the {@link org.eclipse.gmf.runtime.common.ui.services.editor.EditorService#unregisterEditor(org.eclipse.ui.IEditorPart org.eclipse.ui.IEditorPart) 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 {@link org.eclipse.gmf.runtime.common.ui.services.editor.EditorService#getRegisteredEditors(java.lang.String) getRegisteredEditors(String)} or {@link org.eclipse.gmf.runtime.common.ui.services.editor.EditorService#getRegisteredEditorParts() getRegisteredEditorParts()} is called. These methods return the registered editors matching the editor's {@link org.eclipse.ui.IWorkbenchPartSite#getId() ID from the editor site} and all the editors, respectively.

## Package Specification

For more information on Eclipse editors, please see {@link org.eclipse.ui.IEditorPart org.eclipse.ui.IEditorPart}

For more information on the Service Infrastructure, please see {@link org.eclipse.gmf.runtime.common.core.service.Service org.eclipse.gmf.runtime.common.core.service.Service}

@canBeSeenBy %partners