Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Advanced Scripting Environment (EASE) » Lifetime of a module class
Lifetime of a module class [message #1731724] Mon, 09 May 2016 14:39 Go to next message
Daniel K. is currently offline Daniel K.Friend
Messages: 11
Registered: May 2012
Junior Member
Hi,
I have a general question regarding modules.
How are the module classes loaded and what is the lifetime of such a class?
Is it either

  1. a singleton which depends on Eclipse runtime
  2. existing during a script runtime, if module is loaded till end of the script
  3. instantiated at every call of a method
  4. another option?


Regards
Daniel
Re: Lifetime of a module class [message #1731747 is a reply to message #1731724] Mon, 09 May 2016 18:46 Go to previous messageGo to next message
Christian Pontesegger is currently offline Christian PonteseggerFriend
Messages: 193
Registered: July 2009
Location: Graz, Austria
Senior Member
It is option 2. The script runtime will create an instance on the first loadModule() for a dedicated module. A subsequent call to load the same module will recycle the previously loaded instance, not re-initializing it. So if a module has members they will not get resetted on a second loadModule.
However the script wrappers to call exposed methods get refreshed on a subsequent loadModule. You might want to look at this by debugging a JS file and enable debugging of dynamic code fragments. it allows you to step into loadModule() to see what happens in the background.
Re: Lifetime of a module class [message #1731779 is a reply to message #1731747] Tue, 10 May 2016 07:03 Go to previous message
Daniel K. is currently offline Daniel K.Friend
Messages: 11
Registered: May 2012
Junior Member
Hi,
nice, thanks.

Regards
Daniel
Previous Topic:Running RCPTT scripts with EASE
Next Topic:Dedicated Start/End Actions for Script
Goto Forum:
  


Current Time: Sat Aug 18 10:14:14 GMT 2018

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

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

Back to the top