Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365536 - Using BoxRelativeAnchor with relativeWidth = 1 display ellipsis in related Text
Summary: Using BoxRelativeAnchor with relativeWidth = 1 display ellipsis in related Text
Status: CLOSED FIXED
Alias: None
Product: Graphiti
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.9.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: Juno M6 Theme_bugs
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-04 20:06 EST by Patrick Talbot CLA
Modified: 2012-06-29 04:20 EDT (History)
2 users (show)

See Also:
matthias.gorning: juno+


Attachments
AddFeature snippet (2.82 KB, text/plain)
2011-12-04 20:07 EST, Patrick Talbot CLA
no flags Details
Capture of the resulting figure (1.89 KB, image/png)
2011-12-04 20:08 EST, Patrick Talbot CLA
no flags Details
PropertyUtil used in the snippet (2.32 KB, application/octet-stream)
2011-12-05 10:29 EST, Patrick Talbot CLA
no flags Details
StyleUtil used by the snippet (3.59 KB, application/octet-stream)
2011-12-05 10:31 EST, Patrick Talbot CLA
no flags Details
Patch for tutorial to reproduce (14.01 KB, patch)
2011-12-30 05:11 EST, Michael Wenz CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Talbot CLA 2011-12-04 20:06:11 EST
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
Comment 1 Patrick Talbot CLA 2011-12-04 20:07:07 EST
Created attachment 207893 [details]
AddFeature snippet
Comment 2 Patrick Talbot CLA 2011-12-04 20:08:39 EST
Created attachment 207894 [details]
Capture of the resulting figure
Comment 3 Michael Wenz CLA 2011-12-05 07:20:55 EST
Could you also append the coding for your PropertyUtil and StyleUtil classes?
Comment 4 Patrick Talbot CLA 2011-12-05 10:29:25 EST
Created attachment 207925 [details]
PropertyUtil used in the snippet
Comment 5 Patrick Talbot CLA 2011-12-05 10:31:45 EST
Created attachment 207926 [details]
StyleUtil used by the snippet
Comment 6 Patrick Talbot CLA 2011-12-05 10:32:24 EST
I've added PropertyUtil and StyleUtil. There's not much to it though...
Thanks for having a look.
Comment 7 Michael Wenz CLA 2011-12-30 05:08:51 EST
Reproducable in tutorial after applying the following patch
Comment 8 Michael Wenz CLA 2011-12-30 05:11:05 EST
Created attachment 208868 [details]
Patch for tutorial to reproduce
Comment 9 Michael Wenz CLA 2011-12-30 05:11:47 EST
Patrick,
this is a really strange issue, we will have a closer look.
Comment 10 Patrick Talbot CLA 2011-12-30 05:43:41 EST
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?
Comment 11 Matthias Gorning CLA 2012-02-10 09:09:12 EST
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
Comment 12 Michael Wenz CLA 2012-04-11 10:54:47 EDT
Bookkeeping: Set target release
Comment 13 Michael Wenz CLA 2012-06-29 04:20:56 EDT
Part of Graphiti 0.9.0 (Eclipse Juno)