Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:29 Go to next message
Nelson Pestana is currently offline Nelson PestanaFriend
Messages: 3
Registered: March 2016
Junior Member
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 12:43 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
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


Maxime Porhel - 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: Sat Apr 20 00:51:32 GMT 2024

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

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

Back to the top