Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Papyrus CSS integration into EMF Compare

Hi Arthur,


Thanks for the feedback!

The CSS Component of Papyrus is supposed to work for any resource set/notation model, as long as the method "CSSHelper.installCSSSupport(ResourceSet)" has been invoked before loading any notation resource.

Consequently, the only verification which is required is "CSSHelper.isCSSSupported(ResourceSet)", which doesn't (or shouldn't) require a ModelSet.

However, I think there was an issue with the CDO Integration, which couldn't rely on the CSSNotationResource/CSSNotationResourceFactory, since CDO uses CDOResources. We'll probably have to fix the CSSHelper/CSS Support definition to be properly compatible with any kind of Resource and ResourceSet. Currently, it works in the following cases:

- Random resource set with XMI Notation Resources
- CDO ModelSet with random resources

But the "random resource set with random resources" case hasn't been properly verified.

If EMF Compare relies on a standard ResourceSet and doesn't need a specific implementation of Resource, then using "CSSHelper.installCSSSuport" before loading any resource should be sufficient (CSSNotationResource should be instantiated instead of GMFResource, and the method should never reach the ModelSet-related test)

However, if EMF Compare needs to use some custom resource implementation, the CSSNotationResource implementation can't be used, and we'll need to change the Papyrus implementation a little bit, to support more use cases.


HTH,
Camille

-----Message d'origine-----
De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de adaussy
Envoyé : lundi 8 septembre 2014 10:46
À : Papyrus Project list (mdt-papyrus.dev@xxxxxxxxxxx)
Objet : [mdt-papyrus.dev] Papyrus CSS integration into EMF Compare

Hi Papyrus team,

  I'm working on the integration of Papyrus CSS customization into the Diagram viewer of EMF Compare. After some investigations I have found out that most of the problem are located in the class "CSSNotationResource". In the method "getEngine" there is a protection that prevents the addition of the CSSNotationResrouceAdapter if the ResourceSet is not a ModelSet (see [1]) . Since EMF Compare does not use a ModelSet it can not work. My question is, is this protection mandatory? Do you think that we could remove it or modify it (in order to make it work outside Papyrus)? In order to test it in EMF Compare, I have removed this protection and it almost has corrected all the problems. If you agree that a simple deletion of the protection is enough then I could push a review on this matter. If not, I would like to discuss with you the other alternatives we have.

Regards,

Arthur Daussy

[1]
http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/tree/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css/src/org/eclipse/papyrus/infra/gmfdiag/css/resource/CSSNotationResource.java#n84


_______________________________________________
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


Back to the top