How to easily upgrade an application model (Removing obsolete elements) ?! [message #1713980] |
Mon, 09 November 2015 04:20  |
Eclipse User |
|
|
|
Hi
Is there any recommendation or best practice how an application model
can be upgraded after plug-ins have been updated?
Let's look at application model fragments that are applied always (not
just initially). Their elements will be applied by replacing the
elements with the same id inside the extended feature. That's ok.
Now if a plug-in developer removes an element in the fragment, no
mechanism exists to remove this element in the persisted application
model. It just stays there forever. So, the developer has to write a
processor which removes the fragment. But this is quite cumbersome
because developers need to be aware of this problem. The same trouble
occur when a developer renames an element id...
Another difficulty is dealing with perspectives. How to update e.g.
perspective name and icons for open perspectives without having to reset
the entire perspective?
Actually, I'd like the application model to keep the persisted states of
parts, part containers, open perspectives and so on. But I also need to
have a proper way to update the application without having users to
delete their application models after an update.
How do you deal with these difficulties?
Thanks for any advice or recommendations!
Beat
|
|
|
|
Re: How to easily upgrade an application model (Removing obsolete elements) ?! [message #1714389 is a reply to message #1713980] |
Thu, 12 November 2015 05:29  |
Eclipse User |
|
|
|
Hi,
The easiest clean up is if the bundle that contribute a specific element
is not there any more because the contributing bundle stored in the
contributorURI - a generic processor might be possible.
The ModelAssembler itself can not do that because one might want to keep
the model elements still around (eg think about what happens if you open
your IDE on an old workspace but you don't have all the
plugins-installed than you had when creating the workspace).
As I see the situation today (but I have not put a lot of thought into
it) a generic solution is something one has a hard time to implement. I
also don't know anyone implementing such a generic solution nor do I (in
my spare time).
Tom
On 09.11.15 10:20, Beat Strasser wrote:
> Hi
>
> Is there any recommendation or best practice how an application model
> can be upgraded after plug-ins have been updated?
>
> Let's look at application model fragments that are applied always (not
> just initially). Their elements will be applied by replacing the
> elements with the same id inside the extended feature. That's ok.
>
> Now if a plug-in developer removes an element in the fragment, no
> mechanism exists to remove this element in the persisted application
> model. It just stays there forever. So, the developer has to write a
> processor which removes the fragment. But this is quite cumbersome
> because developers need to be aware of this problem. The same trouble
> occur when a developer renames an element id...
>
> Another difficulty is dealing with perspectives. How to update e.g.
> perspective name and icons for open perspectives without having to reset
> the entire perspective?
>
> Actually, I'd like the application model to keep the persisted states of
> parts, part containers, open perspectives and so on. But I also need to
> have a proper way to update the application without having users to
> delete their application models after an update.
>
> How do you deal with these difficulties?
>
> Thanks for any advice or recommendations!
> Beat
|
|
|
Powered by
FUDForum. Page generated in 0.03706 seconds