Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Create new model elements in EOL
Create new model elements in EOL [message #1804189] Wed, 20 March 2019 07:54 Go to next message
Luca Berardinelli is currently offline Luca BerardinelliFriend
Messages: 54
Registered: June 2010
Location: Vienna
Member
Hi all,
my question is probably trivial.
How to create new model elements, e.g., via EOL functions?
In the past, I solved this use case for EMF model by integrating via Java extensions, the EcoreUtil or UmlUtil then invoking the create() methods. It worked.
However, I am not sure that it is the best practise and I would like to know if it is possible without any external java tool.
Thanks in advance,

Luca



Luca Berardinelli
Re: Create new model elements in EOL [message #1804191 is a reply to message #1804189] Wed, 20 March 2019 08:23 Go to previous messageGo to next message
Luca Berardinelli is currently offline Luca BerardinelliFriend
Messages: 54
Registered: June 2010
Location: Vienna
Member
Response in Table 3.9: Operations of Model Element Types at page 43, EpsilonBook

createInstance() : Any

:)


Luca Berardinelli
Re: Create new model elements in EOL [message #1804193 is a reply to message #1804191] Wed, 20 March 2019 08:41 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Luca,

Alternatively you can use the "new" keyword which delegates to createInstance() behind the scenes e.g.

var c : new Class;


Cheers,
Dimitris
Previous Topic:Packaging application with epsilon
Next Topic:Databinding ListViewer
Goto Forum:
  


Current Time: Fri Apr 19 16:18:33 GMT 2024

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

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

Back to the top