Cannot move ContainerShape [message #1719265] |
Wed, 06 January 2016 11:46  |
Eclipse User |
|
|
|
I rewrote part of my code to correct some issues and somehow ended up not being able to move my ContainerShape. All I am getting is the marquee rectangle when trying to select and move the shape. FeatureProvider's getMoveShapeFeature() is not being called when I try to move the shape, but is being called when I try to move shapes inside my container. Can anybody offer advice on what would cause this behavior or good place to debug?
Thanks,
Alex
[Updated on: Wed, 06 January 2016 11:53] by Moderator
|
|
|
|
Re: Cannot move ContainerShape [message #1720171 is a reply to message #1719702] |
Thu, 14 January 2016 16:19   |
Eclipse User |
|
|
|
Michael,
No, the container shape is active.
Here is part of the code that was changed:
ContainerShape containerShape = peCreateService.createContainerShape(context.getTargetContainer(), true);
MapperUtil.addProperty(containerShape, MapperConstans.CONTAINER_TYPE, MapperConstans.INVISIBLE_CONTAINER_TYPE);
Rectangle invisibleContainer = createService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(invisibleContainer, context.getX(), context.getY(), width, 60);
RoundedRectangle roundedRectangle = createService.createRoundedRectangle(invisibleContainer, 10, 10);
roundedRectangle.setBackground(manageColor(IColorConstant.WHITE));
roundedRectangle.setLineWidth(3);
//containerShape.setStyle(StyleUtil.getStyleForChannelComponentContainer(getDiagram()));
layoutService.setLocationAndSize(roundedRectangle, 5, 5, width-10, 50);
...
...
link(containerShape, context.getNewObject());
peCreateService.createChopboxAnchor(containerShape);
if(hasIncomingConnection()){
createAnchor(containerShape, roundedRectangle, AnchorLocation.LEFT);
}
if(hasOutgoingConnection()){
createAnchor(containerShape, roundedRectangle, AnchorLocation.RIGHT);
}
layoutPictogramElement(containerShape);
return containerShape;
And here is a video I recorded to further show the issue

As you can see I can't move the main container itself, but I can execute code inside MoveFeature when trying to move containers inside the main container.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03893 seconds