Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsViewPart's @PostConstruct createControls() not called
https://www.eclipse.org/forums/index.php/mv/msg/449357/1001493/#msg_1001493
I defined a MPartDescriptor in my Application.e4xmi, then in a Handler I get an EPartService injected which I use to createPart() and showPart(). I can then get my actual ViewPart impl object from mpart.getObject(). The problem I have though is that my ViewPart class's createControls() is never called. It is annotated with @PostConstruct (the ViewPart class was created with the Eclipse 4 ViewPart wizard). Any ideas how I can get the method to be called? (I can't call it myself because I don't have the parent Composite that must be passed in...)
]]>Joel Becker2013-01-16T20:24:58-00:00Re: ViewPart's @PostConstruct createControls() not called
https://www.eclipse.org/forums/index.php/mv/msg/449357/1001526/#msg_1001526
I add the part to its new parent part stack, like this
cu
Frank]]>Frank Benoit2013-01-16T21:43:40-00:00Re: ViewPart's @PostConstruct createControls() not called
https://www.eclipse.org/forums/index.php/mv/msg/449357/1001534/#msg_1001534
does an import-package for javax.annotation, do not use require bundle!
You need to have a import-package javax.annotation 1.0.0
Tom
Am 16.01.13 21:24, schrieb Joel Becker:
> Hi,
>
> I defined a MPartDescriptor in my Application.e4xmi, then in a Handler I
> get an EPartService injected which I use to createPart() and showPart().
> I can then get my actual ViewPart impl object from mpart.getObject().
> The problem I have though is that my ViewPart class's createControls()
> is never called. It is annotated with @PostConstruct (the ViewPart class
> was created with the Eclipse 4 ViewPart wizard). Any ideas how I can get
> the method to be called? (I can't call it myself because I don't have
> the parent Composite that must be passed in...)
>]]>Thomas Schindl2013-01-16T22:09:15-00:00Re: ViewPart's @PostConstruct createControls() not called
https://www.eclipse.org/forums/index.php/mv/msg/449357/1001918/#msg_1001918
I am not familiar with the issue of required vs. imported javax.annotation. Is there a bug or some other documentation where I can read a little more about this?
Thanks,
JD
ps. - I haven't run into an issue, but I want to make sure I don't ]]>Joseph Carroll2013-01-17T14:59:19-00:00Re: ViewPart's @PostConstruct createControls() not called
https://www.eclipse.org/forums/index.php/mv/msg/449357/1001951/#msg_1001951
Joel Becker2013-01-17T15:47:35-00:00Re: ViewPart's @PostConstruct createControls() not called
https://www.eclipse.org/forums/index.php/mv/msg/449357/1002005/#msg_1002005
http://wiki.eclipse.org/Eclipse4/RCP/FAQ#Why_isn.27t_my_.40Inject-able.2F.40PostConstruct_methods_being_injected.3F
Tom
Am 17.01.13 15:59, schrieb Joseph Carroll:
> @Tom
>
> I am not familiar with the issue of required vs. imported
> javax.annotation. Is there a bug or some other documentation where I can
> read a little more about this?
>
> Thanks,
>
> JD
>
> ps. - I haven't run into an issue, but I want to make sure I don't :)]]>Thomas Schindl2013-01-17T17:39:09-00:00