Replies: 2 comments 2 replies
-
By default, in Sirius, the new representations are visible in the Model Explorer: You are in charge of the content of the tree in a Tree Representation (depending on your description in the VSM). In absolute terms, it is possible to customize a tree item having a representation with a custom style (red rectangle in the bellow image). You can also add specific tree item for each representation (blue rectangle in the bellow image). Warning: In this case, your Tree representation relies on other graphical elements (and not on semantic elements). By default, the Sirius refresh mechanism is only "connected" on semantic changes. You probably have to add some specific code to handle a refresh of such elements changes. I think that this documentation can help you. In other words, I managed to display the elements in the example below, but there is no guarantee that everything works in such a context. It would need to be tested more. |
Beta Was this translation helpful? Give feedback.
-
Title :Assigning Unique Icons for Different Diagram Types in Sirius Tree Representation Hello Sirius Team, Thank you for the helpful information provided earlier. Based on your guidance, I successfully displayed "Diag on Package 1" within my custom tree representation. I now have a follow-up question. I am able to create multiple diagram types, such as the two diagrams shown in the attached images (labeled “1” and “2”), but I'm encountering a challenge when trying to assign unique icons to each diagram type. Currently, when I update the icon in the “Representations” feature, it applies universally, updating both diagrams with the same icon. My goal, however, is to display distinct icons for each diagram type, reflecting their unique purposes. Given that the “Diagram Creation” setup allows for specific mappings per diagram type (as illustrated in my attached images), I am hopeful there is a way to manage individual icons per diagram. Could you advise on the best approach for implementing this? Is there specific customization or code that would allow each diagram type to display its unique icon within the tree? Or, alternatively, would a different display method be required to achieve this icon distinction? Thank you very much for your assistance, and I appreciate any guidance or examples you may have. |
Beta Was this translation helpful? Give feedback.
-
Hi Sirius team,
I hope you’re doing well! I have another question regarding the Diagram Creation functionality.
When I use “Diagram Creation on Package1” to create “Diag on Package 1”, is it possible for the newly created diagram to have corresponding elements displayed under the package? This would provide a visual indication to users that “Diag on Package 1” has been created under the package.
For example, when I use the create tool provided by Sirius (as shown in Image 1), I notice that before creating any elements, the "part" section is empty (Image 2). However, after creating a new element (Image 3), the "part" section updates to show the new element.
Similarly, I would like to know if, after creating Diag on Package 1 using Diagram Creation on Package1, it is possible for the name of the newly created diagram to appear under the package, just like the new part shows up after creation (as in Image 3).
Currently, it seems that only two EClasses are displayed under the package, regardless of whether I create a new Diagram using "Diagram Creation on Package1" as shown in Figure 4.
Thank you for your assistance, and I look forward to your guidance on this matter!
Best regards,
hoajie
Beta Was this translation helpful? Give feedback.
All reactions