Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Model fragment merge on plugin installation
Model fragment merge on plugin installation [message #900995] Thu, 09 August 2012 11:18 Go to next message
Axel Ruder is currently offline Axel RuderFriend
Messages: 4
Registered: July 2012
Junior Member
Hi there,

is my understanding correct that model fragments are only merged into the application model on platform startup?
My problem is that I have to support plugin installation/deinstallation without restart. Is there any way to unmerge model contributions on deinstall and merge on install?

Thanks in advance,
Axel

P.S: I really enjoy working with e4!
Re: Model fragment merge on plugin installation [message #901001 is a reply to message #900995] Thu, 09 August 2012 11:33 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Right we currently only merge in stuff when application framework starts
up. The code is in the ModelAssembler and you can most likely reuse the
logic there.

What we currently not have is the opposite - removing fragments at
runtime but we already track where a contribution has been coming from
so removing contributed elements should be doable also.

I'd approch the problem of dynamic loading/unloading by registering an
Addon which listens to bundles coming and going. We naturally accept
patches who bring this feature to framework itself as well ;-)

Tom

Am 09.08.12 13:18, schrieb Axel Ruder:
> Hi there,
>
> is my understanding correct that model fragments are only merged into
> the application model on platform startup?
> My problem is that I have to support plugin installation/deinstallation
> without restart. Is there any way to unmerge model contributions on
> deinstall and merge on install?
>
> Thanks in advance,
> Axel
>
> P.S: I really enjoy working with e4!
Re: Model fragment merge on plugin installation [message #901010 is a reply to message #901001] Thu, 09 August 2012 11:57 Go to previous messageGo to next message
Axel Ruder is currently offline Axel RuderFriend
Messages: 4
Registered: July 2012
Junior Member
Thanks Tom for the quick answer!

I'll give it a shot Wink!

Axel
Re: Model fragment merge on plugin installation [message #901024 is a reply to message #901001] Thu, 09 August 2012 13:01 Go to previous message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

An other work around you might want to try is through the use of a processor. If you register a processor (instead of a fragment) it is loaded at the same time a fragment is. Since you have programmatically defined your model elements, you could add something to the Activator.stop() and remove all of the elements added.

This is more of a hack, I don't really like adding too many things to the start/stop methods. Tom's solution is the ideal approach, but this is another option. Smile

JD
Previous Topic:JSP format before saving
Next Topic:e4 Creating a window with NO_TRIM
Goto Forum:
  


Current Time: Thu Mar 28 18:27:59 GMT 2024

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

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

Back to the top