Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 398692 - [CDO] Support CSS styling without a custom resource implementation
Summary: [CDO] Support CSS styling without a custom resource implementation
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.10.0   Edit
Hardware: PC Mac OS X
: P3 enhancement (vote)
Target Milestone: M6   Edit
Assignee: Christian Damus CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 290952
  Show dependency tree
 
Reported: 2013-01-21 17:37 EST by Christian Damus CLA
Modified: 2013-03-06 11:08 EST (History)
1 user (show)

See Also:
give.a.damus: kepler+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Damus CLA 2013-01-21 17:37:26 EST
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.
Comment 1 Christian Damus CLA 2013-01-21 17:38:50 EST
I'll take this on.  I have a prototype of a CSS-engine adapter working, that I can contribute.
Comment 2 Christian Damus CLA 2013-01-31 16:38:02 EST
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.
Comment 3 Christian Damus CLA 2013-03-06 11:08:02 EST
r10380

This enhancement has been merged to the trunk.