|
Re: Programmatically create nodes [message #1728908 is a reply to message #1728862] |
Fri, 08 April 2016 08:31   |
Eclipse User |
|
|
|
On 04/08/2016 07:49 AM, Martin Jedlicka wrote:
> Hi,
Hi Martin,
What is your need behind this ?
Sirius is based on GMF but it is no really intended for adding graphical
elements out of the classic mechanism "odesign file + semantic model =
diagram's graphical elements "
Nodes and their bounds are defined in the GMF model but in a Sirius
diagram displaying elements defined in a odesign it's more complicated.
With the semantic model and with what is defined in the odesign
(NodeMappings, containerMappings etc), Sirius produces a model composed
of DNode, DNodeContainer, DEdge etc.
Next, Sirius builds the GMF model based on that Sirius model.
You can take a look in
org.eclipse.sirius.diagram.business.internal.sync.DDiagramSynchronizer.refresh(IProgressMonitor).
This action refreshes the Sirius model according to the semantic model
and the odesign.
The GMF model is created using the CanonicalSynchronizer (see
org.eclipse.sirius.diagram.ui.internal.refresh.diagram.DDiagramCanonicalSynchronizer.synchronize())
>
> How to programmatically on display (in the Sirius) to create a node and
> set the location and size?
>
> Thanks.
>
> Martin
Regards,
--
Florian - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Programmatically create nodes [message #1736169 is a reply to message #1730041] |
Mon, 27 June 2016 05:10  |
Eclipse User |
|
|
|
Hi martin,
I know this is a bit old, but was hoping you might be able to help me,
I have spent many many hours now trying to get this to work, and i cant see, to change diagram nodes location
i have done exactly as you in example below,
While debugging i see the code does enter the getLayoutNodeProvider
but it does not invoke any of the CustomLayout class methods.
any ideas why this is ?
also when you want to activate the code, do you simply press the arrange all button ?
appreciate the help !!
thank you.
|
|
|
Powered by
FUDForum. Page generated in 0.05179 seconds