Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-dev] correct way to save a model-fragment to later load it again into the model

I'm currently play around with some advanced e4 model topics and came across the "Saving and restoring a perspective of the application model"[1] but found some issues:

the code mentioned that
> You must clone the perspective as snippet,
> otherwise the running application would break

Is this still the case? I noticed that when I clone the snippet all references for placeholders are lost and loading the perspective fails with a lots of "invalid reference" errors.

If I just safe the perspective fragment it produces me an output with references (but hard file reference ids) and I could load it but certain elements are missing e.g. if I minimize a partstack it is not available anymore and for example the editor area (even though the ref is in the XMI) is missing.

SO question is, is there something "modern" to safe a part of the model in a way that later can be restored without any problems of missing references?

[1] https://www.vogella.com/tutorials/Eclipse4ModelPersistence/article.html#optional-exercise-saving-and-restoring-a-perspective-of-the-application-model


Back to the top