adding nodes to the label area [message #1819712] |
Tue, 21 January 2020 20:06 |
Antonio Garmendia Messages: 93 Registered: May 2014 |
Member |
|
|
Hi,
I just recently started working in trying to add new styles to the EcoreTools, specifically, a new visualization for EClasses (Container EC EClass). The goal would be a visualization like the one shown in the following figure
Ideally, the tags "<<Form>>" and "<<Navigation>>" would be nodes and in this way, these nodes may be deleted.
In a first attempt, I tried to import the EC EClass container, but unfortunately I could not configure the style as shown in the previous figure (using only the odesign capabilities).
After that, I tested [1] and [2], but neither of these two options seems to works for me. The first one because the SyleConfiguration it is just installed for nodes (EC EClass is a container), and with the GMF solution I stop trying when I realized that when I add new style to the container, that style will remain for the other layers too.
I would like to know how I can achieve this EClass representation. Any hint? Thanks in advance.
Cheers,
Anthony
[1]https://www.eclipse.org/sirius/doc/developer/extensions-provide_custom_style.html
[2]https://www.ibm.com/support/knowledgecenter/en/SSCLKU_7.5.5/com.ibm.xtools.modeler.doc.isv/prog-guide/cust-shapes.html
|
|
|
|
Re: adding nodes to the label area [message #1820640 is a reply to message #1820605] |
Fri, 24 January 2020 08:37 |
|
Hi,
If you want to rely on Sirius features (but that will not totally feat your needs), I would say that the simplest way is customizing the label provider of the EC Classes mapping to display those stereotypes as labels. You can also add a specific tool to delete those elements but it will not be possible to delete them by direct selection.
You can also add a mapping to display them as list elements. It will be graphically different from what you want and it can be complicated if the mapping does not match with a specific kind of semantic element in your model (if the stereotype node mapping has no corresponding semantic element)
The third solution and the far more complicated one, is to develop your own EditPart with a specific figure by using the GMF API. See https://www.eclipse.org/forums/index.php?t=msg&th=1101480&goto=1818452&#msg_1818452 for instance.
Regards,
Florian
|
|
|
Powered by
FUDForum. Page generated in 0.02812 seconds