|
|
|
|
|
|
Re: Milestones 0.10.0.v20130319-1346 remarks [message #1054952 is a reply to message #1053534] |
Wed, 08 May 2013 09:45 |
Marek Jagielski Messages: 97 Registered: April 2012 |
Member |
|
|
Hi,
So for:
1. I created a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=407510
2. Now in my code I added lines with upadates:
@Override
public PictogramElement add(IAddContext context) {
final Task addedTask = (Task) context.getNewObject();
final ContainerShape target = context.getTargetContainer();
final IPeCreateService peCreateService = Graphiti.getPeCreateService();
final IGaService gaService = Graphiti.getGaService();
final ContainerShape containerShape = peCreateService.createContainerShape(target, true);
int width = 0;
int height = 0;
width = context.getWidth() <= 0 ? getWidth() : context.getWidth();
height = context.getHeight() <= 0 ? getHeight() : context.getHeight();
final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);
// create and set visible rectangle inside invisible rectangle
RoundedRectangle roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 20, 20);
roundedRectangle.setParentGraphicsAlgorithm(invisibleRectangle);
roundedRectangle.setStyle(getStyle());
if(!addedTask.isAtomic()) roundedRectangle.setLineStyle(LineStyle.DOT);
gaService.setLocationAndSize(roundedRectangle, 0, 0, width, height);
insertInside(peCreateService, gaService, width, height, containerShape, invisibleRectangle, addedTask);
ContainerShape labelShape = addLabel(target, addedTask.getId(), width, height, context.getX(), context.getY());
link(containerShape, new Object[] {addedTask, labelShape});
link(labelShape, new Object[] {addedTask, containerShape});
updatePictogramElement(labelShape);
layoutPictogramElement(labelShape);
addInternalPorts(addedTask, containerShape);
updatePictogramElement(containerShape);
return containerShape;
}
But really the change of version affected like a whole system. Because I needed to add updates also in properties sections. It is probably that my code depends on something that before executed updates (Something maybe connected with EMF model). However before my code wasn't correct without explicitly invoking an update.
3. In fact, my workaround for me is ok. With creating an issue I would wait for the others users if they are affected.
Thanks,
Marek
|
|
|
Powered by
FUDForum. Page generated in 0.04030 seconds