|Running 'NewLibraryPluginCreationOperation' in a headless application [message #988695]
||Sat, 01 December 2012 13:12
| Kivanc Muslu
Registered: November 2010
Hi all, |
I am trying to write a headless application (instance of IApplication) that would let me create new plug-in projects from the given jar archives from the command line. I have the following problem:
NewProjectCreationOperation.execute(..) (which is called through run(..)) executes the following:
As far as I can understand, this code touches the workbench at some point and whenever I run my IApplication from the command line, I get an IllegalStateException saying that the Workbench is not initialized yet.
So my questions:
1- Is there a way to run IApplications so that they wait for Workbench creation (e.g., a mode where the UI is also loaded)? This can also be another extension point that I don't know yet, if that is the case, please let me know.
2- since openFile(..) was the last code to execute in execute(..), I tried catching this exception in my IApplication. As a result, the application works fine and creates the new plug-in project, however Eclipse incremental builder starts having problems with the projects that depend on this newly created project. The error view suggests me to clean and rebuild the new project, however when I try that it does not work (I cannot get rid of that error). The only way I can fix the problem is to close and reopen the project. Can someone provide an explanation (or related code, documentation) for this?
Powered by FUDForum
. Page generated in 0.03875 seconds