Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-incubator-e4-dev] YAMI (Yet Another Model Interface)

Boris Bokowski wrote:
Michael Scharf wrote:
 > Ok, let's do a simple validity test. How would an EMF based YAMI solution
 > replace the following IMemento code:
 >
 > from org.eclipse.ui.internal.FastViewBar

I am all for concrete questions - and concrete code - instead of an abstract discussion, but do you have a better example? The example code from FastViewBar.java is about extracting the persistent model from a particular class which we haven't split properly into a model part and a UI part yet. My hope would be that code like the one below would be obsolete once we have a proper split, in which case the model is exactly what you would persist, and there would be no need for extracting just the right properties in an ad-hoc way.

Well, maybe I am missing something here! BUT the idea of IMemento (as
I understand it) is to be used to save and restore a hierarchical
data structures in a ad-hoc fashion. Forget about FastViewBar, but
if I'd have a view with some state I'd save it the way FastViewBar
does. Therefore it *is* a good example of using IMemento.

You could require to model the datastructure that you want to save.
That is what my MagicInterfaces help:
  http://dev.eclipse.org/mhonarc/lists/eclipse-incubator-e4-dev/msg00283.html


This is not to say that YAMI is a bad idea, just that the example you are referring to is not very good.

Please give me a better example for IMemento.

Michael


Back to the top