Creating new Nodes/Containers only with java code [message #1849781] |
Wed, 02 February 2022 09:09  |
Eclipse User |
|
|
|
I have defined in the odesign file some custom node and container types that I can add with the drag&drop from palette. I'm wondering if I can do the same things only with java code, for example in a java action.
What I'd like to do is to read some information from a file and initialize the current diagram using the contents of this file (for example the file could contain the number of a particular type of node that must be added in the initialization).
|
|
|
Re: Creating new Nodes/Containers only with java code [message #1849805 is a reply to message #1849781] |
Thu, 03 February 2022 06:13   |
Eclipse User |
|
|
|
Hi Marco,
I think you can find something that works for you in our unit tests that do similar things, like org.eclipse.sirius.tests.unit.api.tools.CreateNodeViewTest or org.eclipse.sirius.tests.unit.api.tools.CreateEdgeTest (org.eclipse.sirius.tests.support.api.SiriusDiagramTestCase.applyNodeCreationTool(String, DDiagram, EObject) and org.eclipse.sirius.tests.support.api.SiriusDiagramTestCase.applyEdgeCreationTool(String, DDiagram, EdgeTarget, EdgeTarget) , etc.).
I hope this helps.
Regards,
Glenn
|
|
|
|
Powered by
FUDForum. Page generated in 0.04284 seconds