Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html')
-rw-r--r--plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html5
1 files changed, 0 insertions, 5 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
deleted file mode 100644
index c335b620d42..00000000000
--- a/plugins/doc/org.eclipse.papyrus.layers.documentation/guides/tutorials/derivedLayerTutorial.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<?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. 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

Back to the top