blob: 2ab9c31d2805ac1171c6fd0fa1653d4a35ed24d6 [file] [log] [blame]
<?xml version='1.0' encoding='UTF-8'?>
<!-- Schema file written by PDE -->
<schema targetNamespace="org.eclipse.etrice.ui.behavior" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo>
<meta.schema plugin="org.eclipse.etrice.ui.behavior" id="actionCodeEditor" name="Action Code Editor"/>
</appinfo>
<documentation>
This extension point is used to add new Action Code editors to the eTrice Propeties Dialogs. An Action Code editor is a visual editing component within a eTrice property dialog. It is typically used to edit or browse the Detail Code segments embedded within the Behavior of an Actor in eTrice. The editor opens inside the State and Transition property dialogs. When this action is performed the workbench registry and the preference store is consulted to determine an appropriate editor for the target language of the underlying model and then a new instance of the editor type is created using the supplied Factory class.
</documentation>
</annotation>
<element name="extension">
<annotation>
<appinfo>
<meta.element />
</appinfo>
</annotation>
<complexType>
<sequence minOccurs="1" maxOccurs="unbounded">
<element ref="editor"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
a fully qualified identifier of the target extension point
</documentation>
</annotation>
</attribute>
<attribute name="id" type="string">
<annotation>
<documentation>
an optional identifier of the extension instance
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string">
<annotation>
<documentation>
an optional name of the extension instance
</documentation>
<appinfo>
<meta.attribute translatable="true"/>
</appinfo>
</annotation>
</attribute>
</complexType>
</element>
<element name="editor">
<complexType>
<attribute name="editorName" type="string">
<annotation>
<documentation>
a translatable name that will be used in the UI for this editor
</documentation>
</annotation>
</attribute>
<attribute name="targetLanguage" use="default" value="ALL">
<annotation>
<documentation>
the target language for the editor.
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="ALL">
</enumeration>
<enumeration value="C++">
</enumeration>
<enumeration value="JAVA">
</enumeration>
<enumeration value="OTHER">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
the name of a class that implements org.eclipse.etrice.ui.behavior.actioneditor.IActionCodeEditorFactory.
</documentation>
<appinfo>
<meta.attribute kind="java" basedOn=":org.eclipse.etrice.ui.behavior.actioneditor.IActionCodeEditorFactory"/>
</appinfo>
</annotation>
</attribute>
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
a unique name that will be used to identify this editor
</documentation>
</annotation>
</attribute>
</complexType>
</element>
<annotation>
<appinfo>
<meta.section type="examples"/>
</appinfo>
<documentation>
The following is an example
of an action code editor extension definition:
&lt;p&gt;
&lt;pre&gt;
&lt;extension point=&quot;org.eclipse.etrice.ui.behavior.actionCodeEditor&quot;&gt;
&lt;editor
class=&quot;com.xyz.FancyActionEditorFactory&quot;
editorName=&quot;Fancy Text Editor&quot;
id=&quot;com.xyz.FancyActionEditorFactory&quot;
targetLanguage=&quot;JAVA&quot;&gt;
&lt;/editor&gt;
&lt;/extension&gt;
&lt;/pre&gt;
&lt;/p&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="apiinfo"/>
</appinfo>
<documentation>
The &lt;samp&gt;id&lt;/samp&gt; attribute is a unique name that will be used to identify this editor and must be suuplied.
&lt;p&gt;
The &lt;samp&gt;name&lt;/samp&gt; attribute is a a translatable human-readable name for the editor. It is used at various places in the UI for this editor (like in Preference Pages to select the editor to use for a particular target language). This attribute must be supplied.
&lt;p&gt;
The &lt;samp&gt;class&lt;/samp&gt; attribute is a required attribute. The specified class must implement &lt;samp&gt;org.eclipse.etrice.ui.behavior.actioneditor.IActionCodeEditorFactory&lt;/samp&gt;.
&lt;ul&gt;
&lt;li&gt; It is common practice to &lt;samp&gt;subclass org.eclipse.etrice.ui.behavior.actioneditor.AbstractActionCodeEditor.java&lt;/samp&gt; when defining a new editor type. &lt;/li&gt;
&lt;li&gt; A special implementation of the editor based on JFace SourceViewer &lt;samp&gt;subclass org.eclipse.etrice.ui.behavior.actioneditor.SourceViewerActionCodeEditor.java&lt;/samp&gt; is also available and is highly configurable my means of &lt;samp&gt;org.eclipse.jface.text.source.SourceViewerConfiguration.class&lt;samp&gt; and its subclasses &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
It is also necessary to define a &lt;samp&gt;targetLanguage&lt;/samp&gt; attribute. The possible values for this attribute are :
&lt;ul&gt;
&lt;li&gt; ALL - for all target languages &lt;/li&gt;
&lt;li&gt; Java - for Java &lt;/li&gt;
&lt;li&gt; C++ - for C/C++ &lt;/li&gt;
&lt;li&gt; OTHER - for target languages other than JAVA or C/C++ &lt;/li&gt;
&lt;/ul&gt;
</documentation>
</annotation>
<annotation>
<appinfo>
<meta.section type="copyright"/>
</appinfo>
<documentation>
Copyright (c) 2014 Jayant Gupta.&lt;br&gt;
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 &lt;a
href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
</documentation>
</annotation>
</schema>