Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Questions for an embedded CompareEditor in Papyrus


 Hi,

  Maybe we can let the user choose in preferences between volatile and partially persistent.
 
  For the storage of the model containing your additional data, Papyrus provide a way to clearly separate the model (loaded in memory) and its persistence (stored somewhere).
  So, you should use the ModelSet, and provide your own Model class implementing IModel:
  • Your Model class should provide the high level API requested by your application (avoid low level usage of Resource in your API).
  • Your Model class implementation take in charge the access to the persistence, here the emf Resource.
  • Papyrus provides base class allowing to easily manage your model persistence, and put it in existing files or in a new one

The di file mainly contains data about which editor are available, and how they are shown in the sashwindons.
The notation file contains data for each editor. It can contain data other than the notation one.
The uml file contains model.

  My point of view is that you can either create a new file, or put your data in the notation file.

  Hope this help,

   Cedric


 , It is better to clearly separate the Model usage
LORENZO Vincent a écrit :

Hi all,

  I’m working on the new bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=371606

I should provide a CompareEditor embedded in the sasheditor. This editor will be used when you use the compare action of the ModelExplorer.

I have 2 questions about this developpement :

                - what should be the behaviour of this editor ?

                               - persistent (like Diagram and Table, displayed in the Modelexplorer, …)

                                               -> I think it is not the best way because this editor doesn’t represent a part of the model

                               - volatile

                                               -> we don't store any information about this editor :

- when the user closes it, the editor is « destroyed »

- when the users closes its model or Eclipse, the editor is destroyed

 

                               -partially volatile :

                                               - When the user closes the CompareEditor, all informations are destroyed

                                               - but if the user closes its model whereas a CompareEditor is opened, we store this information.

                                                               -> when the user reopens it model, the CompareEditor is always here.

 

 

What is your opinion about this subject ?

 

- In the case of the « partially volatile » behaviour, I need to store a small EMF model which references the compared EObjects.

                               - In which file should I store this model, .notation or .di) ?

 

Best regards,

--

Vincent Lorenzo

01-69-08-17-24

CEA Saclay Nano-INNOV

Institut CARNOT CEA LIST

DILS/LISE

Point Courrier n° 174

91 191 Gif sur Yvette CEDEX

 

 



_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev

Back to the top