Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » problem with traversing thread items in mindmap tutorial
problem with traversing thread items in mindmap tutorial [message #172334] Tue, 12 February 2008 17:27 Go to next message
John Yotka is currently offline John YotkaFriend
Messages: 144
Registered: July 2009
Senior Member
ThreadThreadItemCompartmentEditPart has the ListLayout set to true so
that it is a derived from a ListCompartmentEditPart. If you populate
this compartment with ThreadItems of varying string length you cannot
traverse the list using the up/down arrows as you would expect too.

The reason is that the navigateNextSibling/findSibling methods in
GraphicalViewerKeyHandler use the center point of the text (for each
ThreadItem) to compare positional relationships between the current
selected item and the other items in the compartment. If the next
item's text is sufficiently longer or shorter then the current item's
text, the comparison will consider that item to be either east or west
of the current item, not north or south. So it won't select it. In a
ListCompartmentEditPart the comparison point should be the center point
of the left edge, not the center point of the whole text!

My problem is that I have a compartment using the listLayout and need to
have the up/down arrows traverse as expected. Is there some way to
override these methods so that I can correct the behavior.
Re: problem with traversing thread items in mindmap tutorial [message #172434 is a reply to message #172334] Wed, 13 February 2008 14:18 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello John,

Try patching CompartmentEditPart.xpt in accordance and use it in code generation
process using "custom templates" GMF feature - this will help you to populate
this method into all the ListCompartmentEditParts in your generated diagram.
In addition you can file corresponding request for a GMF runtime.

-----------------
Alex Shatalin
Previous Topic:Position of child nodes in a compartment
Next Topic:How to reorder the shortcut popup menu
Goto Forum:
  


Current Time: Sun Sep 22 10:23:32 GMT 2024

Powered by FUDForum. Page generated in 0.04181 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top