Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Set/arrange the sub container programmatically
Set/arrange the sub container programmatically [message #1802497] Mon, 11 February 2019 06:05 Go to next message
Prajna VGFriend
Messages: 54
Registered: July 2018
Member
Hi all,

In Sirius I am creating first child containers of the diagram programmatically. After creating the containers, if I create inside containers by palette in diagram the container will not insert properly. It shows as below

index.php/fa/34854/0/

Can I know the task I need to perform programmatically after creation of elements to create the sub elements in proper arrangement?

Thanks in advance

[Updated on: Mon, 11 February 2019 06:30]

Report message to a moderator

Re: Set/arrange the sub container programmatically [message #1802503 is a reply to message #1802497] Mon, 11 February 2019 08:24 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 702
Registered: July 2009
Senior Member
Hi,

My guess is that "ParentContainer" has a fixed size, so when you create the child at a relative position which is outside of its' visible area, the parent does not grow but gains a scroll bar so that you can scroll its viewport to see the child.

If that is not what you want, "ParentContainer" should be configured in "Auto-Size" mode (with width and height set to -1) so that it will automatically adjust its size to accomodate any child created inside of it without needing scrollbars.

Regards,


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Set/arrange the sub container programmatically [message #1803065 is a reply to message #1802503] Thu, 21 February 2019 15:56 Go to previous message
Prajna VGFriend
Messages: 54
Registered: July 2018
Member
Thanks Pierre,

I created "Parent Container" programmatically so I should configure Auto-size programmatically. I could not set height and width to -1 as I am getting the object as its class object(ParentContainerImpl). I am not getting that as 'DNodeContainerEditPart'. Can I get the DNodeContainerEditPart from the semantic class? How to get the newly created editpart?

[Updated on: Fri, 22 February 2019 04:01]

Report message to a moderator

Previous Topic:Problem when copying model elements using EcoreUtil
Next Topic:Creating an updatesite with examples
Goto Forum:
  


Current Time: Tue Apr 16 11:07:46 GMT 2024

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

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

Back to the top