Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » DS service injection & multiple applications & headless
DS service injection & multiple applications & headless [message #652623] Fri, 04 February 2011 18:11 Go to next message
Christophe Fondacci is currently offline Christophe Fondacci
Messages: 95
Registered: July 2009
Location: Paris
Member
Hello all,

Got a problem with service injection (DS) in a RCP app :
* My RCP app makes extensive use of service injection
* I am building a headless application, using all non-ui part of this app
* The headless app redefines some services whose implementation were injected by the UI part so that it can run without any UI interaction

Everything works great when the 2 notions (headless and RCP) are distinct.
I would like to bundle a single product with the RCP app AND the headless app so that the user can start our application and also use his same installation headless through command line.

The problem is that I don't know how to do this. Declaring a dependency from the RCP product to the headless plugin (containing the headless app) messes the configuration because overridden services (through "service.ranking") of the headless app are used in place of the expected IDE services.

Do you think there is a way to do this ? Am I doing something wrong ?
I think I could declare the headless service declaration with a low ranking so that IDE services will always override any declaration from the headless plugin, but i'm not sure whether this is a good way to go...

Any help would be very appreciated.
Thank you!
Christophe
http://www.nextep-softwares.com
Re: DS service injection & multiple applications & headless [message #652872 is a reply to message #652623] Mon, 07 February 2011 12:42 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On 02/04/2011 01:11 PM, Christophe Fondacci wrote:
> Do you think there is a way to do this ? Am I doing something wrong ?
> I think I could declare the headless service declaration with a low
> ranking so that IDE services will always override any declaration from
> the headless plugin, but i'm not sure whether this is a good way to go...
>

In your situation I would expect to give the IDE services a higher
ranking, so that in headless mode it picks up the headless services
(since you don't include the UI plugins) and in IDE mode you'll get your
IDE services overriding your headless ones.

But I can't vouch if that's a best practice or not, you could also try
asking in eclipse.technology.equinox

Later,
PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: DS service injection & multiple applications & headless [message #652896 is a reply to message #652872] Mon, 07 February 2011 13:44 Go to previous message
Christophe Fondacci is currently offline Christophe Fondacci
Messages: 95
Registered: July 2009
Location: Paris
Member
Thanks, I think I will tweak this through ranking for now... I might re-post later if i run into troubles with this solution Wink. In which case i'll post to the equinox newsgroup which is, I agree, more appropriate.

Thanks again,
Christophe.
http://www.nextep-softwares.com

Previous Topic:ViewPart gets screwy on closing
Next Topic:How to set status line height
Goto Forum:
  


Current Time: Thu Oct 23 03:02:34 GMT 2014

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

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