Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMélanie Bats2017-07-06 14:31:14 +0000
committerPierre-Charles David2017-08-16 09:02:30 +0000
commitc9766c5c3c431ff4773e8448250f48cd34b14270 (patch)
tree4e0a85b45305dee0f4af0c47d82c6e036ae9897a
parent8dd7a071d3557e77bcb06a1585e9ad67aa95120d (diff)
downloadorg.eclipse.sirius-c9766c5c3c431ff4773e8448250f48cd34b14270.tar.gz
org.eclipse.sirius-c9766c5c3c431ff4773e8448250f48cd34b14270.tar.xz
org.eclipse.sirius-c9766c5c3c431ff4773e8448250f48cd34b14270.zip
[519324] Rename the filtering expression variables
All the filtering expression variables were renamed to match the following pattern: featureName+'Description'. Now, when the specifier extends a page he is able to filter the groups with the filtering expression thanks to the groupDescription variable Bug: 519324 Change-Id: Ifd884b4417ada8c635ea7155c292618c5ecffcfa Cherry-picked-from: 519322 Signed-off-by: Mélanie Bats <melanie.bats@obeo.fr> Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.html28
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile6
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html8
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile8
-rw-r--r--plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionPreprocessor.java2
5 files changed, 35 insertions, 17 deletions
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index b3ba879f8b..088400c471 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -16,6 +16,9 @@
<a href="#sirius5.0.2">Changes in Sirius 5.0.2</a>
<ol style="list-style: disc;">
<li>
+ <a href="#SpecifierVisibleChanges">Specifier-Visible Changes</a>
+ </li>
+ <li>
<a href="#DeveloperVisibleChanges">Developer-Visible Changes</a>
</li>
</ol>
@@ -30,7 +33,7 @@
<a href="#UserVisibleChanges">User-Visible Changes</a>
</li>
<li>
- <a href="#SpecifierVisibleChanges">Specifier-Visible Changes</a>
+ <a href="#SpecifierVisibleChanges2">Specifier-Visible Changes</a>
</li>
<li>
<a href="#DeveloperVisibleChanges2">Developer-Visible Changes</a>
@@ -66,7 +69,7 @@
<a href="#UserVisibleChanges4">User-Visible Changes</a>
</li>
<li>
- <a href="#SpecifierVisibleChanges2">Specifier-Visible Changes</a>
+ <a href="#SpecifierVisibleChanges3">Specifier-Visible Changes</a>
</li>
<li>
<a href="#DeveloperVisibleChanges5">Developer-Visible Changes</a>
@@ -80,7 +83,7 @@
<a href="#UserVisibleChanges5">User-Visible Changes</a>
</li>
<li>
- <a href="#SpecifierVisibleChanges3">Specifier-Visible Changes</a>
+ <a href="#SpecifierVisibleChanges4">Specifier-Visible Changes</a>
</li>
<li>
<a href="#DeveloperVisibleChanges6">Developer-Visible Changes</a>
@@ -94,7 +97,7 @@
<a href="#UserVisibleChanges6">User-Visible Changes</a>
</li>
<li>
- <a href="#SpecifierVisibleChanges4">Specifier-Visible Changes</a>
+ <a href="#SpecifierVisibleChanges5">Specifier-Visible Changes</a>
</li>
<li>
<a href="#DeveloperVisibleChanges7">Developer-Visible Changes</a>
@@ -108,6 +111,15 @@
<a href="Release_Notes_Previous.html">the release notes from previous versions</a> for details about older releases.
</p>
<h2 id="sirius5.0.2">Changes in Sirius 5.0.2</h2>
+ <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3>
+ <h4 id="PropertiesViewsDefinitions">Properties Views Definitions</h4>
+ <ul>
+ <li><span class="label label-info">Modified</span> The filtering expression variables available in the properties view definition in the &#8216;Extends&#8217; tab were renamed to match the following pattern:
+ <code>featureName+'Description'</code> (e.g.
+ <code>ifDescription</code>,
+ <code>groupDescription</code>, etc.) to avoid potential conflicts.
+ </li>
+ </ul>
<h3 id="DeveloperVisibleChanges">Developer-Visible Changes</h3>
<h4 id="Migrations">Migrations</h4>
<ul>
@@ -148,7 +160,7 @@
</li>
<li><span class="label label-info">Modified</span> Decorators on diagram elements are drawn on top of other figures. If there is an overlap between a decorator of a figure A and another figure B that is over figure A, when user clicks on the decorator, the figure B is now selected (before it was the parent figure A).</li>
</ul>
- <h3 id="SpecifierVisibleChanges">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> It is now possible to automatically create one or several pre-configured widget(s) in a group if its domain class and if the meta-models of the properties view containing it have been specified. The widget(s) created will be infered from the features in the domain class (e.g. a properly configured
<em>Checkbox</em> widget will be created for boolean attributes).
@@ -829,7 +841,7 @@ SWTBotUtils.waitAllUiEvents();
<em>Ctrl+HOME</em>.
</li>
</ul>
- <h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> It is now possible to inline a copy of the default Properties Views model inside the VSM. This is a copy of the model Sirius would use if no
<em>Properties View Description</em> was specified. It can be used as a starting point for manual customization, or as a complement for elements for which you do not provide any custom rules.
@@ -1303,7 +1315,7 @@ SWTBotUtils.waitAllUiEvents();
<code>Apply Appearance Properties</code> action has been modified to use the last selected element as base style instead of the first one.
</li>
</ul>
- <h3 id="SpecifierVisibleChanges3">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges4">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-success">Added</span> Sirius 4.0 introduces
<strong>experimental</strong> support for specifying the properties views of your modelers directly from inside the VSM. This feature uses the same dynamic approach as for specifying diagrams, tables and trees, with a very flexible configuration language and no code generation involved (including live preview of any change). As of Sirius 4.0, this feature should be considered in an experimental state with details subject to changes until Sirius 4.1, and is not installed by default. To install it, make sure either
@@ -1811,7 +1823,7 @@ SWTBotUtils.waitAllUiEvents();
<em>Arrange Linked Border Nodes</em> as it is border nodes which are layouted and not bordered nodes.
</li>
</ul>
- <h3 id="SpecifierVisibleChanges4">Specifier-Visible Changes</h3>
+ <h3 id="SpecifierVisibleChanges5">Specifier-Visible Changes</h3>
<ul>
<li><span class="label label-info">Modified</span> The
<em>Acceleo Query Language</em> (AQL) interpreter has been improved. AQL, and its support in Sirius, is no longer considered experimental, and instead is now the recommended query language to use for new VSMs. Improvements mostly concern better completion and validation, and more precise error reporting. In particular AQL expressions will now be able to display warnings and errors in the Interpreter view. The message displayed in the Interpreter view after an evaluation has also been improved to display the qualified name of the type of the value computed (
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index f96606ef70..d346204f0f 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -6,6 +6,12 @@ This document contains the release notes for recent major releases of Sirius. Se
h2(#sirius5.0.2). Changes in Sirius 5.0.2
+h3. Specifier-Visible Changes
+
+h4. Properties Views Definitions
+
+* <span class="label label-info">Modified</span> The filtering expression variables available in the properties view definition in the 'Extends' tab were renamed to match the following pattern: @featureName+'Description'@ (e.g. @ifDescription@, @groupDescription@, etc.) to avoid potential conflicts.
+
h3. Developer-Visible Changes
h4. Migrations
diff --git a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html
index 673de23d7f..39b763c1da 100644
--- a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html
+++ b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.html
@@ -1480,12 +1480,12 @@
<li>The
<code>Filter Groups Expression</code> is used to
<strong>filter</strong> which inherited groups are visible under the page. The
- <code>group</code> variable can be used to check if a group must be filtered or not.
+ <code>groupDescription</code> variable can be used to check if a group must be filtered or not.
</li>
<li>The
<code>Filter Validation Rules Expression</code> is used to
<strong>filter</strong> which inherited validation rules are used under the page. The
- <code>validationRule</code> variable can be used to check if a rule must be filtered or not.
+ <code>validationRuleDescription</code> variable can be used to check if a rule must be filtered or not.
</li>
</ul>
<p>Following some examples of the extension mechanism usage are detailed:</p>
@@ -1659,12 +1659,12 @@
<li>The
<code>Filter Groups Expression</code> is used to
<strong>filter</strong> which inherited groups are visible under the page. The
- <code>group</code> variable can be used to check if a group must be filtered or not.
+ <code>groupDescription</code> variable can be used to check if a group must be filtered or not.
</li>
<li>The
<code>Filter Validation Rules Expression</code> is used to
<strong>filter</strong> which inherited validation rules are used under the page. The
- <code>validationRule</code> variable can be used to check if a rule must be filtered or not.
+ <code>validationRuleDescription</code> variable can be used to check if a rule must be filtered or not.
</li>
</ul>
<p>If an element is overridden by many override definitions, the first encountered in the specification is applied.</p>
diff --git a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile
index 7490a76322..3fe7acf334 100644
--- a/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/specifier/properties/Properties_View_Description.textile
@@ -575,8 +575,8 @@ p(#filters). *Filter Expressions.* Different filters exist depending on the elem
If the expression is not specified, all the inherited elements will be visible.
For each _Filter expression_, a variable is available which represents the element which could be filtered. It is possible to filter all the inherited elements by just returning @false@ all the time. In this case, the elements defined under the current description *overrides* the elements defined in the extended description.
For example if a _Page A_ extends another _Page B_, the @Extends@ tab allows to define:
-* The @Filter Groups Expression@ is used to *filter* which inherited groups are visible under the page. The @group@ variable can be used to check if a group must be filtered or not.
-* The @Filter Validation Rules Expression@ is used to *filter* which inherited validation rules are used under the page. The @validationRule@ variable can be used to check if a rule must be filtered or not.
+* The @Filter Groups Expression@ is used to *filter* which inherited groups are visible under the page. The @groupDescription@ variable can be used to check if a group must be filtered or not.
+* The @Filter Validation Rules Expression@ is used to *filter* which inherited validation rules are used under the page. The @validationRuleDescription@ variable can be used to check if a rule must be filtered or not.
Following some examples of the extension mechanism usage are detailed:
* *Reuse widgets*: In this example we want to specify the properties view of a Class and an interface both are defining a name attribute. A _Class Name_ text widget is defined to represent the _Name_ attribute of a _Class_ in the properties view. This widget defines in the _General_ tab:
@@ -632,8 +632,8 @@ p(#filters). *Filter Expressions.* Different filters exist depending on the elem
If the expression is not specified, all the inherited elements will be visible.
For each _Filter expression_, a variable is available which represents the element which could be filtered. It is possible to filter all the inherited elements by just returning @false@ all the time. In this case, the elements defined under the current description *overrides* the elements defined in the extended description.
For example if a _Page A_ extends another _Page B_, the @Extends@ tab allows to define:
-* The @Filter Groups Expression@ is used to *filter* which inherited groups are visible under the page. The @group@ variable can be used to check if a group must be filtered or not.
-* The @Filter Validation Rules Expression@ is used to *filter* which inherited validation rules are used under the page. The @validationRule@ variable can be used to check if a rule must be filtered or not.
+* The @Filter Groups Expression@ is used to *filter* which inherited groups are visible under the page. The @groupDescription@ variable can be used to check if a group must be filtered or not.
+* The @Filter Validation Rules Expression@ is used to *filter* which inherited validation rules are used under the page. The @validationRuleDescription@ variable can be used to check if a rule must be filtered or not.
If an element is overridden by many override definitions, the first encountered in the specification is applied.
diff --git a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionPreprocessor.java b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionPreprocessor.java
index 0c5e75f3d6..1d7aa86b67 100644
--- a/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionPreprocessor.java
+++ b/plugins/org.eclipse.sirius.properties.core/src/org/eclipse/sirius/properties/core/api/DefaultDescriptionPreprocessor.java
@@ -490,7 +490,7 @@ public class DefaultDescriptionPreprocessor<SIRIUS extends EObject> implements I
private Map<String, Object> computeFilterVariables(IVariableManager variableManager, EObject currentDescription, String eStructuralFeatureName) {
Map<String, Object> variables = new HashMap<>();
variables.putAll(variableManager.getVariables());
- String variableName = this.getVariableName(eStructuralFeatureName);
+ String variableName = this.getVariableName(eStructuralFeatureName) + "Description"; //$NON-NLS-1$
variables.put(variableName, currentDescription);
return variables;
}

Back to the top