Run epsilon scripts called from EWL in a separate Java thread [message #1699638] |
Thu, 25 June 2015 08:41  |
Eclipse User |
|
|
|
I am developing a GUI to be used using the Native type construct in my Epsilon scripts. One thing I am working on is a progress bar showing the progress of my long lasting epsilon operations. All changes on the progress bar have to be performed by the thread of the display because I use JFace/SWT and my tool invokes them asynchronously.
When invoking Epsilon scripts using run configurations, the Epsilon scripts are executed in some worker thread different from the main Eclipse thread, which is also the thread of the display, and my progress bar works fine. But when invoking my scripts using EWL, the thread the Epsilon scripts are executed in is the main Eclipse thread, which is also the thread of the display. Hence, all operations on the progress bar are executed after my Epsilon script finished. I.e., the feedback is shown after all my long lasting operations are done, what is not the intention of my progress bar.
I developed a dialog that does not bock when opened and synchronous calls for updates of the progress bar for my EWL scripts as an alternative. This works, but I fear isn't the best way to do it.
I really like to use EWL to invoke my scripts in the context they need, but it is an issue for long lasting tasks that these scripts run in the Eclipse main thread and hence, block the Eclipse application as long as they run.
Is there a possibility to run the scripts called from EWL as background processes?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03378 seconds