Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » How to avoid overlapping of containers while using custom layout provider(How to avoid overlapping of containers while using custom layout provider)
How to avoid overlapping of containers while using custom layout provider [message #1808919] Thu, 04 July 2019 13:30 Go to next message
Sharmila D is currently offline Sharmila DFriend
Messages: 81
Registered: June 2018

All I am using custom layout provider to increase the size of container based on border nodes. It is working fine It is increasing the size.But if I import any big file containers are overlapping.

Please find the below code i have added in Customlayoutprovider

public class Customlayoutprovider implements LayoutProvider {

public Customlayoutprovider () {

private AbstractLayoutEditPartProvider global_layoutNodeProvider;

public boolean provides(IGraphicalEditPart container) {

return true;

public AbstractLayoutEditPartProvider
getLayoutNodeProvider(IGraphicalEditPart container) {
try {

if (this.global_layoutNodeProvider == null) {

final CompoundLayoutProvider local_compoundLayoutProvider = new

final CustomEditorPartLayoutProvider local_editorProvider = new

(new PinnedElementsLayoutProvider(local_editorProvider));


AbstractLayoutProvider local_abstractLayoutProvider = new

this.global_layoutNodeProvider =
new ArrangeSelectionLayoutProvider
else {

this.global_layoutNodeProvider =
new ArrangeSelectionLayoutProvider

catch (Exception e) {
}/* End of catch(Exception e) */

return global_layoutNodeProvider;

public boolean isDiagramLayoutProvider() {

return true;


public class CustomLayout extends AbstractLayoutProvider {

public Command layoutEditParts(final List selectedObjects,
final IAdaptable layoutHint) {

Command local_command = null;

local_command = layoutEditParts(selectedObjects,
layoutHint, true);

if (selectedObjects.isEmpty()) {

return UnexecutableCommand.INSTANCE;

for (IGraphicalEditPart graphicalEditPart : Iterables.
IGraphicalEditPart.class)) {
//Resolve the graphicalEditPart to EObject.
EObject local_semanticElement = graphicalEditPart.
my code where based on border nodes size of the container will increase.

public class CustomEditorPartLayoutProvider extends AbstractCompositeLayoutProvider {

There is a problem if I import big file containers are ovelapping.Please find the attached screenshot .Please any one help me how to avoid overlapping of containers

Re: How to avoid overlapping of containers while using custom layout provider [message #1808978 is a reply to message #1808919] Fri, 05 July 2019 12:47 Go to previous message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 250
Registered: June 2017
Senior Member

Layouting is a very complex matter. Since you are doing the layouting with your own code that we don't have access to or that we don't have enough resources to debug your case, we cannot help you with that.
But from what I understand first you retrieve the layout that does not take in consideration your constraint then you change the sizes. The layouting did let enough space between container that you grow bigger because it cannot know. So you have the overlap. You have to also change the positions of containers to remove this overlap. Sirius cannot do anything for you. It is up to you.

Pierre Guilet - Obeo
Need training or professional services for Sirius?
Previous Topic:String representation of constraints
Next Topic:Problems while editing double attributes with Text-Widget
Goto Forum:

Current Time: Tue Mar 31 03:19:04 GMT 2020

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

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

Back to the top