Diagram extension question [message #1776542] |
Fri, 17 November 2017 08:59  |
Eclipse User |
|
|
|
Hello there,
I'm developing a GEMOC solution for a DSL. The GEMOC part is already done and it works pretty good, but I have some questions about Sirius diagram extension mechanism.
The background:
I have a completely functional language, let's call it language A, with Sirius diagrams working pretty good. I needed to extend the metamodel elements to include some properties I will use for GEMOC (the GEMOC part is not important, just giving the context). GEMOC generates the extended language model, classes and adapters, so I have a second language (extended A) also completely functional in terms of metamodeling.
The fact is that I want to define an diagram extension for this extended A, that will (of course) extends the existing diagram definition of language A. In this first moment, I just want to change the color of element borders if a boolean property (hasChanged) is true.
I created, therefore, a new viewpoints specification file (.odesign) with a new viewpoint I called ExtendedA. This viewpoint contains a single element: a diagram extension. That extends an ActivityDiagram present in language A.
This extension contains a single layer, I named it Debug. Debug has a single element: a style customization. The predicate expression is [self.hasChanded/], since it will trigger when the boolean property hasChanged is true.
The style customization also have a single element: a property customization (by selection). Follows a print with the definition of this property customization.

The issue is that the "value selection" field appears empty, and it is always empty. I tried a lot of things but nothing worked. I created a new UserDefinedColor DebugColor and want to use it as the value of borderColor, but the value never appears here.

It is worth highlighting that not every element have this property (hasChanged), just a few. However, Sirius should ignore everyone that doesnt match it, right?
What am I missing?
@edit
I'm using Sirius 5.0.2
Attachment: sirius1.png
(Size: 18.39KB, Downloaded 708 times)
Attachment: sirius2.png
(Size: 6.38KB, Downloaded 607 times)
[Updated on: Fri, 17 November 2017 09:01] by Moderator
|
|
|
|
|
|
|
|
Re: Diagram extension question [message #1776717 is a reply to message #1776558] |
Mon, 20 November 2017 12:31  |
Eclipse User |
|
|
|
Hello,
Yes the property is named "borderColor". You need to select the a style to have the auto-completion if I remember correctly. When I tested it provided me with the choices color, labelColor and borderColor.
Regards,
Steve
|
|
|
Powered by
FUDForum. Page generated in 0.05541 seconds