Question

I'm creating one RCP application in Juno.

In that app I'm creating programmatically Part based on PartDescriptor like following.

 MPart part = partService.createPart("discripto.id");
 part.setElementId("element.id");        

And it was working perfectly till Eclipse 4.2.2.

Same code when I'm trying to run in Eclipse Kepler, its not throwing any exception view is comes like following without any control:

enter image description here

Can any one please tell me what I'm missing here.

Was it helpful?

Solution

Find answer just after posting question:

Problem:

@PostConstruct annotated method is not called

Solution: from Why isn't my @Inject-able/@PostConstruct methods being injected?

There are typically two reasons why injection fails.

Mismatched Annotations: Ensure your bundles use Import-Package with a package version to pull in the standard annotations rather than a Require-Bundle on the javax.annotation bundle.

Import-Package: javax.inject;version="1.0.0",javax.annotation; version="1.0.0"

Unresolvable Injections: The injector attempts to resolve objects in the context. If an object cannot be resolved in the context, and it's not marked as @Optional, then the method will not be injected. The injector does not normally log when such situations occur as it is an expected occurrence.

My problem is because of FIRST one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top