Skip to main content



      Home
Home » Modeling » Epsilon » Run epsilon scripts called from EWL in a separate Java thread
Run epsilon scripts called from EWL in a separate Java thread [message #1699638] Thu, 25 June 2015 08:41 Go to next message
Eclipse UserFriend
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?
Re: Run epsilon scripts called from EWL in a separate Java thread [message #1699690 is a reply to message #1699638] Thu, 25 June 2015 16:55 Go to previous message
Eclipse UserFriend
Hi Rene,

Off the top of my head, we could update [1] and call wizardInstance.process() in the context of a Job [2] instead but I'll need to think a bit more about this. Could you please file an enhancement request [3] so that we can keep track of any progress on this (a patch would certainly help speed things up)?

Cheers,
Dimitris

[1] https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/plugins/org.eclipse.epsilon.ewl.emf/src/org/eclipse/epsilon/ewl/emf/ExecuteWizardInstanceCommand.java
[2] http://www.vogella.com/tutorials/EclipseJobs/article.html
[3] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=epsilon
Previous Topic:Need help with ETL for Model To Model Transformation
Next Topic:[EVL] Execute constraint check only once (per model)
Goto Forum:
  


Current Time: Fri Jul 04 16:47:59 EDT 2025

Powered by FUDForum. Page generated in 0.03378 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top