Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » creating part programmatically not working in kepler (creating part programmatically not working in kepler )
creating part programmatically not working in kepler [message #1065887] Fri, 28 June 2013 07:21 Go to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

I'm created 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:

index.php/fa/15399/0/

Can you please tell me what i'm missing here.

Thanks
Re: creating part programmatically not working in kepler [message #1065903 is a reply to message #1065887] Fri, 28 June 2013 08:29 Go to previous message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

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.


[1]:
Previous Topic:Add headers for ruler columns and text area in SourceViewer
Next Topic:plugin_customization.ini overwritten
Goto Forum:
  


Current Time: Thu Apr 18 02:13:12 GMT 2024

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

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

Back to the top