[571427] Replace override with a more direct conditional widget

The previous solution (in 1dcea7903c636a2e8962671d0f7e748a2a10ed9f)
used an override to add a new widget inside the "default_rules" when
on an EClassifier. This works for EClassifiers, but for all other
kinds of elements on which "default_rules" is also used, the override
produces a completely empty page.

Instead, use a dynamic if directly inside "default_rules" to
contribute the widget when on an EClassifier without side-effects on
other types of elements.

"Dynamic If" can not be used directly inside the group definition, but
this can be worked around using a "Dyanmic For" which iterates on a
single value (self).

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=571427
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
diff --git a/org.eclipse.emf.ecoretools.design/description/ecore.odesign b/org.eclipse.emf.ecoretools.design/description/ecore.odesign
index cde124c..5c5ec59 100644
--- a/org.eclipse.emf.ecoretools.design/description/ecore.odesign
+++ b/org.eclipse.emf.ecoretools.design/description/ecore.odesign
@@ -1543,6 +1543,15 @@
             </widget>
           </ifs>
         </controls>
+        <controls xsi:type="properties:DynamicMappingForDescription" name="conditional_select_icon" iterator="element" iterableExpression="aql:self">
+          <ifs name="show_select_icon_on_eclassifier" predicateExpression="aql:element.oclIsKindOf(ecore::EClassifier)">
+            <widget xsi:type="properties:ButtonDescription" name="selectIcon" labelExpression="Associated Icon:" helpExpression="Click on button to select a 16x16 icon. Note that the edit plugin must be generated before." isEnabledExpression="aql:self.eInverse(genmodel::GenClass).getEClassItemIconPath()->first().isAccessible()" imageExpression="aql:self.eInverse(genmodel::GenClass).getEClassItemIconPath()->first()">
+              <initialOperation>
+                <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.eInverse(genmodel::GenClass).getEClassItemIconPath()->first().selectIcon()"/>
+              </initialOperation>
+            </widget>
+          </ifs>
+        </controls>
         <style barStyle="NO_TITLE" toggleStyle="NONE" expandedByDefault="true"/>
         <conditionalStyles preconditionExpression="aql:self.removeSemanticElementsToHide(input.getAllSemanticElements(),input.context().semanticDecorator())->size() > 1">
           <style toggleStyle="NONE" expandedByDefault="true"/>
@@ -1830,13 +1839,6 @@
           </initialOperation>
         </actions>
       </groups>
-      <overrides xsi:type="properties:GroupOverrideDescription" name="eclass icon" domainClass="ecore::EClassifier" overrides="//@extensions.0/@categories.0/@groups.0">
-        <controls xsi:type="properties:ButtonDescription" name="selectIcon" labelExpression="Associated Icon:" helpExpression="Click on button to select a 16x16 icon. Note that the edit plugin must be generated before." isEnabledExpression="aql:self.eInverse(genmodel::GenClass).getEClassItemIconPath()->first().isAccessible()" imageExpression="aql:self.eInverse(genmodel::GenClass).getEClassItemIconPath()->first()">
-          <initialOperation>
-            <firstModelOperations xsi:type="tool:ChangeContext" browseExpression="aql:self.eInverse(genmodel::GenClass).getEClassItemIconPath()->first().selectIcon()"/>
-          </initialOperation>
-        </controls>
-      </overrides>
     </categories>
   </extensions>
 </description:Group>