Editor
Configuration structured source editing (sse) component |
Date | Revision info |
---|---|
9/07/2005 | Initial contribution |
Overview | |
One main goal of the Structured Source editing framework is to
provide a way for clients to extend the Structured Text Editor
without having to subclass the editor. The Structured Text editor is designed to handle different types
of "structured" content types as input, such as XML, HTML, JSP, CSS.
This includes the ability to change content types on-the-fly. For
example, editing an HTML document, then deciding to change it to JSP
by performing Save As.. *.jsp. The different types of configurations
clients can contribute include:
Through an extension point, clients can declare their configuration and the associated content type or editor id. |
|
Use Cases | |
Examples of editors that could use editorConfiguration:
|
|
Editor Configuration Extension Point | |
Identifier:org.eclipse.wst.sse.ui.editorConfigurationConfiguration Markup:<!ELEMENT extension (sourceViewerConfiguration* , contentOutlineConfiguration* , propertySheetConfiguration* , provisionalConfiguration* , provisionalDefinition*)> <!ATTLIST extension point CDATA #REQUIRED id CDATA #IMPLIED name CDATA #IMPLIED> <!ELEMENT sourceViewerConfiguration EMPTY> <!ATTLIST sourceViewerConfiguration target CDATA #REQUIRED class CDATA #REQUIRED> Defines the source viewer configuration, affecting syntax highlighting, content assist, hover help, and more in the current editor.
<!ELEMENT contentOutlineConfiguration EMPTY> <!ATTLIST contentOutlineConfiguration target CDATA #REQUIRED class CDATA #REQUIRED> Defines how the current editor's input maps to elements with in a Tree control, as well as selection filtering, toolbar and menu contributions, etc in the Outline view.
<!ELEMENT propertySheetConfiguration EMPTY> <!ATTLIST propertySheetConfiguration target CDATA #REQUIRED class CDATA #REQUIRED> Defines how the current editor's input maps to properties in a Table control, as well as toolbar contributions, etc in the Properties view.
Examples:<extension point="org.eclipse.wst.sse.ui.editorConfiguration"> <!-- associating a source viewer configuration to an input's content type--> <sourceViewerConfiguration class="org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML" target="org.eclipse.wst.html.core.htmlsource"/> <!-- associating an outline configuration to an input's content type --> <contentOutlineConfiguration class="org.eclipse.wst.sse.xml.ui.views.contentoutline.XMLContentOutlineConfiguration" target="org.eclipse.core.runtime.xml"/> <!-- associating a property sheet configuration to multiple content types --> <propertySheetConfiguration class="org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration" target="org.eclipse.wst.sse.contenttype.xml, org.eclipse.wst.html.core.htmlsource, org.eclipse.jst.jsp.core.jspsource"/> </extension> |
|
Target Resolution Policy | |
Clients can target their editor configuration to either a specific content type and/or editor. In the event there are conflicts as to which configuration should be used, below is the resolution policy.
If more than one configuration is defined for an editor type or content type, the first one defined, is the first one served. |
|
SourceViewerConfiguration | |
The structured text viewer configuration customizes various
aspects of the Structured text editor. It defines syntax
highlighting, content assist, and more. Clients must subclass |
|
ContentOutlineConfiguration | |
The outline view configuration customizes the editor's outline
view. It defines how the current editor's input maps to elements in a
Tree control, as well as selection filtering, toolbar/menu
contributions, etc. Clients must subclass |
|
PropertySheetConfiguration | |
The properties view configuration customizes the editor's
properties view. It defines how the current editor's input maps to a
list of properties in a Table control, as well as toolbar/menu
contributions, etc. Clients must subclass |
Migration information from earlier revisions can be found here.