Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Variables in e4xmi(Is it possible to use global variables in the e4xmi files?)
Variables in e4xmi [message #1007642] Wed, 06 February 2013 20:59 Go to next message
Juan Felipe Caro Galvis is currently offline Juan Felipe Caro GalvisFriend
Messages: 4
Registered: February 2012
Junior Member
Hi all,

Is it possible to use global variables in the e4xmi files?

We have two bundles that implement the same services, one is a mock-up bundle, and the other one would be the productive version. In our e4xmi we refer to ether one many times. When I want to switch from mock-up to production, I have to change the reference many times. What I would like to do is to replace part of the contributionURI for a global variable.

For example:
contributionURI="bundleclass://${IMPLEMENTATION}/com.example.myimplementation"

Does this makes sense? Is there another way to accomplish this goal?

Thanks a lot!
Juan
Re: Variables in e4xmi [message #1007652 is a reply to message #1007642] Wed, 06 February 2013 21:37 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5470
Registered: July 2009
Senior Member
No it does not! About which contribtionURIs are you talking?

Normally you have 3 bundles:
* service-definition bundle
* mock bundle
* implementation bundle

and you are using the OSGi-Service-Registry to do the look up at runtime
and based on the installed plugins you'll get the mock or production
implementation.

I've blogged sometime ago about the ideal strucutre for your
application. See
http://tomsondev.bestsolution.at/2012/12/10/my-recommended-project-structure-for-javafx-e4-projects/
and I have a sample application (which use javafx and not SWT) at
https://bitbucket.org/tschindl/bitbucketmgr you see how one can switch
between the mock and real rest implementation.

Tom

Am 06.02.13 21:59, schrieb Juan Felipe Caro Galvis:
> Hi all,
>
> Is it possible to use global variables in the e4xmi files?
>
> We have two bundles that implement the same services, one is a mock-up
> bundle, and the other one would be the productive version. In our e4xmi
> we refer to ether one many times. When I want to switch from mock-up to
> production, I have to change the reference many times. What I would like
> to do is to replace part of the contributionURI for a global variable.
> For example:
> contributionURI="bundleclass://${IMPLEMENTATION}/com.example.myimplementation"
>
>
> Does this makes sense? Is there another way to accomplish this goal?
>
> Thanks a lot!
> Juan
Previous Topic:How to implement 'Close All' and 'Close Others'
Next Topic:How to implement the 'New window' command (org.eclipse.ui.window.newWindow)
Goto Forum:
  


Current Time: Sat Nov 29 05:16:45 GMT 2014

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

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