Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Advanced Scripting Environment (EASE) » Dedicated Start/End Actions for Script
Dedicated Start/End Actions for Script [message #1732540] Wed, 18 May 2016 00:16 Go to next message
Daniel K. is currently offline Daniel K.Friend
Messages: 11
Registered: May 2012
Junior Member
Hi,
Again I have a general question regarding running a script.
I would like to have a dedicated action which is performed at the start and at the end of the script. Is there a general way to achieve this with hooks in EASE?
Currently I have defined a module with start/end to be added at the beginning and at the end.

Regards
Daniel
Re: Dedicated Start/End Actions for Script [message #1732660 is a reply to message #1732540] Wed, 18 May 2016 20:23 Go to previous message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 250
Registered: July 2009
Location: Graz, Austria
Senior Member
Hi Daniel,

such actions are not supported using keywords or similar. We do have an extension point to register arbitrary extensions called whenever a new script engine is started. At that point you do not know what it will be used for (eg a script, the shell, a run target) nor which source code will be provided to it. We use this extension to bootstrap the Environment module which provides commands like loadModule(). As these extensions do not have a priority order you cannot rely that a custom extension done by you would be called after the bootstrapping process of the environment. So it is somehow limited.

What you might do is register a listener on the script engine that reacts on code injections (pre/post). That might help you to auomate your stuff.

Be careful not to create infinite loops when adding code whenever a script is finished. Your code would also be a script that finishes at some point in time and might trigger another 'finish' action.

HTH
Christian
Previous Topic:Lifetime of a module class
Next Topic:Load Java Class in Script from current workspace
Goto Forum:
  


Current Time: Sat Apr 20 02:57:47 GMT 2024

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

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

Back to the top