Hi Mikaël,
This is quite surprising, since the extension point is read by a
singleton, which should always be the top-level CSS Engine in the
hierarchy (i.e. always active).
The expected hierarchy of CSS Engines is: Diagram > Model
(Resource) > Project > Workspace (Theme/Extension point) >
Base (hard-coded)
Maybe you’re in a situation where you don’t have a project? In
which case the hierarchy might be broken and doesn’t propagate to
the Workspace Theme (This would definitely be a bug, but since this
is a situation which hasn’t been expected, this wouldn’t be too
surprising).
I just looked at the code, and if you don’t have a Project, then
the Workspace CSS Engine is returned instead, so this shouldn’t
break the hierarchy. Then maybe you’re in a case where the diagram
isn’t in a resource? Or a resource which is not a notation
resource? (I see some tests which might be a little bit too
restrictive)
Regards,
Camille
De :
mdt-papyrus.dev-bounces@xxxxxxxxxxx
[mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de
Mikaël Barbero
Envoyé : mercredi 20 août 2014 15:02
À : Papyrus Project list
(mdt-papyrus.dev@xxxxxxxxxxx)
Objet : [mdt-papyrus.dev] Stylesheets contributed
through extension point vs applied directly
I’m trying to display a Papyrus model with stylesheets applied
within a standard GMF viewer (DiagramGraphicalViewer). It
works well for stylesheets applied directly on model elements but
those contributed through extension points do not work
(org.eclipse.papyrus.infra.gmfdiag.css.theme).
What do I have to do to "activate" the stylesheets contributed
through the theme extension point?
Don't you think it would be better if the stylesheets work the same
way whatever how they contributed?
_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev