I have created a product configuration that use the
org.eclipse.ui.ide.workbench
application which refers to the
org.eclipse.ui.internal.ide.application.IDEApplication
class. Now I would like to override parts of this implementation so I have created:
import org.eclipse.ui.internal.ide.application.IDEApplication;
public class MyApplication extends IDEApplication {
/*
* (non-Javadoc)
*
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.
* IApplicationContext)
*/
public Application() {
super();
}
}
But most of the code I want to override is located in the Advisor classes (Window, bar etc) which are "hardwired" inside the start method of the IDEApplication:
/* (non-Javadoc)
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext context)
*/
public Object start(IApplicationContext appContext) throws Exception {
...
int returnCode = PlatformUI.createAndRunWorkbench(display,
new IDEWorkbenchAdvisor(processor));
...
I could copy/paste all the code from the super start method and then replace with my own Advisor classes but it s not nice to maintain and there a also some visibility issues (meaning I need to copy more source files).
Are there any recommended approach to overriding eclipse build in application, eg. using extension points to delegate Advisors used to custom classes?