Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to easily upgrade an application model (Removing obsolete elements) ?!
How to easily upgrade an application model (Removing obsolete elements) ?! [message #1713980] Mon, 09 November 2015 09:20 Go to next message
Eclipse UserFriend
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 #1714382 is a reply to message #1713980] Thu, 12 November 2015 10:08 Go to previous messageGo to next message
ALex W is currently offline ALex WFriend
Messages: 56
Registered: July 2012
Member
Bump on this interesting question.

Not sure, but maybe providing a custom ModelAssembler or a IModelReconcilingService would do it, but never tried...
Re: How to easily upgrade an application model (Removing obsolete elements) ?! [message #1714389 is a reply to message #1713980] Thu, 12 November 2015 10:29 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
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
Previous Topic:CTRL+K not working after closing of Welcome Intro
Next Topic:Add-on failed to start up after being exported as an executable product
Goto Forum:
  


Current Time: Thu Apr 18 16:13:37 GMT 2024

Powered by FUDForum. Page generated in 0.02372 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top