How to access an EObject's position and size? [message #1834259] |
Thu, 05 November 2020 23:14  |
Eclipse User |
|
|
|
Hi,
I'm working with sirius to save my model with nodes' position and size information to a file. I searched in the forum but didn't find any documents about how can I access the position and size of an EObject. I tried SiriusLayoutDataManager.INSTANCE.getData() on an existing eobject node, but the return value is null.
How can I get and set the position and size programmatically in sirius? Is there any api to do that work? Any advice would help a lot.
Thanks.
|
|
|
|
|
|
Re: How to access an EObject's position and size? [message #1834280 is a reply to message #1834276] |
Fri, 06 November 2020 06:41   |
Eclipse User |
|
|
|
Hi Anthony,
This is my previous post, where I described my need that I hope to copy&paste an EObject while keeping its layout. I'm finding internal apis to implement it but met some difficulties.
https://www.eclipse.org/forums/index.php/t/1105696/
What I really want to do is let my user choose a device(by typing its name in a textfield so I can find it) and input a location, then the application will place the device to that location. I've finished the first step(choose a device), so I have a Device EObject right now, and I'm finding a method to get and set the Device EObject's location. In other words, I hope to find an api to access a semantic eobject's graphical data.
I don't know if I explained myself well, sorry for the bad English. Thanks very much for your help Anthony, I will appreciate it if you can give me some further information. Any advice would be helpful.
Kindly Regards,
Yufei Zhou
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05081 seconds