Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Programmatically create instances(How can I create Instances in my JavaService ?)
Programmatically create instances [message #1831788] Sat, 29 August 2020 00:47 Go to next message
David Bunay is currently offline David BunayFriend
Messages: 2
Registered: August 2020
Junior Member
Hi, I am new in SIRIUS I would like to create a instance programmatically from my
JavaService Class of Java.
Help me please.

It is my short code.

public void createInstance(EObject sel) {

EClass datatypeDefinition = sel.eClass();
EObject datatypeInstance =
datatypeDefinition.getEPackage().getEFactoryInstance().create(datatypeDefinition);


}
Re: Programmatically create instances [message #1831995 is a reply to message #1831788] Fri, 04 September 2020 10:07 Go to previous message
Laurent Fasani is currently offline Laurent FasaniFriend
Messages: 173
Registered: October 2014
Senior Member
Hi

you will find what you need in the Sirius documentation to know how to define service and how to call them with aql

* https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#aql
* https://www.eclipse.org/sirius/doc/specifier/general/Writing_Queries.html#service_methods

best regards


Laurent Fasani - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Set selected value via button press.
Next Topic:Create a node by Selecting a different container
Goto Forum:
  


Current Time: Sun Oct 25 23:33:50 GMT 2020

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

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

Back to the top