Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Passing optional parameters to EOL
Passing optional parameters to EOL [message #1810931] Thu, 22 August 2019 09:12 Go to next message
Nicolas Hili is currently offline Nicolas HiliFriend
Messages: 40
Registered: March 2017
Member
Hi,

I am trying to pass optional parameters to an EOL file using the "Parameters" configuration tab under "EOL Program" in the "Run Configurations" menu.

I am trying the following simple EOL program (adapted from here):

/**
 * Hello World 
 * Optional parameter: "message" (type: String)
 */

if (message.isDefined()) {
	message.println();
}
else {
	'parameter is not defined'.println();
}


When I do not define the message parameter, I'd like the program to execute the code located inside the else branch. It appears it is impossible since message.isDefined() gets me the following error:

Quote:

Undefined variable, type or model: 'message'


Is there a service to retrieve parameters in a different way so that the "message" variable would exist but would be undefined?

Thanks,

Nicolas
Re: Passing optional parameters to EOL [message #1810978 is a reply to message #1810931] Thu, 22 August 2019 22:37 Go to previous messageGo to next message
Sina MadaniFriend
Messages: 160
Registered: November 2015
Location: York, UK
Senior Member
Hi Nicolas,

This is most likely an unintended behaviour, since your example demonstrates the need to distinguish between a variable existing and being null vs. not even being declared. I have updated Epsilon to work in the special case of this operation.

Thanks,
Sina
Re: Passing optional parameters to EOL [message #1811045 is a reply to message #1810978] Sun, 25 August 2019 14:36 Go to previous messageGo to next message
Nicolas Hili is currently offline Nicolas HiliFriend
Messages: 40
Registered: March 2017
Member
Thanks Sina for your reply,

Will your change be available as nightly build/through any update site?

Thanks again,

Nicolas
Re: Passing optional parameters to EOL [message #1811064 is a reply to message #1811045] Mon, 26 August 2019 09:21 Go to previous messageGo to next message
Sina MadaniFriend
Messages: 160
Registered: November 2015
Location: York, UK
Senior Member
Hi Nicolas,

It is available via the Epsilon interim update site (download.eclipse.org/epsilon/interim).

Thanks,
Sina
Re: Passing optional parameters to EOL [message #1814018 is a reply to message #1811064] Sun, 01 September 2019 18:13 Go to previous message
Nicolas Hili is currently offline Nicolas HiliFriend
Messages: 40
Registered: March 2017
Member
Thanks Sina,

I am still stuck with Eclipse 4.7 (Photon). I suppose it is not backported to this version, is not it?

Cheers,

Nicolas

[Updated on: Sun, 01 September 2019 18:13]

Report message to a moderator

Previous Topic:Could I implement patch/merge functionalities with Epsilon
Next Topic:EVL launch configuration
Goto Forum:
  


Current Time: Sat Apr 20 00:41:25 GMT 2024

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

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

Back to the top