Community
Participate
Working Groups
Rational's XDE Modeling Server does not support multi-threading. An Ant task that access the modeling server crashes Eclipse on the second running (when attempting to use the modeling server in a second thread). This introduces the need to be able to specify an Ant argument that executes the build script in the current thread, similar to: new ProgressMonitorDialog(shell).run(false, true, op); where op is a WorkspaceModifyOperation that access the XDE model server.
I need more information here. What is the "current" thread? How would Eclipse know if this is the proper thread? Or do you just need programmatic access? External tools/Ant has evolved to using launch configurations. A launch configuration has API to launch (see ILaunchConfiguration), and this can be called programmatically from any thread. Is this sufficient?
As I remember, Ant tasks, like all runable external processes, are run in a separate thread with their output going to the console window. This lets the task run while keeping the UI updating. Running internal operations can be done in either the same thread, or a different thread as specified by the ProgressMonitorDialog.run method. We need a similar mechanism for external tools. Most of the time they can run in a separate thread. But sometimes it is necessary to run them in the same thread as the Eclipse UI. For example, anything that accesses the XDE modeling server API. Ant tasks are just Java methods, so they can be run either way.
Since we are using launch configs - you can invoke/launch a script in any thread you want. The API is simply ILaunchConfiguration#launch(String mode, IProgressMonitor monitor). You can call this API from which ever thread you like.