Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsWhen are my (injected) POJO methods called?
https://www.eclipse.org/forums/index.php/mv/msg/182140/577774/#msg_577774
I am trying to write an RCP where I need to get the shell of the main application window AFTER it has been created. In 3.x I would override the WorkbenchWindowAdvisor .postWindowCreate() method, but as far as I could tell this is not used in e4.
I tried to write a class (which is not a part, since all parts already have been created and should be children of the shell I get from shellProvider....) like this:
public class MyClass {
@Inject
private IShellProvider shellProvider;
@PostConstruct
private Object myMethod() {
System.out.println("Do something using the shell! ");
return shellProvider.getShell();
}
}
but myMethod() does not get called. I also tried to use @Execute and @CanExecute but they donĀ“t help. (Is there a good page that explains exactly what these annotations do, btw?)
Do I need to register MyClass through en extension point? Which one, and with what attributes?