Calling setContributorURI From A @ProcessAdditions Method Has No Effect [message #906190] |
Fri, 31 August 2012 16:16  |
Eclipse User |
|
|
|
I've been exercising the e4 model manipulation API some to see what's possible from code.
I hooked into the lifeCycleURI mechanism and added a class containing a method annotated with @ProcessAdditions. This method gets called as expected, and I'm able to do things like add new windows and/or add a new Part to a PartStack. So far so good.
However...
If I specify the content of a new Part (or the content of a preexisting empty Part) by calling setContributorURI then the content is never realized. The content in question is a simple label containing a static string. The code that creates the label does the work in a method annotated with @PostConstruct, and a method annotated with @Focus is included.
I know the URI is correct because I later specified it statically in the model and the content was shown.
At this point I started slinging arrows at it, and tried obtaining the EPartService and calling showPart. However, this caused the app to refuse to start. I guess this makes sense since it may be too early in the lifecycle to show anything (?).
On the surface it seems that if I can specify the contributor URI in the static model and that works, and the method annotated with @ProcessAdditions is just adding to the model, then setting the contributor URI from code at this point should have a similar effect.
Any guidance?
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03523 seconds