Internal and External Editors
Identifier:
org.eclipse.ui.editors
Description:
This extension point is used to add new editors to the
workbench. A editor is a visual component within a
workbench page. It is typically used to edit or browse
a document or input object. To open an editor, the user
will typically invoke "Open" on an
IFile.
When this action is performed the workbench registry
is consulted to determine an appropriate editor for
the file type and then a new instance of the editor
type is created. The actual result depends on the
type of the editor. The workbench provides support
for the creation of internal editors, which are tightly
integrated into the workbench, and external editors,
which are launched in a separate frame window.
There are also various level of integration between
these extremes.
In the case of an internal editor tight integration can
be achieved between the workbench window and the editor
part. The workbench menu and toolbar are pre-loaded
with a number of common actions, such as cut, copy, and
paste. The active part, view or editor, is expected to
provide the implementation for these actions. An internal
editor may also define new actions which appear in the
workbench window. These actions only appear when the
editor is active.
The integration between the workbench and external
editors is more tenuous. In this case the workbench
may launch an editor but after has no way of determining
the state of the external editor or collaborating
with it by any means except through the file system.
Configuration Markup:
<!ELEMENT extension (
editor*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED
>
-
point - a fully qualified identifier of the target extension point
-
id - an optional identifier of the extension instance
-
name - an optional name of the extension instance
<!ELEMENT editor (
contentTypeBinding*)>
<!ATTLIST editor
id CDATA #REQUIRED
name CDATA #REQUIRED
icon CDATA #IMPLIED
extensions CDATA #IMPLIED
class CDATA #IMPLIED
command CDATA #IMPLIED
launcher CDATA #IMPLIED
contributorClass CDATA #IMPLIED
default (true | false) "false"
filenames CDATA #IMPLIED
symbolicFontName CDATA #IMPLIED
matchingStrategy CDATA #IMPLIED
>
<!ELEMENT contentTypeBinding EMPTY>
<!ATTLIST contentTypeBinding
contentTypeId IDREF #REQUIRED
>
Advertises that the containing editor understands the given content type and is suitable for editing files of that type.
-
contentTypeId - The content type identifier. This is an ID defined by the 'org.eclipse.core.contenttype.contentTypes' extension point.
Examples:
The following is an example
of an internal editor extension definition:
<extension point=
"org.eclipse.ui.editors"
>
<editor
id=
"com.xyz.XMLEditor"
name=
"Fancy XYZ XML editor"
icon=
"./icons/XMLEditor.gif"
extensions=
"xml"
class=
"com.xyz.XMLEditor"
contributorClass=
"com.xyz.XMLEditorContributor"
symbolicFontName=
"org.eclipse.jface.textfont"
default=
"false"
>
</editor>
</extension>
Supplied Implementation:
The workbench provides a "Default Text Editor". The end user product may contain other editors as part of the shipping bundle. In that case, editors will be registered as extensions using the syntax described above.
Copyright (c) 2002, 2007 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 https://www.eclipse.org/legal/epl-v10.html