Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Repurpose Add-ons
Repurpose Add-ons [message #1758639] Thu, 30 March 2017 23:18 Go to next message
Henri Boucher is currently offline Henri BoucherFriend
Messages: 40
Registered: September 2015
Member
By the way, I've got MinMaxAddon figured out. Thanks.

My e4 application depends on communication plug-ins that interfaces between remote computers and the local event bus. I would use the Add-on IEventBroker param to access the local bus, and EModelService param to read persisted state entries. I'm not sure how that is done.

I'm curious at how much overhead there is to provide an EModelService for each Add-on. A typical system would have a handfull to a dozen remotes, but an extreme case might have as many a 70.

There should only ever be one communication Add-on for a given remote. So if a second application is started, the Add-on could query using the local bus to see if one is already running, and if so exit. This approach could fail if the plug-ins start at nearly the same time. Is there a better way (maybe OSGi stuff)?

Finally, would it be possible for the Add-ons to remain operational when the application exits?

Bottom line, is this doable?
Re: Repurpose Add-ons [message #1758712 is a reply to message #1758639] Fri, 31 March 2017 20:47 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6363
Registered: July 2009
Senior Member
I'm not sure what you are talking about maybe it's you use Add-On because an MAddon is a e4 model concept. I also don't get why you have multiple EModelServices, there's only one service of this type per application instance.
Re: Repurpose Add-ons [message #1758754 is a reply to message #1758712] Sat, 01 April 2017 21:56 Go to previous messageGo to next message
Henri Boucher is currently offline Henri BoucherFriend
Messages: 40
Registered: September 2015
Member
That was helpful. You couldn't have known that I used the following code from MinMaxAddon:

@Inject
MinMaxAddon(IEventBroker eventBroker, EModelService modelService) {


So of course to get PersistedState that needed to also include MAddon as follows

@Inject
MyAddon(IEventBroker eventBroker, EModelService modelService, MAddon addon){
Map<String, String> persist = addon.getPersistedState();


Since there is only one EModelService I'm thinking that overhead per addon would be minimal.

Would it be useful to start a new topic in the "Eclipse 4" forum regarding Addon lifecycle issues?
Re: Repurpose Add-ons [message #1759387 is a reply to message #1758754] Tue, 11 April 2017 07:54 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6363
Registered: July 2009
Senior Member
Sure start a new thread
Previous Topic:Syntax error on token ".", interface expected
Next Topic:Exception in Application start method
Goto Forum:
  


Current Time: Tue Oct 24 02:11:33 GMT 2017

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

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