Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2019-09-10 15:23:09 +0000
committerPatrick Tessier2019-09-18 13:51:40 +0000
commit3d68ff1d9a9ced7c142b80206d747ef21a02f399 (patch)
tree52a19559006e86651416381c3c35e1cb3789d219 /plugins/doc
parenta39eec0a3c86af8d5fc476dd42c027b35104cb72 (diff)
downloadorg.eclipse.papyrus-3d68ff1d9a9ced7c142b80206d747ef21a02f399.tar.gz
org.eclipse.papyrus-3d68ff1d9a9ced7c142b80206d747ef21a02f399.tar.xz
org.eclipse.papyrus-3d68ff1d9a9ced7c142b80206d747ef21a02f399.zip
Bug 550902: [Doc] The papyrus embedded documentation must be the same
than the documentation on the wiki - Manage the embedded editors user and developer documentations - Change the reference to embedded editors page in the table documenation Change-Id: I53a27613f991815c94daa9f4f6edab9970f881f3 Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
Diffstat (limited to 'plugins/doc')
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.infra.nattable.doc/src/site/mediawiki/tableUserDoc.mediawiki4
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/plugin.xml24
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-Textual-devDoc.mediawiki72
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-XText-devDoc.mediawiki342
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-devDoc-main-toc.xml12
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc-main-toc.xml7
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc.mediawiki311
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellEditorConfigurationExtensionPoint.pngbin0 -> 16892 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellManagerExtensionPoint.pngbin0 -> 17919 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextAndXWTFiles.pngbin0 -> 18536 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextExtensionPoint.pngbin0 -> 14542 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Property_View.pngbin0 -> 44142 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Table.pngbin0 -> 15097 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Property_View.pngbin0 -> 51905 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Table_View.pngbin0 -> 16494 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/GetDefaultLanguages.pngbin0 -> 6952 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ValueSpecificationXtextDirectEditorConfiguration.pngbin0 -> 61000 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/XWTObjectInstance.pngbin0 -> 43203 bytes
18 files changed, 768 insertions, 4 deletions
diff --git a/plugins/doc/org.eclipse.papyrus.infra.nattable.doc/src/site/mediawiki/tableUserDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.infra.nattable.doc/src/site/mediawiki/tableUserDoc.mediawiki
index e0063f4cc6c..0bfdc078ec4 100755
--- a/plugins/doc/org.eclipse.papyrus.infra.nattable.doc/src/site/mediawiki/tableUserDoc.mediawiki
+++ b/plugins/doc/org.eclipse.papyrus.infra.nattable.doc/src/site/mediawiki/tableUserDoc.mediawiki
@@ -755,8 +755,8 @@ Several kind of cell editors are available in Papyrus Table. Currently, the user
Several kind of cell editors are available:
===String cell editor===
===String with completion cell editor===
-*UML ValueSpecification Cell Editor: This editor allows to edit and create ValueSpecification from a text field. Description is available [[Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Value_Specification_Xtext_editor|here]]
-*UML Reference Cell Editor: This editor allows to edit reference (single or multi valued) using a text field. This editor provides a completion mechanism (using CTRL+SPACE) and validate the string (the string is valid when we are able to find element from the text typed by the user). For further information, please see the page [[Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Textual_Editor_For_NamedElement]]
+*UML ValueSpecification Cell Editor: This editor allows to edit and create ValueSpecification from a text field. Description is available in the '''Papyrus Developer Guide > Embedded Editors > Value Specification Xtext editor''' topic
+*UML Reference Cell Editor: This editor allows to edit reference (single or multi valued) using a text field. This editor provides a completion mechanism (using CTRL+SPACE) and validate the string (the string is valid when we are able to find element from the text typed by the user). For further information, please see the page '''Papyrus Developer Guide > Embedded Editors > Textual Editor For NamedElement'''
but not the other way around. <br/>
The first image illustrates the model and the profile's stereotype, applied on both classes, containing the three attributes activity and classifiers. <br/>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/plugin.xml b/plugins/doc/org.eclipse.papyrus.uml.doc/plugin.xml
index 115be737225..4462e291b81 100644
--- a/plugins/doc/org.eclipse.papyrus.uml.doc/plugin.xml
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/plugin.xml
@@ -11,7 +11,7 @@
file="target/generated-eclipse-help/PapyrusStarterGuide-toc.xml"
primary="false">
</toc>
- <toc
+ <toc
file="target/generated-eclipse-help/namingStrategy-userDoc-main-toc.xml"
primary="false">
</toc>
@@ -23,11 +23,31 @@
file="target/generated-eclipse-help/namingStrategy-devDoc-main-toc.xml"
primary="false">
</toc>
- <toc
+ <toc
file="target/generated-eclipse-help/namingStrategy-devDoc-toc.xml"
primary="false">
</toc>
<toc
+ file="target/generated-eclipse-help/embeddedEditors-userDoc-main-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/embeddedEditors-userDoc-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/embeddedEditors-devDoc-main-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/embeddedEditors-XText-devDoc-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/embeddedEditors-Textual-devDoc-toc.xml"
+ primary="false">
+ </toc>
+ <toc
file="target/generated-eclipse-help/obfuscation-main-toc.xml"
primary="false">
</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-Textual-devDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-Textual-devDoc.mediawiki
new file mode 100644
index 00000000000..e77d17687ad
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-Textual-devDoc.mediawiki
@@ -0,0 +1,72 @@
+=General Presentation=
+Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides a new texutal editor to edit references to UML NamedElement. This editor works only for references which are not in containment.
+This editor has not been developed using XText. it use a custom string parser and the class NameResolutionHelper to find named elements from their name.
+This string editor works for all references multiplicities.
+
+=Grammar=
+* in case of multivalued references, the separator between the name of the element is the comma,
+* if the name contains a comma, the string typed by the user must be prefixed and suffixed by a single quote <code>'</code>.
+
+=Generic Behavior=
+* the value typed by the user are checked and the value is not committed if the named element is not found (an error message is displayed to the user)
+* completion
+**CTRL-SPACE opens a popup providing an helper for the completion
+*** if the text field is empty, the completion provides only the <code><Undefined></code> value and display <code>...</code> to prevent the user than it should type more text.
+*** if more than 15 elements are found to match the string, we display only the 15 first values + <code><Undefined></code> + <code>...</code> to prevent the user than more values are available, opening the dialog
+
+==Usage==
+* This editors allows to find named element typing its name.
+* In case of several elements to found, the separator to use is the comma <code>'</code>
+* If the name of the element contains a comma, you should prefix and suffix its name by a quote <code>'</code>.
+* The value will not be set if the element can't be found is the model
+
+==Example==
+If you have 3 Classes in your model, named <code>Class1</code>, <code>Class2</code> and <code>Clas,s3</code>.
+{| class="wikitable" border="1" cellspacing="0"
+! style="font-weight: bold;" | typed text
+! style="font-weight: bold;" | completion proposal
+! style="font-weight: bold;" | explanation
+|-
+| empty string
+| <Undefined>, ...
+| we look for nothing, so we provide the <code><Undefined></code> value and <code>...</code> to ask to the user to write more text
+|-
+| Clas
+| <Undefined>,Class1,Class2,Clas,s3
+| 3 classes matches the string, <code><Undefined></code> is always proposed
+|-
+| Class
+| <Undefined>,Class1,Class2
+| 3 classes matches the string, <code><Undefined></code>is always proposed
+|-
+| 'Clas
+| <Undefined>, Clas,s3
+| the string starts with a quote and Clas,s3 contains a comma, so we propose <code>Clas,s3</code>; <code><Undefined></code> is always proposed
+|-
+| Clas,
+| <Undefined>,...
+| interpreted as a list of value, the first value is <code>Clas</code>, and we have no information for the second one, for the completion it is an empty string
+|}
+
+=Integration=
+==Property View==
+This editor has been added to the list of available editors for the property view.
+* <code>CompletionStyledTextReferenceDialog</code> to edit single reference value
+** This editor is integrated as a textfield, with additional button to its right
+[[File:images/Editing_the_Type_of_a_Property_in_Property_View.png|Editing the Type of a Property in Property View]]
+* <code>CompletionStyledTextMultiReference</code> to edit multi references values
+**This editor is the <code>MultiReference</code> editor, and we added it the text field for completion
+[[File:images/Editing_the_precondition_of_an_Operation_in_Property_View.png|Editing the precondition of an Operation in Property View]]
+
+==Table==
+Papyrus provide an integration of this editor for Papyrus NatTable. This is the same editor for single and multi references.
+It is a textfield, with a button displayed to its right. This button allows to the user to open the dialog to choose the reference too.
+It allows to the user to edit the cell as text or selected the new value directly in the model tree with the dialog
+*<code>org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor</code>
+**The editor itself for single and multi values
+*<code>org.eclipse.papyrus.uml.nattable.config.UMLSingleReferenceTextualCellEditorWithButtonConfiguration</code>
+**The configuration to use to edit single value. Currently, this editor is not used by default in Papyrus.
+[[File:images/Editing_the_Type_of_a_Property_in_Table.png |Editing the Type of a Property in Table]]
+*<code>org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor</code>
+**The configuration to use to edit multi value. Currently, this editor is not used by default in Papyrus.
+[[File:images/Editing_the_precondition_of_an_Operation_in_Table_View.png|Editing the precondition of an Operation in Table]]
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-XText-devDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-XText-devDoc.mediawiki
new file mode 100644
index 00000000000..a7aa7a7cec5
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-XText-devDoc.mediawiki
@@ -0,0 +1,342 @@
+=General Presentation=
+The Value Specification XText editor uses the [https://wiki.eclipse.org/XText XText] technology.
+
+The textual editor allow to create/edit some types of Value Specification:
+* <code>org.eclipse.uml2.uml.LiteralBoolean</code>
+* <code>org.eclipse.uml2.uml.LiteralUnlimitedNatural</code>
+* <code>org.eclipse.uml2.uml.LiteralInteger</code>
+* <code>org.eclipse.uml2.uml.LiteralReal</code>
+* <code>org.eclipse.uml2.uml.LiteralNull</code>
+* <code>org.eclipse.uml2.uml.LiteralString</code>
+* <code>org.eclipse.uml2.uml.InstanceValue</code>
+* <code>org.eclipse.uml2.uml.OpaqueExpression</code>
+
+
+This fonctionnality is implemented through several plugins:
+* '''org.eclipse.papyrus.uml.textedit.valuespecification.XText''' which contains the grammar of the Value Specification, the generated XText classes and the created class <code>UmlValueSpecificationScopeProvider</code> for the custom scoping of <code>org.eclipse.uml2.uml.InstanceValue</code> displaying the <code>org.eclipse.uml2.uml.InstanceSpecification</code> available in the model.
+* '''org.eclipse.papyrus.uml.textedit.valuespecification.XText.ui''' which contains the generated XText ui classes and the implementation of <code>DefaultXTextDirectEditorConfiguration</code> for the Value Specification edition.
+* '''org.eclipse.papyrus.uml.textedit.valuespecification.XText.utils''' which contains the utils classes for the XText edition of Value Specification and especially the <code>SetCommand</code> of the Value Specification in its container.
+* '''org.eclipse.papyrus.uml.nattable.XText.valuespecification''' which contains the cell editor, the default cell editor configuration and the default cell manager for editing the Value Specification with the XText parser.
+* '''org.eclipse.papyrus.infra.widgets''' which contains the created class <code>StyledTextReferenceDialog</code> that allows do define the component to edit the Value Specification in a widget in the properties view.
+* '''org.eclipse.papyrus.uml.properties.XText''' which allow to define the editor for the XText parser in the properties view.
+* '''org.eclipse.papyrus.uml.textedit.valuespecification.tests''' which contains all the JUnit tests for the XText parser.
+
+=Parser definition=
+The default grammar of the XText parser for the Value Specification is the following:
+
+<code><nowiki>(visibility)? (name'=')? value</nowiki></code>
+
+The values accepted for the differents attributes are the following:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:20%" | Attribute
+! style="width:10%" | Required
+! style="width:60%" | Values accepted
+|-
+| '''visibility'''
+| align="center" | No
+|
+* <code>+</code> (public)
+* <code>#</code> (protected)
+* <code>~</code> (package)
+* <code>-</code> (private)
+|-
+| '''name'''
+| align="center" | No
+| String representing an ID (i.e. XText grammar: <code>'^'?('a'..'z'&#124;'A'..'Z'&#124;'_') ('a'..'z'&#124;'A'..'Z'&#124;'_'&#124;'0'..'9')*</code>)
+|-
+| '''value'''
+| align="center" | Yes
+|
+* <code>true</code> or <code>false</code> (<code>LiteralBoolean</code>)
+* positive integer or <code>*</code>(<code>LiteralUnlimitedNatural</code>)
+* negative integer (<code>LiteralInteger</code>)
+* double (<code>LiteralReal</code>)
+* <code>null</code> (<code>LiteralNull</code>)
+* String with quote (<code>LiteralSting</code>). The quote (') is essential for 2 reasons:
+** The XText parser cannot define the difference between the name representing an <code>InstanceSpecification</code> and a simple string value
+** A Non-valid value won't be defined as an <code>OpaqueExpression</code> without quote but always as a <code>LiteralString</code> value
+* Instance Specification name (<code>InstanceValue</code>)
+* <code><Undefined></code> or empty (<code>null</code>)
+|}
+
+If the text filled is not compatible with the grammar of XText parser, an <code>OpaqueExpression</code> will be created.
+
+
+The XText parser for Value Specification is not restrictive with the text filled, i.e. the different features setted on an existing Value Specification will be kept if possible.
+
+For example: If an existing Value Specification is a <code>LiteralBoolean</code> named 'testBoolean' with the visibility 'public' and the value setted to <code>true</code>, the text <code>+testBoolean=false</code> and <code>false</code> have the same result: the value of <code>LiteralBoolean</code> existing will pass to <code>false</code> (the name and the visilibity don't change).
+
+
+The XText parser reacts differently instead of the type of the Value Specification's container:
+
+==Without defined type on Value Specification's container==
+
+If the type of Value Specification's container is not defined, the default behaviour will be applied.
+
+Here, some examples:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:15%" rowspan="2" | Text filled
+! style="width:20%" rowspan="2" | Namely
+! style="width:65%" rowspan="1" colspan="4" | Created ValueSpecification
+|-
+! style="width:15%" rowspan="1" colspan="1" | Type
+! style="width:8%" rowspan="1" colspan="1" | Visibility
+! style="width:15%" rowspan="1" colspan="1" | Name
+! style="width:27%" rowspan="1" colspan="1" | Value
+|-
+| rowspan="2" | +testInstanceValue=InstanceSpec1
+| 'InstanceSpec1' is an <code>InstanceSpecification</code> existing in the model
+| <code>InstanceValue</code>
+| public
+| testInstanceValue
+| 'instance' attribute of <code>InstanceValue</code> is a reference to the existing <code>InstanceSpecification</code> named 'InstanceSpec1'
+|-
+| No <code>InstanceSpecification</code> exist in the model
+| <code>OpaqueExpression</code>
+| public
+| +testInstanceValue=InstanceSpec1
+|
+|-
+| +testBoolean=true
+|
+| <code>LiteralBoolean</code>
+| public
+| testBoolean
+| <code>true</code>
+|-
+| #testUnlimitedNatural=5
+|
+| <code>LiteralUnlimitedNatural</code>
+| protected
+| testUnlimitedNatural
+| 5
+|-
+| ~testInteger=-8
+|
+| <code>LiteralInteger</code>
+| package
+| testInteger
+| -8
+|-
+| -testReal=12.34
+|
+| <code>LiteralReal</code>
+| private
+| testReal
+| 12.34
+|-
+| ~testNull=null
+|
+| <code>LiteralNull</code>
+| package
+| testNull
+| <code>null</code>
+|-
+| -testString="foo"
+|
+| <code>LiteralString</code>
+| private
+| testString
+| foo
+|-
+| ##testString="foo"
+|
+| <code>OpaqueExpression</code>
+| public
+| ##testString="foo"
+|
+|}
+
+==With defined type on Value Specification's container==
+
+If the type of Value Specification's container is setted, the same text filled will be have different behaviour depending to the type. In fact, the value filled must be consistent to the type, otherwise an <code>OpaqueExpression</code> will be created.
+
+The different types corresponding to <code>LiteralSpecification</code> are the following:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:50%" | LiteralSpecification
+! style="width:50%" | Types corresponding
+|-
+| <code>LiteralBoolean</code>
+|
+* JavaPrimitiveTypes::boolean
+* EcorePrimitiveTypes::EBoolean
+* EcorePrimitiveTypes::EBooleanObject
+* PrimitiveTypes::Boolean
+* XMLPrimitiveTypes::Boolean
+* XMLPrimitiveTypes::BooleanObject
+|-
+| <code>LiteralUnlimitedNatural</code>
+|
+* PrimitiveTypes::UnlimitedNatural
+|-
+| <code>LiteralInteger</code>
+|
+* JavaPrimitiveTypes::int
+* EcorePrimitiveTypes::EInt
+* EcorePrimitiveTypes::EIntegerObject
+* PrimitiveTypes::Integer
+* XMLPrimitiveTypes::Int
+* XMLPrimitiveTypes::Integer
+* XMLPrimitiveTypes::IntObject
+|-
+| <code>LiteralReal</code>
+|
+* JavaPrimitiveTypes::double
+* EcorePrimitiveTypes::EDouble
+* EcorePrimitiveTypes::EDoubleObject
+* PrimitiveTypes::Real
+* XMLPrimitiveTypes::Double
+* XMLPrimitiveTypes::DoubleObject
+|-
+| <code>LiteralString</code>
+|
+* EcorePrimitiveTypes::EString
+* PrimitiveTypes::String
+* XMLPrimitiveTypes::String
+|}
+
+Here, some examples:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:15%" rowspan="2" | Text filled
+! style="width:20%" rowspan="2" | Value Specification's container type
+! style="width:65%" rowspan="1" colspan="4" | Created ValueSpecification
+|-
+! style="width:15%" rowspan="1" colspan="1" | Type
+! style="width:8%" rowspan="1" colspan="1" | Visibility
+! style="width:15%" rowspan="1" colspan="1" | Name
+! style="width:27%" rowspan="1" colspan="1" | Value
+|-
+| rowspan="2" | +testBoolean=true
+| PrimitiveTypes::Boolean
+| <code>LiteralBoolean</code>
+| public
+| testBoolean
+| <code>true</code>
+|-
+| PrimitiveTypes::Integer
+| <code>OpaqueExpression</code>
+| public
+| +testBoolean=true
+|
+|-
+| rowspan="4" | -testUnlimitedNatural=8
+| PrimitiveTypes::UnlimitedNatural
+| <code>LiteralUnlimitedNatural</code>
+| private
+| testUnlimitedNatural
+| 8
+|-
+| PrimitiveTypes::Integer
+| <code>LiteralInteger</code>
+| private
+| testUnlimitedNatural
+| 8
+|-
+| PrimitiveTypes::Real
+| <code>LiteralReal</code>
+| private
+| testUnlimitedNatural
+| 8.0
+|-
+| PrimitiveTypes::Boolean
+| <code>OpaqueExpression</code>
+| public
+| -testUnlimitedNatural=8
+|
+|-
+| rowspan="4" | #testInteger=-6
+| PrimitiveTypes::UnlimitedNatural
+| <code>OpaqueExpression</code>
+| public
+| #testInteger=6
+|
+|-
+| PrimitiveTypes::Integer
+| <code>LiteralInteger</code>
+| protected
+| testInteger
+| 6
+|-
+| PrimitiveTypes::Real
+| <code>LiteralReal</code>
+| protected
+| testInteger
+| 6.0
+|-
+| PrimitiveTypes::Boolean
+| <code>OpaqueExpression</code>
+| public
+| #testInteger=6
+|
+|-
+| rowspan="3" | -testReal=4.5
+| PrimitiveTypes::Integer
+| <code>OpaqueExpression</code>
+| public
+| -testReal=4.5
+|
+|-
+| PrimitiveTypes::Real
+| <code>LiteralReal</code>
+| private
+| testReal
+| 4.5
+|}
+
+=Papyrus integration=
+==Direct editor configuration==
+The Direct Editor Condiguration allow to define a new cirect editor for Papyrus. This define the object type to edit and the editor configuration class used for the integration of editor.
+For the Value Specification XText editor, a default Direct Editor Configuration is already defined: <code>ValueSpecificationXTextDirectEditorConfiguration</code> which allow to manage the type <code>org.eclipse.uml2.uml.ValueSpecification</code>.
+
+[[File:images/ValueSpecificationXtextDirectEditorConfiguration.png]]
+
+===Manage the default languages of created OpaqueExpression===
+To redefine the default languages used by created <code>OpaqueExpression</code> by the properties widget, a class extending the <code>ValueSpecificationXTextDirectEditorConfiguration</code> must be created and the method <code>getDefaultLanguages()</code> must be override.
+
+[[File:images/getDefaultLanguages.png]]
+
+Then, this created direct editor configuration must be referenced in the <code>org.eclipse.papyrus.extensionpoints.editors.DirectEditor</code> extension point with a higher priority than the default (Lowest).
+
+==Properties integration==
+===Define the context and the xwt files===
+The context file allow to define the field available in the properties view. To define the field which will be displayed in the properties view with XText parser and completion, the <code>UMLStyledTextReferenceDialog</code> will be used.
+
+This class contains a <code>UMLXTextReferenceValueEditor</code> which contains a <code>StyledText</code> for the text fill and <code>StyledTextXTextAdapter</code> to manage the XText parser and completion.
+
+Here, an example of context and xwt file for the default value of property object:
+
+[[File:images/ContextAndXWTFiles.png]]
+
+In the PropertyEditor created, an attribute <code>directEditorConfiguration</code> will be implemented to define the direct editor configuration class to use for the edited object:
+
+[[File:images/XWTObjectInstance.png|1500px]]
+
+The context file must be referenced in the <code>org.eclipse.papyrus.views.properties.context</code> extension point:
+
+[[File:images/ContextExtensionPoint.png]]
+
+==Cell of NatTable integration==
+===Define the cell editor configuration===
+A default cell editor configuration already exists for the Value Specification: <code>ValueSpecificationCellEditorConfiguration</code>. But to get the possible XText parser and completion in cell of NatTable, the cell editor configuration must be extended and the created class must be referenced in the <code>org.eclipse.papyrus.infra.nattable.celleditor.configuration</code> extension point with an inferior order than the others.
+
+Here, an example:
+
+[[File:images/CellEditorConfigurationExtensionPoint.png]]
+
+===Define the cell manager===
+A default cell manager already exists for the Value Specification: <code>ValueSpecificationCellManager</code>. But to get the possible XText parser and completion in call of NatTable, the cell manager must be extended and the created class must be referenced in the <code>org.eclipse.papyrus.infra.nattable.cellmanager</code> extention point with an inferior order than the others.
+
+Here, an example:
+
+[[File:images/CellManagerExtensionPoint.png]]
+
+====Manage the default languages of created OpaqueExpression====
+To redefine the default languages used by created <code>OpaqueExpression</code> by the cell editor, the method <code>getDefaultLanguages()</code> must be overridden in the class extended from <code>ValueSpecificationCellManager</code>.
+
+[[File:images/getDefaultLanguages.png]]
+
+[[Category:Papyrus]]
+
+=Example=
+*The plugin <code>org.eclipse.papyrus.uml.textual.editors.example</code> provide an example of integration of this editor in the table and in the property view to edit the default value of a property.
+*A video is available here https://www.youtube.com/watch?v=OERg0BUZmyU&feature=youtu.be
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-devDoc-main-toc.xml b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-devDoc-main-toc.xml
new file mode 100644
index 00000000000..3e68edf3014
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-devDoc-main-toc.xml
@@ -0,0 +1,12 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Papyrus Embedded Editors" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocDev">
+ <topic label="Embedded Editors">
+ <anchor id="EmbeddedEditorsDev"/>
+ <topic label="Value Specification Xtext editor">
+ <link toc="target/generated-eclipse-help/embeddedEditors-XText-devDoc-toc.xml"/>
+ </topic>
+ <topic label="Textual Editor For NamedElement">
+ <link toc="target/generated-eclipse-help/embeddedEditors-Textual-devDoc-toc.xml"/>
+ </topic>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc-main-toc.xml b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc-main-toc.xml
new file mode 100644
index 00000000000..c31f301d00d
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc-main-toc.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Papyrus Embedded Editors" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusTipsAndTricks">
+ <topic label="Embedded Editors">
+ <anchor id="EmbeddedEditors"/>
+ <link toc="target/generated-eclipse-help/embeddedEditors-userDoc-toc.xml"/>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc.mediawiki b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc.mediawiki
new file mode 100644
index 00000000000..d3c358fde65
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/embeddedEditors-userDoc.mediawiki
@@ -0,0 +1,311 @@
+=Embedded Editors=
+Papyrus provides embedded editors to edit UML Elements. Of course these editors allows to edit the name of the elements, but they allow to edit much more than this.
+
+==UML ValueSpecification editor==
+This editor allows to edit UMLValueSpecification. ValueSpecifications are used to define the default value of a Property or to define the multiplicity of a MultiplicityElement (lower and upper values).
+Papyrus provides an Xtext Editor for UML ValueSpecification. This editor provides completion (CTRL+SPACE) to help the user to define the value to set crossing easily the model.
+
+You can use this editors in Papyrus table or in papyrus Property View for example.
+
+The developer documentation for this editors is available in the '''Papyrus Developer Guide > Embedded Editors > Value Specification Xtext editor''' topic.
+===Usage===
+The default grammar of the XText parser for the Value Specification is the following:
+
+<code><nowiki>(visibility)? (name'=')? value</nowiki></code>
+
+The values accepted for the differents attributes are the following:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:20%" | Attribute
+! style="width:10%" | Required
+! style="width:60%" | Values accepted
+|-
+| '''visibility'''
+| align="center" | No
+|
+* <code>+</code> (public)
+* <code>#</code> (protected)
+* <code>~</code> (package)
+* <code>-</code> (private)
+|-
+| '''name'''
+| align="center" | No
+| String representing an ID (i.e. XText grammar: <code>'^'?('a'..'z'&#124;'A'..'Z'&#124;'_') ('a'..'z'&#124;'A'..'Z'&#124;'_'&#124;'0'..'9')*</code>)
+|-
+| '''value'''
+| align="center" | Yes
+|
+* <code>true</code> or <code>false</code> (<code>LiteralBoolean</code>)
+* positive integer (<code>LiteralUnlimitedNatural</code>)
+* negative integer (<code>LiteralInteger</code>)
+* double (<code>LiteralReal</code>)
+* <code>null</code> (<code>LiteralNull</code>)
+* String with quote (<code>LiteralSting</code>). The quote (') is essential for 2 reasons:
+** The XText parser cannot define the difference between the name representing an <code>InstanceSpecification</code> and a simple string value
+** A Non-valid value won't be defined as an <code>OpaqueExpression</code> without quote but always as a <code>LiteralString</code> value
+* Instance Specification name (<code>InstanceValue</code>)
+* <code><Undefined></code> or empty (<code>null</code>)
+|}
+
+If the text filled is not compatible with the grammar of XText parser, an <code>OpaqueExpression</code> will be created.
+
+
+The XText parser for Value Specification is not restrictive with the text filled, i.e. the different features setted on an existing Value Specification will be kept if possible.
+
+For example: If an existing Value Specification is a <code>LiteralBoolean</code> named 'testBoolean' with the visibility 'public' and the value setted to <code>true</code>, the text <code>+testBoolean=false</code> and <code>false</code> have the same result: the value of <code>LiteralBoolean</code> existing will pass to <code>false</code> (the name and the visilibity don't change).
+
+
+The XText parser reacts differently instead of the type of the Value Specification's container:
+
+====Example: Without defined type on Value Specification's container====
+
+If the type of Value Specification's container is not defined, the default behaviour will be applied.
+
+Here, some examples:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:15%" rowspan="2" | Text filled
+! style="width:20%" rowspan="2" | Namely
+! style="width:65%" rowspan="1" colspan="4" | Created ValueSpecification
+|-
+! style="width:15%" rowspan="1" colspan="1" | Type
+! style="width:8%" rowspan="1" colspan="1" | Visibility
+! style="width:15%" rowspan="1" colspan="1" | Name
+! style="width:27%" rowspan="1" colspan="1" | Value
+|-
+| rowspan="2" | +testInstanceValue=InstanceSpec1
+| 'InstanceSpec1' is an <code>InstanceSpecification</code> existing in the model
+| <code>InstanceValue</code>
+| public
+| testInstanceValue
+| 'instance' attribute of <code>InstanceValue</code> is a reference to the existing <code>InstanceSpecification</code> named 'InstanceSpec1'
+|-
+| No <code>InstanceSpecification</code> exist in the model
+| <code>OpaqueExpression</code>
+| public
+| +testInstanceValue=InstanceSpec1
+|
+|-
+| +testBoolean=true
+|
+| <code>LiteralBoolean</code>
+| public
+| testBoolean
+| <code>true</code>
+|-
+| #testUnlimitedNatural=5
+|
+| <code>LiteralUnlimitedNatural</code>
+| protected
+| testUnlimitedNatural
+| 5
+|-
+| ~testInteger=-8
+|
+| <code>LiteralInteger</code>
+| package
+| testInteger
+| -8
+|-
+| -testReal=12.34
+|
+| <code>LiteralReal</code>
+| private
+| testReal
+| 12.34
+|-
+| ~testNull=null
+|
+| <code>LiteralNull</code>
+| package
+| testNull
+| <code>null</code>
+|-
+| -testString="foo"
+|
+| <code>LiteralString</code>
+| private
+| testString
+| foo
+|-
+| ##testString="foo"
+|
+| <code>OpaqueExpression</code>
+| public
+| ##testString="foo"
+|
+|}
+
+====Example: With defined type on Value Specification's container====
+
+If the type of Value Specification's container is setted, the same text filled will be have different behaviour depending to the type. In fact, the value filled must be consistent to the type, otherwise an <code>OpaqueExpression</code> will be created.
+
+The different types corresponding to <code>LiteralSpecification</code> are the following:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:50%" | LiteralSpecification
+! style="width:50%" | Types corresponding
+|-
+| <code>LiteralBoolean</code>
+|
+* JavaPrimitiveTypes::boolean
+* EcorePrimitiveTypes::EBoolean
+* EcorePrimitiveTypes::EBooleanObject
+* PrimitiveTypes::Boolean
+* XMLPrimitiveTypes::Boolean
+* XMLPrimitiveTypes::BooleanObject
+|-
+| <code>LiteralUnlimitedNatural</code>
+|
+* PrimitiveTypes::UnlimitedNatural
+|-
+| <code>LiteralInteger</code>
+|
+* JavaPrimitiveTypes::int
+* EcorePrimitiveTypes::EInt
+* EcorePrimitiveTypes::EIntegerObject
+* PrimitiveTypes::Integer
+* XMLPrimitiveTypes::Int
+* XMLPrimitiveTypes::Integer
+* XMLPrimitiveTypes::IntObject
+|-
+| <code>LiteralReal</code>
+|
+* JavaPrimitiveTypes::double
+* EcorePrimitiveTypes::EDouble
+* EcorePrimitiveTypes::EDoubleObject
+* PrimitiveTypes::Real
+* XMLPrimitiveTypes::Double
+* XMLPrimitiveTypes::DoubleObject
+|-
+| <code>LiteralString</code>
+|
+* EcorePrimitiveTypes::EString
+* PrimitiveTypes::String
+* XMLPrimitiveTypes::String
+|}
+
+Here, some examples:
+{| class="wikitable" border="1" cellspacing="0"
+! style="width:15%" rowspan="2" | Text filled
+! style="width:20%" rowspan="2" | Value Specification's container type
+! style="width:65%" rowspan="1" colspan="4" | Created ValueSpecification
+|-
+! style="width:15%" rowspan="1" colspan="1" | Type
+! style="width:8%" rowspan="1" colspan="1" | Visibility
+! style="width:15%" rowspan="1" colspan="1" | Name
+! style="width:27%" rowspan="1" colspan="1" | Value
+|-
+| rowspan="2" | +testBoolean=true
+| PrimitiveTypes::Boolean
+| <code>LiteralBoolean</code>
+| public
+| testBoolean
+| <code>true</code>
+|-
+| PrimitiveTypes::Integer
+| <code>OpaqueExpression</code>
+| public
+| +testBoolean=true
+|
+|-
+| rowspan="4" | -testUnlimitedNatural=8
+| PrimitiveTypes::UnlimitedNatural
+| <code>LiteralUnlimitedNatural</code>
+| private
+| testUnlimitedNatural
+| 8
+|-
+| PrimitiveTypes::Integer
+| <code>LiteralInteger</code>
+| private
+| testUnlimitedNatural
+| 8
+|-
+| PrimitiveTypes::Real
+| <code>LiteralReal</code>
+| private
+| testUnlimitedNatural
+| 8.0
+|-
+| PrimitiveTypes::Boolean
+| <code>OpaqueExpression</code>
+| public
+| -testUnlimitedNatural=8
+|
+|-
+| rowspan="4" | #testInteger=-6
+| PrimitiveTypes::UnlimitedNatural
+| <code>OpaqueExpression</code>
+| public
+| #testInteger=6
+|
+|-
+| PrimitiveTypes::Integer
+| <code>LiteralInteger</code>
+| protected
+| testInteger
+| 6
+|-
+| PrimitiveTypes::Real
+| <code>LiteralReal</code>
+| protected
+| testInteger
+| 6.0
+|-
+| PrimitiveTypes::Boolean
+| <code>OpaqueExpression</code>
+| public
+| #testInteger=6
+|
+|-
+| rowspan="3" | -testReal=4.5
+| PrimitiveTypes::Integer
+| <code>OpaqueExpression</code>
+| public
+| -testReal=4.5
+|
+|-
+| PrimitiveTypes::Real
+| <code>LiteralReal</code>
+| private
+| testReal
+| 4.5
+|}
+
+==Textual Editor For Named Element==
+Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides a new texutal editor to edit references to UML NamedElement. This editor works only for references which are not in containment. This editor has not been developed using XText. It use a custom string parser and provide a completion (CTRL+SPACE) to help the user to find the named elements to reference in the model.
+
+You can use this editor in Property View or in Papyrus table for example.
+Developer documentation is available in the '''Papyrus Developer Guide > Embedded Editors > Textual Editor For NamedElement''' topic.
+
+===Usage===
+* This editors allows to find named element typing its name.
+* In case of several elements to found, the separator to use is the comma <code>'</code>
+* If the name of the element contains a comma, you should prefix and suffix its name by a quote <code>'</code>.
+* The value will not be set if the element can't be found is the model
+
+===Example===
+If you have 3 Classes in your model, named <code>Class1</code>, <code>Class2</code> and <code>Clas,s3</code>.
+{| class="wikitable" border="1" cellspacing="0"
+! style="font-weight: bold;" | typed text
+! style="font-weight: bold;" | completion proposal
+! style="font-weight: bold;" | explanation
+|-
+| empty string
+| <Undefined>, ...
+| we look for nothing, so we provide the <code><Undefined></code> value and <code>...</code> to ask to the user to write more text
+|-
+| Clas
+| <Undefined>,Class1,Class2,Clas,s3
+| 3 classes matches the string, <code><Undefined></code> is always proposed
+|-
+| Class
+| <Undefined>,Class1,Class2
+| 3 classes matches the string, <Undefined>is always proposed
+|-
+| 'Clas
+| <Undefined>, Clas,s3
+| the string starts with a quote and Clas,s3 contains a comma, so we propose <code>Clas,s3</code>; <code><Undefined></code> is always proposed
+|-
+| Clas,
+| <Undefined>,...
+| interpreted as a list of value, the first value is <code>Clas</code>, and we have no information for the second one, for the completion it is an empty string
+|} \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellEditorConfigurationExtensionPoint.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellEditorConfigurationExtensionPoint.png
new file mode 100644
index 00000000000..65daebf6832
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellEditorConfigurationExtensionPoint.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellManagerExtensionPoint.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellManagerExtensionPoint.png
new file mode 100644
index 00000000000..77b3ffaae00
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/CellManagerExtensionPoint.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextAndXWTFiles.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextAndXWTFiles.png
new file mode 100644
index 00000000000..9b408fc78ed
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextAndXWTFiles.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextExtensionPoint.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextExtensionPoint.png
new file mode 100644
index 00000000000..1c086bba775
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ContextExtensionPoint.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Property_View.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Property_View.png
new file mode 100644
index 00000000000..7081c3d2e20
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Property_View.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Table.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Table.png
new file mode 100644
index 00000000000..413f08c0166
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_Type_of_a_Property_in_Table.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Property_View.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Property_View.png
new file mode 100644
index 00000000000..ee2fa462687
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Property_View.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Table_View.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Table_View.png
new file mode 100644
index 00000000000..629131ce24a
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/Editing_the_precondition_of_an_Operation_in_Table_View.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/GetDefaultLanguages.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/GetDefaultLanguages.png
new file mode 100644
index 00000000000..f798da4c8ef
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/GetDefaultLanguages.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ValueSpecificationXtextDirectEditorConfiguration.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ValueSpecificationXtextDirectEditorConfiguration.png
new file mode 100644
index 00000000000..335d9835b15
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/ValueSpecificationXtextDirectEditorConfiguration.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/XWTObjectInstance.png b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/XWTObjectInstance.png
new file mode 100644
index 00000000000..1ffd38e03a2
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.doc/resource/images/XWTObjectInstance.png
Binary files differ

Back to the top