|Re: Property view: overriding / dynamic grouping / expert settings [message #1769246 is a reply to message #1769105]
||Fri, 28 July 2017 08:13
| Stephane Begaudeau
Registered: April 2010
Location: Nantes (France)
1. There are two ways to do this each with its advantages and drawbacks.
The first way would be to create a page with a group and a for dynamic mapping, then extend the dynamic mapping for from the default rules. In your for dynamic mapping, use a filter expression to filter the if dynamic mapping for the enumeration. It is the most efficient way to do this but if we modify the default rules, your result will be modified too (which would give you the new behavior of the default rules but that may not be what you want)
The other way would be to directly import the default rules and change the default rules directly (but if we change the behavior of the default rules, you would not see any changes)
I would not recommend using the override here. The override is an advanced mechanism created for those who want to "patch" the Properties view definition in an odesign that they do not maintain by themselves (for example if you wanted to customize the odesign of ecore tools or capella).
2. You can somewhat do that but it is quite an advanced situation. Since everything in a group and a page can be configured dynamically, you can have only one definition of a page and one of a group which can be configured to create multiple pages and groups as necessary depending on the situation. It would require playing with the semantic candidate expressions of both the page and the group along with an advanced usage of the dynamic mapping.
3. With dynamic mappings and semantic candidate expressions and preconditions you could create a basic/expert user interface, you could have preconditions in your dynamic mappings, groups and pages to show/hide widgets depending on the value of some preference (I think someone already did it depending on the current perspective). Unfortunately you cannot show/hide toolbar actions conditionally.
Stephane Begaudeau, Obeo
Powered by FUDForum
. Page generated in 0.02087 seconds