« Back to Fachhochschule Nordwestschweiz FHNW

expand / collapse model elements

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
expand / collapse model elements
Answer
5/29/14 1:12 PM
Is it possible to expand / collapse model elements in ADOxx? The following model shows an extension of BPMN with new model elements. I would like to allow the user to decide whether he wants to see the new elements or not. For the elements within the red line it should be possible to decide whether they are shown or not. How can I realize this?
Attachment

Attachments: collapsexpand.jpg (107.9k)

RE: expand / collapse model elements
Answer
6/2/14 7:10 AM as a reply to Patrick Wüest.
In order to accomplish this behaviour you can apply different approaches in ADOxx depending on the interaction planned for the user. Please find hints and examples on the implementation below.

a) View modes
View modes can be defined by model type. A view mode represents a subset of modelling classes/constructs available and can be defined within the library attribute "Modi". When switching the view mode, the classes part of the view mode are available and shown, those excluded are greyed out and not considered in exports and the like (you can also change the behaviour to completely remove them by changing a view mode configuration option in the Modelling Toolkit using the Menu "View" -> "Mode" -> "Display ..." and adapt the settings there)

Details on the implementation of view modes are available at
FAQ: http://www.adoxx.org/live/faq/-/message_boards/message/20030
Documentation: http://www.adoxx.org/live/model-types

b) Variants
Similiar as views, but on object level, resulting in "filtered views" of the model content.
Further details are available at:
FAQ: http://www.adoxx.org/live/faq/-/message_boards/message/110910

c) Subgraph Expand/Shrink
Another option to realize the behaviour related to the "Show submodel" functionality as a context menu on modelled instances (see the "Sub-Process" class for an example implementation). The logic is to move the add-on elements of your model to another modeltype and reference it using a INTERREF attribute on model level.
To realize this functionality, please follow the steps below:
i) Define the INTERREF attribute and include it in the ATTRREP
ii) Define the Model pointer class attribute to hold as a default value the name of the INTERREF attribute
iii) This definition enables the "Show/Hide submodel" funtionality and also the model navigation via "<Ctrl>+double click"

ABL: https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ShowExpandSubModel_ADOxx13UL1/BIN/ExpandShrinkLibrary.abl
ADL: https://www.adoxx.org/svn/all-repo/5_ADOxx_SupportLibraries_ADOxx13UL1/ShowExpandSubModel_ADOxx13UL1/DOC/ExpandShrinkModels.adl