This service is archived, please use www.eclipse.org/forums


Home » Archived Projects » Kitalpha » [vpdsl] Enumeration type names
[vpdsl] Enumeration type names [message #685] Thu, 28 January 2016 04:07 Go to next message
felix.dorner.gmail.com is currently offline  felix.dorner.gmail.com
Messages: 117
Registered: November 2015
Senior Member
Is there a way I can specify the EMF name for an Enumeration type defined with vpdsl? For example, I have this:

Attributes:
kind type ecore.EEnumerator [1,1] values ( component literal component , system literal system )

Which results in an EMF Enumeration named kind_Type. I would rather have it named just "Kind".

Thanks,
Felix
Re: [vpdsl] Enumeration type names [message #723 is a reply to message #685] Tue, 01 March 2016 05:21 Go to previous messageGo to next message
boubekeur.zendagui@thales is currently offline  boubekeur.zendagui@thales
Messages: 54
Registered: April 2015
Member
Hi Felix,

You can define an Enumeration element and use it as type of your attribute.

Regards.
Re: [vpdsl] Enumeration type names [message #732 is a reply to message #723] Tue, 15 March 2016 04:45 Go to previous messageGo to next message
felix.dorner.gmail.com is currently offline  felix.dorner.gmail.com
Messages: 117
Registered: November 2015
Senior Member
Hi Boubekeur,

I tried as you suggested, but it doesn't work. When I use the name of the Enumeration as the type of the Attribute, it is underlined in red with an error "Couldn't resolve reference to EDataType MyEnumeration"

Felix
Re: [vpdsl] Enumeration type names [message #734 is a reply to message #732] Tue, 15 March 2016 05:40 Go to previous messageGo to next message
boubekeur.zendagui@thales is currently offline  boubekeur.zendagui@thales
Messages: 54
Registered: April 2015
Member
Hi Felix,

There is a small difference when using the EEnum available in Ecore models and the ones defined in the data.vptext. To use a local Enumeration you should use "enum" in place of "type".

index.php/fa/199/0/

Regards,
Boubekeur Zendagui.
Re: [vpdsl] Enumeration type names [message #769 is a reply to message #734] Thu, 07 April 2016 03:10 Go to previous message
felix.dorner.gmail.com is currently offline  felix.dorner.gmail.com
Messages: 117
Registered: November 2015
Senior Member
Oh, thank you. From now on I will look at the xtext grammar before asking Smile
Previous Topic: [vpdsl] Specify Type Parameters
Next Topic: Using an XML file in a viewpoint
Goto Forum:
  


Current Time: Fri Feb 28 16:11:45 EST 2020

Total time taken to generate the page: 0.01772 seconds