|
Re: Change appearance of model elements [message #1632499 is a reply to message #1630715] |
Tue, 24 February 2015 10:05 |
|
Le 23/02/2015 11:51, Wilbert Alberts a écrit :
> Hi,
Hi.
> I have created a 'class diagram' like editor. Classes can be put into
> containers. The diagram typically represents the content of such
> container. However a diagram is capable of showing classes from
> different containers (by some kind of an import mechanism).
> Now I would like to have the ability to 'highlight' the imported
> classes. So: default classes are yellow but imported ones are white.
> This I managed with a conditional style.
> The point is that I don't always want to highlight the fact that classes
> are imported. Sometimes I just want to see all classes being yellow. The
> imported ones should become white after I apply a filter or a layer (or
> something else).
>
> What is the preferred way to tackle this?
You could use a Style Customization [1] instead of a conditional style,
ahnd put that customization into a separate, optional layer. Then the
customization would only apply when the layer is enabled.
> Is there a way to modify the appearance of an object via a tool?
You can if you directly modify the style associated to the view, but
this requires knowledge of the Sirius metamodel. Note that if you do
this, for any feature you customize in a view's style you must add the
feature's name to the style's customFeatures attribute, or the
customization will be lost on the next refresh.
[1]
https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#customization
--
Pierre-Charles David - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Pierre-Charles David - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.02578 seconds