| <html> |
| <head> |
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| "http://www.w3.org/TR/html4/loose.dtd"> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" href="../../../../../default_style.css" |
| type="text/css"> |
| <link rel="stylesheet" href="../../../../wtp.css" |
| type="text/css"> |
| <title>Editor Configuration</title> |
| <style> |
| |
| <!-- |
| p, ol, ul { |
| margin-top: 0em; |
| margin-bottom: 0em; |
| } |
| h6.CaptionFigColumn#header { |
| font-size:14px; |
| display:inline |
| } |
| p.code#dtd { |
| color: #800000; |
| margin-left: 10.000000pt; |
| } |
| |
| p.code#dtdAttlist { |
| color: #800000; |
| margin-left: 20.000000pt; |
| } |
| |
| .ConfigMarkup#elementDesc { |
| color: black; |
| margin-top: 0.000000pt; |
| margin-bottom: 0.000000pt; |
| margin-right: 0.000000pt; |
| margin-left: 10.000000pt; |
| } |
| |
| .ConfigMarkup#attlistDesc { |
| color: black; |
| margin-top: 0.000000pt; |
| margin-bottom: 0.000000pt; |
| margin-right: 0.000000pt; |
| margin-left: 32.000000pt; |
| } |
| |
| p.code { |
| display: block; |
| text-align: left; |
| text-indent: 0.00pt; |
| margin-top: 0.000000pt; |
| margin-bottom: 0.000000pt; |
| margin-right: 0.000000pt; |
| margin-left: 15pt; |
| font-size: 10.000000pt; |
| font-weight: medium; |
| font-style: Regular; |
| color: #4444CC; |
| text-decoration: none; |
| vertical-align: baseline; |
| text-transform: none; |
| font-family: "Courier New"; |
| } |
| h6.CaptionFigColumn { |
| display: block; |
| text-align: left; |
| text-indent: 0.000000pt; |
| margin-top: 3.000000pt; |
| margin-bottom: 11.000000pt; |
| margin-right: 0.000000pt; |
| margin-left: 0.000000pt; |
| font-size: 9.000000pt; |
| font-weight: medium; |
| font-style: Italic; |
| color: #000000; |
| text-decoration: none; |
| vertical-align: baseline; |
| text-transform: none; |
| font-family: "Arial"; |
| } |
| --> |
| </style> |
| </head> |
| <body> |
| <table width="100%" cellspacing="5" cellpadding="2" border="0"> |
| <tbody> |
| <tr> |
| <td width="60%" align="left"><font class="indextop">Editor |
| Configuration</font> <br> |
| <font class="indexsub">structured source editing (sse) component</font></td> |
| <td width="40%"><img width="120" hspace="50" height="86" |
| align="middle" src="http://eclipse.org//images/Idea.jpg"></td> |
| </tr> |
| </tbody> |
| </table> |
| <table border=1> |
| <tr> |
| <th>Date</th> |
| <th>Revision info</th> |
| </tr> |
| <tr> |
| <td>9/07/2005</td> |
| <td>Initial contribution</td> |
| </tr> |
| </table> |
| <table width="100%" cellspacing="5" cellpadding="2" border="0"> |
| <col width="16"> |
| <col width="*"> |
| <tbody> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"><a name="top"></a></td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">Overview</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <p>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.<br /> |
| Part of this goal is achieved through the editor configuration |
| extension point. The editor configuration extension point allows |
| clients to customize the Structured Text Editor for different/new |
| content types.<br /> |
| </p> |
| <p>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:<br /> |
| </p> |
| <ul> |
| <li>Outline view configuration - configure behaviour in the outline |
| view (elements to display, menu items, etc)</li> |
| <li>Properties view configuration - configure behaviour in the |
| properties view (properties to display, menu items, etc)</li> |
| <li>Structured text viewer configuration - configure behaviour in |
| the editor (content assist, syntax highlighting, hyperlink |
| navigation, etc)</li> |
| </ul> |
| <p>Through an extension point, clients can declare their |
| configuration and the associated content type or editor id.</p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">Use Cases</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <p>Examples of editors that could use editorConfiguration:</p> |
| <ul> |
| <li>DTD editor |
| <p>Client creates their own DTD content type and would like to edit |
| DTD with Structured Text Editor.<br /> |
| Clients would like to be able to extend the following:</p> |
| <ul> |
| <li>outline view</li> |
| <li>syntax highlighting, source validation, hover help</li> |
| </ul> |
| </li> |
| <li>XML editor |
| <p>Client creates their own XML content type and would like to edit |
| XML with Structured Text Editor.<br /> |
| Clients would like to be able to extend the following:</p> |
| <ul> |
| <li>outline view</li> |
| <li>properties view</li> |
| <li>content assist, syntax highlighting, source validation, and |
| many other viewer configurations</li> |
| </ul> |
| </li> |
| <li>WSDL editor |
| <p>Client creates their own WSDL content type and would like to edit |
| WSDL with Structured Text Editor. Since the WSDL content type |
| extends the XML content type, the WSDL editor should pick up all |
| editor functionality for XML content type.<br /> |
| Clients would like to be able to extend the following:</p> |
| <ul> |
| <li>outline view</li> |
| <li>properties view</li> |
| <li>hyperlink navigation</li> |
| </ul> |
| </li> |
| <li>JSP editor |
| <p>Client creates their own JSP content type and would like to edit |
| JSP with Structured Text Editor. Since a JSP file can contain |
| different parts of different content types (such as HTML tags, JSP |
| Java scriptlets) JSP editor should utlilize some customizations from |
| other content types.<br /> |
| Clients would like to be able to extend the following:</p> |
| <ul> |
| <li>outline view</li> |
| <li>properties view</li> |
| <li>content assist, syntax highlighting, source validation, and |
| many other viewer configurations</li> |
| </ul> |
| </li> |
| </ul> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">Editor Configuration |
| Extension Point</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <h6 class=CaptionFigColumn id=header>Identifier:</h6> |
| org.eclipse.wst.sse.ui.editorConfiguration <br /> |
| <br /> |
| <h6 class=CaptionFigColumn id=header>Configuration Markup:</h6> |
| <p class=code id=dtd><!ELEMENT <a name="e.extension">extension</a> |
| (<a href="#e.sourceViewerConfiguration">sourceViewerConfiguration</a>* |
| , <a href="#e.contentOutlineConfiguration">contentOutlineConfiguration</a>* |
| , <a href="#e.propertySheetConfiguration">propertySheetConfiguration</a>* |
| , <a href="#e.provisionalConfiguration">provisionalConfiguration</a>* |
| , <a href="#e.provisionalDefinition">provisionalDefinition</a>*)></p> |
| <p class=code id=dtd><!ATTLIST extension</p> |
| <p class=code id=dtdAttlist>point CDATA #REQUIRED</p> |
| <p class=code id=dtdAttlist>id CDATA #IMPLIED</p> |
| <p class=code id=dtdAttlist>name CDATA #IMPLIED></p> |
| <p></p> |
| <ul class=ConfigMarkup id=attlistDesc> |
| </ul> |
| <br /> |
| <p class=code id=dtd><!ELEMENT <a |
| name="e.sourceViewerConfiguration">sourceViewerConfiguration</a> |
| EMPTY></p> |
| <p class=code id=dtd><!ATTLIST sourceViewerConfiguration</p> |
| <p class=code id=dtdAttlist>target CDATA #REQUIRED</p> |
| <p class=code id=dtdAttlist>class CDATA #REQUIRED></p> |
| <p /> |
| <p class=ConfigMarkup id=elementDesc>Defines the source viewer |
| configuration, affecting syntax highlighting, content assist, hover |
| help, and more in the current editor.</p> |
| <br /> |
| <ul class=ConfigMarkup id=attlistDesc> |
| <li><b>target</b> - A string defining when to use this extension, |
| either an editor or content type id. Multiple targets may be given |
| as a comma delimited value.</li> |
| <li><b>class</b> - Must subclass |
| org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration</li> |
| </ul> |
| <br /> |
| <p class=code id=dtd><!ELEMENT <a |
| name="e.contentOutlineConfiguration">contentOutlineConfiguration</a> |
| EMPTY></p> |
| <p class=code id=dtd><!ATTLIST contentOutlineConfiguration</p> |
| <p class=code id=dtdAttlist>target CDATA #REQUIRED</p> |
| <p class=code id=dtdAttlist>class CDATA #REQUIRED></p> |
| <p></p> |
| <p class=ConfigMarkup id=elementDesc>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.</p> |
| <br /> |
| <ul class=ConfigMarkup id=attlistDesc> |
| <li><b>target</b> - A string defining when to use this extension, |
| either an editor or content type id. Multiple targets may be given |
| as a comma delimited value.</li> |
| <li><b>class</b> - Must subclass |
| org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration</li> |
| </ul> |
| <br /> |
| <p class=code id=dtd><!ELEMENT <a |
| name="e.propertySheetConfiguration">propertySheetConfiguration</a> |
| EMPTY></p> |
| <p class=code id=dtd><!ATTLIST propertySheetConfiguration</p> |
| <p class=code id=dtdAttlist>target CDATA #REQUIRED</p> |
| <p class=code id=dtdAttlist>class CDATA #REQUIRED></p> |
| <p></p> |
| <p class=ConfigMarkup id=elementDesc>Defines how the current editor's |
| input maps to properties in a Table control, as well as toolbar |
| contributions, etc in the Properties view.</p> |
| <br /> |
| <ul class=ConfigMarkup id=attlistDesc> |
| <li><b>target</b> - A string defining when to use this extension, |
| either an editor or content type id. Multiple targets may be given |
| as a comma delimited value.</li> |
| <li><b>class</b> - Must subclass |
| org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration</li> |
| </ul> |
| <br /> |
| <h6 class=CaptionFigColumn id=header>Examples:</h6> |
| <pre><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> |
| </pre> |
| <p /></p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">Target Resolution Policy</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <p>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.</p> |
| <ol> |
| <li>configuration with matching editor id</li> |
| <li>configuration with matching editor id + ".source" in multipage |
| editors</li> |
| <li>configuration with matching content type id</li> |
| <li>configuration for content type's base content type</li> |
| <li>default Structured Text Editor configuration</li> |
| </ol> |
| <p>If more than one configuration is defined for an editor type or |
| content type, the first one defined, is the first one served.</p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">SourceViewerConfiguration</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <p>The structured text viewer configuration customizes various |
| aspects of the Structured text editor. It defines syntax |
| highlighting, content assist, and more. Clients must subclass <code>org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration</code> |
| to provide a custom viewer configuration for their content type. |
| Clients contributing new configuration for new content types can |
| utilize an existing configuration. They can subclass the existing |
| configuration to build on top if it. Or they can create a new |
| instance of the existing configuration in their configuration, and |
| call the methods within it. The <code>StructuredTextViewerConfigurationJSP</code>, |
| for example, creates new instances of the <code>StructuredTextViewerConfigurationHTML, |
| StructuredTextViewerConfigurationXML, JavaSourceViewerConfiguration</code> |
| and retrieves their processors to be reused in JSP content.</p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">ContentOutlineConfiguration</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <p>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 <code>org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration</code> |
| to provide a custom outline view for their content type.</p> |
| </td> |
| </tr> |
| <tr> |
| <td valign="top" bgcolor="#0080c0" align="left" colspan="2"><b><font |
| face="Arial,Helvetica" color="#ffffff">PropertySheetConfiguration</font></b></td> |
| </tr> |
| <tr> |
| <td valign="top" align="right"> </td> |
| <td valign="top"> |
| <p>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 <code>org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration</code> |
| to provide a custom properties view for their content type.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <hr> |
| <p>Migration information from earlier revisions can be found <a href="EditorConfigurationMigration.html">here</a>. |
| </body> |
| </html> |