Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Dumoulin2015-02-12 12:38:06 -0500
committerCedric Dumoulin2015-02-12 16:57:48 -0500
commitcc866c96f7106da9b12cfcb9f02a480190cc431e (patch)
treeb70cce884a11c1d3ec15fa25eb9cddabd5ec1d85
parenta5290e42357e5fef10d87bb358637b54eb4df0c9 (diff)
downloadorg.eclipse.papyrus-cc866c96f7106da9b12cfcb9f02a480190cc431e.tar.gz
org.eclipse.papyrus-cc866c96f7106da9b12cfcb9f02a480190cc431e.tar.xz
org.eclipse.papyrus-cc866c96f7106da9b12cfcb9f02a480190cc431e.zip
Bug 330199: [Layers] Update documentation on RegExp Layers
https://bugs.eclipse.org/bugs/show_bug.cgi?id=330199
-rw-r--r--plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html5
-rw-r--r--plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.mediawiki88
-rw-r--r--plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/createRegExpLayer.pngbin0 -> 21716 bytes
-rw-r--r--plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/writeExpression.pngbin0 -> 7975 bytes
4 files changed, 74 insertions, 19 deletions
diff --git a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html
index cfbff6f7400..c335b620d42 100644
--- a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html
+++ b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html
@@ -1,2 +1,5 @@
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body><h1 id="Using_Derived_Layer_.28OCL_Expression.29">Using Derived Layer (OCL Expression)</h1><p>This tutorial show how to use a Derived Layer.</p><p>A derived layer is a leaf Layer where the views are automatically attached to
-the layer, according to an expression. Actuallty, the expression is expressed in OCL.</p><h2 id="Creating_a_derived_Layer">Creating a derived Layer</h2><h2 id="Writing_an_expression">Writing an expression</h2><h2 id="Expressions_Examples">Expressions Examples</h2><h3 id="All_views_starting_with_a_particular_string">All views starting with a particular string</h3><h3 id="All_classes_that_are_abstract">All classes that are abstract</h3><h3 id="All_classes_containing_an_operation_named_.27abc.27">All classes containing an operation named 'abc'</h3></body></html> \ No newline at end of file
+the layer, according to an expression. Actually, the expression is expressed in OCL.</p><h2 id="Creating_a_derived_Layer">Creating a derived Layer</h2><p>Derived Layer are actually called 'RegExp Layer'.</p><p>To create a derived layer:</p><ul><li>Click on the Layer stack</li><li>Click Layer-&gt;Create Layers ...-&gt;Create RegExp Layer</li></ul><p><img border="0" src="derivedLayerTutorial/createRegExpLayer.png"/></p><p>The new Layer appears under the Layer Stack. You can add Properties to the layer.</p><h2 id="Writing_an_expression">Writing an expression</h2><p>A derived layer is a Layer where views are automatically attached to
+the layer. The expression is used for this purpose.</p><p>Actually, the expression can only be written in OCL.</p><p>The expression is a boolean expression returning true or false. The expression is applied on each <b><i>view</i></b> (ie Shapes and Links) in the diagram. If the expression return true, the corresponding element is attached to the layer. If the expression return false, the element is not attached to the layer.</p><p>The OCL expression has a predefined variable called 'self'. It is the 'view' that must be checked.
+This variable is of type <b><i>notation::View</i></b> . It can be subclassed in <b><i>notation::Shape</i></b> and <b><i>notation::Link</i></b> .</p><p>A view in a uml diagram is always associated to a UML element. This element can be accessed with the expression <b><i>self.element</i></b> .</p><p>The expression is written in the Layer property-&gt;Expr
+<img border="0" src="derivedLayerTutorial/writeExpression.png"/></p><h2 id="Expressions_Examples">Expressions Examples</h2><h3 id="All_Shapes">All Shapes</h3><ul><li>self.oclIsKindOf(Shape)</li></ul><h3 id="All_Classes.2FInterface.2F_...">All Classes/Interface/ ...</h3><ul><li>self.element.oclIsKindOf(uml::NamedElement)</li><li>self.element.oclIsKindOf(uml::Class)</li><li>self.element.oclIsKindOf(uml::Package)</li></ul><h3 id="All_Classes.2FNamedElement.2F..._starting_with_a_particular_string">All Classes/NamedElement/... starting with a particular string</h3><ul><li>self.element.oclAsType(uml::NamedElement).name.startsWith('D') = true</li><li>self.element.oclAsType(uml::Class).name.startsWith('Cl') = true</li><li>self.element.oclAsType(uml::Interface).name.startsWith('I') = true</li></ul><h3 id="and_.2F_or">and / or</h3><ul><li>self.oclIsKindOf(Shape) <b>and</b> self.oclAsType(Shape).visible = true </li></ul><ul><li>self.element.oclIsKindOf(uml::Class) <b>or</b> self.element.oclIsKindOf(uml::Package) </li></ul><h3 id="All_classes_that_are_abstract">All classes that are abstract</h3><ul><li>self.element.oclAsType(uml::Class).isAbstract</li></ul><h3 id="All_classes_containing_an_operation_named_.27op1.27">All classes containing an operation named 'op1'</h3><ul><li>self.element.oclAsType(uml::Class).ownedOperation-&gt;exists( op | op.name = 'op1')</li></ul><p>Also:</p><ul><li>self.element.oclAsType(uml::Class).ownedAttribute-&gt;exists( attr | attr.name = 'name')</li></ul></body></html> \ No newline at end of file
diff --git a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.mediawiki b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.mediawiki
index 0a111453132..583466e2f44 100644
--- a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.mediawiki
+++ b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.mediawiki
@@ -1,18 +1,70 @@
-= Using Derived Layer (OCL Expression) =
-
-This tutorial show how to use a Derived Layer.
-
-A derived layer is a leaf Layer where the views are automatically attached to
-the layer, according to an expression. Actuallty, the expression is expressed in OCL.
-
-== Creating a derived Layer ==
-
-== Writing an expression ==
-
-== Expressions Examples ==
-
-=== All views starting with a particular string ===
-
-=== All classes that are abstract ===
-
-=== All classes containing an operation named 'abc' === \ No newline at end of file
+= Using Derived Layer (OCL Expression) =
+
+This tutorial show how to use a Derived Layer.
+
+A derived layer is a leaf Layer where the views are automatically attached to
+the layer, according to an expression. Actually, the expression is expressed in OCL.
+
+== Tutorial Video ==
+
+A tutorial is available here:
+[http://youtu.be/x6lnWwD47ZI]
+
+== Creating a derived Layer ==
+Derived Layer are actually called 'RegExp Layer'.
+
+To create a derived layer:
+
+* Click on the Layer stack
+* Click Layer->Create Layers ...->Create RegExp Layer
+
+
+[[Image:derivedLayerTutorial/createRegExpLayer.png]]
+
+The new Layer appears under the Layer Stack. You can add Properties to the layer.
+
+== Writing an expression ==
+A derived layer is a Layer where views are automatically attached to
+the layer. The expression is used for this purpose.
+
+Actually, the expression can only be written in OCL.
+
+The expression is a boolean expression returning true or false. The expression is applied on each '''''view''''' (ie Shapes and Links) in the diagram. If the expression return true, the corresponding element is attached to the layer. If the expression return false, the element is not attached to the layer.
+
+The OCL expression has a predefined variable called 'self'. It is the 'view' that must be checked.
+This variable is of type '''''notation::View''''' . It can be subclassed in '''''notation::Shape''''' and '''''notation::Link''''' .
+
+A view in a uml diagram is always associated to a UML element. This element can be accessed with the expression '''''self.element''''' .
+
+The expression is written in the Layer property->Expr
+[[Image:derivedLayerTutorial/writeExpression.png]]
+
+
+== Expressions Examples ==
+
+=== All Shapes ===
+* self.oclIsKindOf(Shape)
+
+=== All Classes/Interface/ ... ===
+* self.element.oclIsKindOf(uml::NamedElement)
+* self.element.oclIsKindOf(uml::Class)
+* self.element.oclIsKindOf(uml::Package)
+
+=== All Classes/NamedElement/... starting with a particular string ===
+* self.element.oclAsType(uml::NamedElement).name.startsWith('D') = true
+* self.element.oclAsType(uml::Class).name.startsWith('Cl') = true
+* self.element.oclAsType(uml::Interface).name.startsWith('I') = true
+
+=== and / or ===
+* self.oclIsKindOf(Shape) '''and''' self.oclAsType(Shape).visible = true
+
+* self.element.oclIsKindOf(uml::Class) '''or''' self.element.oclIsKindOf(uml::Package)
+=== All classes that are abstract ===
+* self.element.oclAsType(uml::Class).isAbstract
+
+=== All classes containing an operation named 'op1' ===
+* self.element.oclAsType(uml::Class).ownedOperation->exists( op | op.name = 'op1')
+
+Also:
+* self.element.oclAsType(uml::Class).ownedAttribute->exists( attr | attr.name = 'name')
+
diff --git a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/createRegExpLayer.png b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/createRegExpLayer.png
new file mode 100644
index 00000000000..e277553b384
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/createRegExpLayer.png
Binary files differ
diff --git a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/writeExpression.png b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/writeExpression.png
new file mode 100644
index 00000000000..81061e0e1a5
--- /dev/null
+++ b/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial/writeExpression.png
Binary files differ

Back to the top