Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to "correctly" supply additional configuration to objects configured in Application.e4
How to "correctly" supply additional configuration to objects configured in Application.e4 [message #1281864] Tue, 01 April 2014 09:27 Go to next message
Jens Rabe is currently offline Jens Rabe
Messages: 53
Registered: September 2013
Member
When I define things in the Application model, I can get additional data into the created objects by:
1. Setting context properties and using @Inject @Named String
2. using tags or variables and injecting the MPart, getting them back from there

However, at point 1), the parameterization is done to the context and not local to the part, additionally, I can only get Strings from there and have to do conversions to other formats by myself, taking care of any errors, and at point 2), I can only insert lists of strings.

My goal is to get a Class<?> object into the part.

So, what is the best approach to get additional configuration data into the part (and only there)? I thought of using a "variable" with a specified format, like e.g.:
myClass=bundleclass://bundle/my.Clazz and extracting the information in the @PostConstruct method.

Is this the way to go or are there better approaches?
Re: How to "correctly" supply additional configuration to objects configured in Applicatio [message #1295356 is a reply to message #1281864] Mon, 14 April 2014 03:40 Go to previous message
Sopot Cela is currently offline Sopot Cela
Messages: 597
Registered: December 2010
Senior Member

You can not give additional configuration data to your part in a declarative way through the application model editor. What you can very easily do is supply these programmatically through an addon which feeds some object to the parts' context and you can consume that through the @PostConstruct or @Inject.
Previous Topic:Can we restrict draggable feature in e4
Next Topic:How can I include custom controls in Application.e4xmi?
Goto Forum:
  


Current Time: Fri Aug 22 21:52:57 EDT 2014

Powered by FUDForum. Page generated in 0.08659 seconds