Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » creating part programmatically not working in kepler (creating part programmatically not working in kepler )
creating part programmatically not working in kepler [message #1065886] Fri, 28 June 2013 07:19 Go to next message
sumit singh is currently offline sumit singhFriend
Messages: 133
Registered: October 2012
Location: Bangalore
Senior Member

I'm working on 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
  • Attachment: Untitled.png
    (Size: 2.76KB, Downloaded 311 times)

[Updated on: Fri, 28 June 2013 07:20]

Report message to a moderator

Re: creating part programmatically not working in kepler [message #1065904 is a reply to message #1065886] Fri, 28 June 2013 08:29 Go to previous message
sumit singh is currently offline sumit singhFriend
Messages: 133
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:[Kepler] window focus on new editor
Next Topic:Switch language at runtime?
Goto Forum:
  


Current Time: Fri Nov 21 18:08:05 GMT 2014

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

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