I have an Eclipse plugin that automatically loads existing Eclipse Java project to workspace, opens it and finally runs the Java application. If the Java project already exists in the workspace, the plugin refreshes the project relative to the project on the file system.
When doing only refreshing the plugin works fine, but when the plugin first imports the project by calling IProject.create(), opens it and runs it, I get a error dialog saying that program was not found.
The IProject.create() and open() are said to be long-running operations. Is there some way wait until the IProject.create() is finished then and then call IProject.open and after compliting the open methdod call the project.run() method?