Community
Participate
Working Groups
Build Identifier: Graphiti 0.8.1 As explained on the forum (http://www.eclipse.org/forums/index.php/t/263097/) I'm having trouble with BoxRelativeAnchor. As soon as I add a BoxRelativeAnchor with setRelativeWidth(1.0) to my shape, the related text show ellipsis where there is plenty of room to display full text. See the attached snippet for the code I use. Here's a dump of a figure that is not displaying correctly: Pictogram Model Tree() *PE* ContainerShapeImpl (active) (visible) RectangleImpl (100, 50, 100, 80) *PE* ShapeImpl (inactive) (visible) PolylineImpl (0, 0, 101, 1) *PE* ShapeImpl (inactive) (visible) TextImpl (0, 0, 100, 16) *PE* ContainerShapeImpl (active) (visible) TextImpl (3, 16, 94, 16) *PE* ChopboxAnchorImpl (inactive) (invisible) *PE* BoxRelativeAnchorImpl (active) (invisible) RectangleImpl (-2, 0, 1, 1) *PE* BoxRelativeAnchorImpl (active) (invisible) RectangleImpl (2, 0, 1, 1) *PE* ContainerShapeImpl (active) (visible) TextImpl (3, 32, 94, 16) *PE* ChopboxAnchorImpl (inactive) (invisible) *PE* BoxRelativeAnchorImpl (active) (invisible) RectangleImpl (-2, 0, 1, 1) *PE* BoxRelativeAnchorImpl (active) (invisible) RectangleImpl (2, 0, 1, 1) *PE* ContainerShapeImpl (active) (visible) TextImpl (3, 48, 94, 16) *PE* ChopboxAnchorImpl (inactive) (invisible) *PE* BoxRelativeAnchorImpl (active) (invisible) RectangleImpl (-2, 0, 1, 1) *PE* BoxRelativeAnchorImpl (active) (invisible) RectangleImpl (2, 0, 1, 1) *PE* ChopboxAnchorImpl (inactive) (invisible) Edit Part Tree() ContainerShapeEditPart (RectangleImpl) ContainerShapeEditPart (TextImpl) BoxRelativeAnchorEditPart (RectangleImpl) BoxRelativeAnchorEditPart (RectangleImpl) ContainerShapeEditPart (TextImpl) BoxRelativeAnchorEditPart (RectangleImpl) BoxRelativeAnchorEditPart (RectangleImpl) ContainerShapeEditPart (TextImpl) BoxRelativeAnchorEditPart (RectangleImpl) BoxRelativeAnchorEditPart (RectangleImpl) Figure Tree GFRectangleFigure (Rectangle(100, 50, 100, 80)) GFPolyline (Rectangle(100, 66, 101, 1)) GFText (text: solution_names) (Rectangle(100, 50, 100, 16)) GFText (text: solution_id) (Rectangle(103, 66, 94, 16)) GFRectangleFigure (NOT visible) (Rectangle(101, 74, 1, 1)) GFRectangleFigure (NOT visible) (Rectangle(199, 74, 1, 1)) GFText (text: solution_name) (Rectangle(103, 82, 94, 16)) GFRectangleFigure (NOT visible) (Rectangle(101, 90, 1, 1)) GFRectangleFigure (NOT visible) (Rectangle(199, 90, 1, 1)) GFText (text: display_name) (Rectangle(103, 98, 94, 16)) GFRectangleFigure (NOT visible) (Rectangle(101, 106, 1, 1)) GFRectangleFigure (NOT visible) (Rectangle(199, 106, 1, 1)) See the result in the capture attached Reproducible: Always
Created attachment 207893 [details] AddFeature snippet
Created attachment 207894 [details] Capture of the resulting figure
Could you also append the coding for your PropertyUtil and StyleUtil classes?
Created attachment 207925 [details] PropertyUtil used in the snippet
Created attachment 207926 [details] StyleUtil used by the snippet
I've added PropertyUtil and StyleUtil. There's not much to it though... Thanks for having a look.
Reproducable in tutorial after applying the following patch
Created attachment 208868 [details] Patch for tutorial to reproduce
Patrick, this is a really strange issue, we will have a closer look.
Yes, it is strange. Actually in the meantime, I've found a workaround (still doesn't explain why it happened first, though) In the AddFeature, changing the line: gaService.setLocationAndSize(rect, 0, 0, 1, 1); to gaService.setLocationAndSize(rect, -1, 0, 1, 1); does the trick for me, maybe this will give you a clue?
Fixed. commit 29abf44418dc6f642611b46ebfb483b93d622122 Author: mgorning <matthias.gorning@sap.com> 2012-02-10 15:04:17 Committer: mgorning <matthias.gorning@sap.com> 2012-02-10 15:04:17 Parent: 866e1b1802569ac4b289e9d950a8a8db60c4481b (Bug 370457: Removed license from feature properties since it's imported from the central license feature) Branches: origin/master, master
Bookkeeping: Set target release
Part of Graphiti 0.9.0 (Eclipse Juno)