Community
Participate
Working Groups
Currently, Papyrus implements CSS styling for GMF diagrams using a custom resource implementation with a factory registered on the *.notation file extension. In the CDO context, resources are CDOResources; custom resource implementations are not practical. I propose a CSS-engine adapter on resources as an alternative mechanism for CDO resources that persist notation content.
I'll take this on. I have a prototype of a CSS-engine adapter working, that I can contribute.
r9982 on cdo_kepler branch: Committed a CSSNotationResourceAdapter class that adapts any kind of resource (not requiring a CSSNotationResource) to supply the CSSEngine that manages its styling. Clients that would test whether a view is in a resource that is a CSSNotationResource are updated to use a new CSSNotationResource::isCSSEnabled(Resource) utility API, and a static getEngine(Resource) API to get its CSS engine. The adapter attaches itself on-demand to resources that match the same URI criteria (i.e., extension is "notation") that the resource factory uses that is installed in a ModelSet by the CSSNotationModel.
r10380 This enhancement has been merged to the trunk.