Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
milagrosn Absent Member.
Absent Member.
1343 views

GenDoc Hidden elements

What is the OCL expression in gendoc that would filter out elements on the diagram that are Hidden?

We have a diagram which contains Visible elements but hidden elements within itself. These elements are Components and sub-components within itself. Some are Hidden, others appear on the diagram.

Milagros

0 Likes
1 Reply
Micro Focus Contributor
Micro Focus Contributor

RE: GenDoc Hidden elements

context uml::together::Diagram

self.children->select(not hidden)->union(self.children.children->select((not hidden)and element.oclIsKindOf(uml::together::Node) ))

will return a list of all non-hidden nodes from current diagram;

context uml::together::Diagram

self.children->select(not hidden)

Will return all top-level visible nodes

This can't be used as a filter expression, as you need to have a diagram in context; rather it can be used as a 'programmed' iteration scope for iterator nested in diagrams iterator.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.