Skip to main content



      Home
Home » Eclipse Projects » Sirius » Sirius with JDT(Interact with JDT to represent java code)
icon3.gif  Sirius with JDT [message #1729587] Fri, 15 April 2016 12:29 Go to next message
Eclipse UserFriend
I want to create a diagram editor to represent the java code structure from a project with information coming from JDT. How can I add elements to the model without user interaction (programmatically)?
Re: Sirius with JDT [message #1734705 is a reply to message #1729587] Fri, 10 June 2016 08:43 Go to previous message
Eclipse UserFriend
Hi Nelson,

Le 15/04/2016 à 18:29, Nelson Pestana a écrit :
> I want to create a diagram editor to represent the java code structure
> from a project with information coming from JDT. How can I add elements
> to the model without user interaction (programmatically)?

You will have to create your own EMF model to map the Java code structure.

You can retrieve or create a Sirius session using the SessionManager (if
you already have a Modeling Project, you will need the URI of the .aird
file).

Once you have your opened session, you can call
session.getTransactionalEditingDomain().getCommandStack() and execute
EMF commands to populate your model.

You can also look at the DialectManager/DialectUIManager APIs to
programmatically create and open representations.

Regards


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:How to add nodes to containers via layers?
Next Topic:Hide standard menu and customise editor
Goto Forum:
  


Current Time: Sun Mar 16 00:06:45 EDT 2025

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

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

Back to the top