Milestones 0.10.0.v20130319-1346 remarks [message #1053017] |
Wed, 01 May 2013 22:01  |
Eclipse User |
|
|
|
Hi,
I switched from version 0.9.2 to 0.10.0.v20130319-1346 in my juno eclipse. I remarked some issues. Are they planed behaviors prepared for new release?
1. Making grid invisible in way:
ScalableFreeformRootEditPart rootEditPart = (ScalableFreeformRootEditPart) getGraphicalViewer().getEditPartRegistry().get(LayerManager.ID);
IFigure gridFigure = ((LayerManager)rootEditPart).getLayer(LayerConstants.GRID_LAYER);
gridFigure.setVisible(false);
now color of the background is gray instead of white (Btw, in my case it even looks nicer).
2. Adding a shape to diagram is not followed by UpadeteFeature.
3. And of course getDiagramEditor() from AbstractFeature is deprecated. Is there already guide to make a migration. Particulary, I have problmes with:
* void selectPictogramElements(PictogramElement[])
* IEditorInput getEditorInput()
Thanks,
Marek
|
|
|
|
|
|
|
|
Re: Milestones 0.10.0.v20130319-1346 remarks [message #1054952 is a reply to message #1053534] |
Wed, 08 May 2013 05:45  |
Eclipse User |
|
|
|
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.04694 seconds