Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2015-03-25 14:03:54 +0000
committerVincent Lorenzo2015-03-30 19:26:59 +0000
commitd6226156b3d79f2c0ed626761e5ff85f31623a04 (patch)
tree89f966f63e3df64ca58fbf262d3e786a0dd9d8a1 /plugins/doc
parent6f622a1f988834fd4904fd90882aa9ba4cc45809 (diff)
downloadorg.eclipse.papyrus-d6226156b3d79f2c0ed626761e5ff85f31623a04.tar.gz
org.eclipse.papyrus-d6226156b3d79f2c0ed626761e5ff85f31623a04.tar.xz
org.eclipse.papyrus-d6226156b3d79f2c0ed626761e5ff85f31623a04.zip
459747: [XText] Papyrus must provides a XText editor for the ValueSpecification + 427136: [Table 2] It should be possible to edit cells representing references using a textual editor Papyrus : add documentation plugin
Diffstat (limited to 'plugins/doc')
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF8
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/about.html28
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/build.properties2
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.properties3
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.xml16
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/pom.xml52
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit-main-toc.xml7
-rwxr-xr-xplugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki311
8 files changed, 427 insertions, 0 deletions
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF
new file mode 100755
index 00000000000..5947b07f4e5
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/META-INF/MANIFEST.MF
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.doc;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/about.html b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/about.html
new file mode 100755
index 00000000000..598b3684879
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>May 12, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/build.properties b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/build.properties
new file mode 100755
index 00000000000..fd42e342729
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/build.properties
@@ -0,0 +1,2 @@
+bin.includes = META-INF/,\
+ plugin.properties
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.properties b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.properties
new file mode 100755
index 00000000000..301255ecc72
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.uml.textedit.doc
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = UML Textual Editors Documentation \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.xml b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.xml
new file mode 100755
index 00000000000..27aed5407a8
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/plugin.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.help.toc">
+ <toc
+ file="target/generated-eclipse-help/textedit-main-toc.xml"
+ primary="false">
+ </toc>
+ <toc
+ file="target/generated-eclipse-help/textedit-toc.xml"
+ primary="false">
+ </toc>
+ </extension>
+
+</plugin>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/pom.xml b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/pom.xml
new file mode 100755
index 00000000000..cb98d555288
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.textedit.doc</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.core.maven</artifactId>
+ <configuration>
+ <sourceFolder>site/mediawiki</sourceFolder>
+ <outputFolder>${project.build.directory}/generated-eclipse-help</outputFolder>
+ <!-- copyrightNotice>${help.copyrightNotice}</copyrightNotice>
+ <title>${help.documentTitle}</title-->
+ <multipleOutputFiles>false</multipleOutputFiles>
+ <navigationImages>true</navigationImages>
+ <formatOutput>true</formatOutput>
+ <htmlFilenameFormat>$1.html</htmlFilenameFormat>
+ <xmlFilenameFormat>$1-toc.xml</xmlFilenameFormat>
+ <helpPrefix>target/generated-eclipse-help</helpPrefix>
+ <!-- stylesheetUrls>
+ <param>styles/main.css</param>
+ </stylesheetUrls-->
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>eclipse-help</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.mylyn.docs</groupId>
+ <artifactId>org.eclipse.mylyn.wikitext.mediawiki.core</artifactId>
+ <version>${mylyn.wikitext.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit-main-toc.xml b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit-main-toc.xml
new file mode 100755
index 00000000000..3fd96fb9660
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit-main-toc.xml
@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<toc label="Textedit" link_to="../org.eclipse.papyrus.infra.doc/toc.xml#PapyrusDocUser">
+ <topic href="target/generated-eclipse-help/textedit.html" label="Textedit">
+ <link toc="target/generated-eclipse-help/textedit-toc.xml"/>
+ <anchor id="textedit"/>
+ </topic>
+</toc>
diff --git a/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.mediawiki
new file mode 100755
index 00000000000..339bd151b6c
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.uml.textedit.doc/site/mediawiki/textedit.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 [[Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Value_Specification_Xtext_editor#Parser_definition|here]].
+===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"
+! 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"
+! 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"
+! 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"
+! 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 (STRL+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 [[Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Textual_Editor_For_NamedElement|here]].
+
+===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"
+! style="font-weight: bold;" | typed text
+! style="font-weight: bold;" | completion proposal
+! style="font-weight: bold;" | explanation
+|-
+| empty string
+| null, ...
+| we look for nothing, so we provide the <code>null</code> value and <code>...</code> to ask to the user to write more text
+|-
+| Clas
+| null,Class1,Class2,Clas,s3
+| 3 classes matches the string, <code>null</code> is always proposed
+|-
+| Class
+| null,Class1,Class2
+| 3 classes matches the string, null is always proposed
+|-
+| 'Clas
+| null, Clas,s3
+| the string starts with a quote and Clas,s3 contains a comma, so we propose <code>Clas,s3</code>; <code>null</code> is always proposed
+|-
+| Clas,
+| null,...
+| 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
+|}

Back to the top