Skip to main content



      Home
Home » Modeling » Epsilon » EVL: How to change a property type
EVL: How to change a property type [message #1721556] Thu, 28 January 2016 05:05 Go to next message
Eclipse UserFriend
Hi,

I want to set the type (like primitive types) of a property of a class in a given UML model. I mean the statement like the following that here raises an error:

var p: new Property;
p.type().createInstance(new Integer);


The error message is:
Method 'createInstance' not found for: EClass [name=Property, instanceClassName=org.eclipse.uml2.uml.Property, ...


How can I resolve this problem?

Best regards,
Alireza

[Updated on: Mon, 01 February 2016 09:22] by Moderator

Re: EVL: How to change a property type [message #1721657 is a reply to message #1721556] Thu, 28 January 2016 18:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alireza,

I've shared an example that demonstrates how to load the built-in UML primitive types library under examples/org.eclipse.epsilon.examples.uml.library in Epsilon's Git repository. Please note that you'll need to turn off the "Cache model elements to improve execution time" option in the configuration dialog of your UML model.

Cheers,
Dimitris

[1] https://git.eclipse.org/c/epsilon/org.eclipse.epsilon.git/tree/examples/org.eclipse.epsilon.examples.uml.library
Re: EVL: How to change a property type [message #1721662 is a reply to message #1721657] Thu, 28 January 2016 19:13 Go to previous messageGo to next message
Eclipse UserFriend
Dear Dimitris,

This is great. Thanks a lot for your reply and support.

Best regards,
Alireza
Re: EVL: How to change a property type [message #1721699 is a reply to message #1721657] Fri, 29 January 2016 05:02 Go to previous message
Eclipse UserFriend
Dear Dimitris,

Hi,

The problem was resolved for the stereotyped property too. It is required to load the PrimitiveTypes library just before the usage of the command DataType.all...

Best regards,
Alireza

[Updated on: Mon, 01 February 2016 09:21] by Moderator

Previous Topic:EVL: Checking the existence of a relationship between two classifier
Next Topic:[ETL] There is an ETL Metamodel?
Goto Forum:
  


Current Time: Thu Jul 10 00:40:08 EDT 2025

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

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

Back to the top