Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » OutlineView: 2 TreeEditParts -> 1 Model
OutlineView: 2 TreeEditParts -> 1 Model [message #658821] Wed, 09 March 2011 22:28 Go to next message
Artjom is currently offline ArtjomFriend
Messages: 9
Registered: December 2010
Junior Member
I have implemented an OutlineView, that has 2 TreeEditParts(TEP) for one EditPart in Editor(2 TEP for one Model) and i have a problem with this, because if I select one of these TEP it jumps to another.
I understand the reason of that, but i can't fix it. Can somebody help me?

My opinion for the reason is a selection process in GMF:
if I select first TEP than it's selects corresponding object in editor, and than this object sends back select notification event to outlineview to second editpart, therefore it jumps.






Re: OutlineView: 2 TreeEditParts -> 1 Model [message #658873 is a reply to message #658821] Thu, 10 March 2011 08:26 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 09-03-11 23:28, Artjom wrote:
> I have implemented an OutlineView, that has 2 TreeEditParts(TEP) for one
> EditPart in Editor(2 TEP for one Model) and i have a problem with this,
> because if I select one of these TEP it jumps to another.
> I understand the reason of that, but i can't fix it. Can somebody help me?
>
> My opinion for the reason is a selection process in GMF:
> if I select first TEP than it's selects corresponding object in editor,
> and than this object sends back select notification event to outlineview
> to second editpart, therefore it jumps.
>
The DiagramEditor has a selection synchronizer. by default, it would
have the treeeditpart and the Diagramedit part added to the
synchronizer. It also allows, some customization. Have a look at it.
you can get it with getSelectionSynchronizer() in the editor.

Cheers Christophe

>
>
>
>
>
>
Re: OutlineView: 2 TreeEditParts -> 1 Model [message #658910 is a reply to message #658821] Thu, 10 March 2011 12:25 Go to previous messageGo to next message
Artjom is currently offline ArtjomFriend
Messages: 9
Registered: December 2010
Junior Member
Thanks for the reply,
I have already tried to customize SelectionSynchronizer(method convert), but unsuccessful.
Which ideas do you have to prevent this problem?
Re: OutlineView: 2 TreeEditParts -> 1 Model [message #658926 is a reply to message #658910] Thu, 10 March 2011 12:57 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 10-03-11 13:25, Artjom wrote:
> Thanks for the reply,
> I have already tried to customize SelectionSynchronizer(method convert),
> but unsuccessful.
> Which ideas do you have to prevent this problem?
One idea, would be to disable the synchronizer first (Extend it, and
make sure it doesn't call super.selectionChanged(...). Than you would
whatever you deem necessary for your app.

Another idea, is to add your 2nd TEP to the synchronizer .addView() method.
Re: OutlineView: 2 TreeEditParts -> 1 Model [message #660588 is a reply to message #658926] Sat, 19 March 2011 17:10 Go to previous messageGo to next message
Artjom is currently offline ArtjomFriend
Messages: 9
Registered: December 2010
Junior Member
Thanks, i have found a solution Smile
Re: OutlineView: 2 TreeEditParts -> 1 Model [message #660651 is a reply to message #660588] Sun, 20 March 2011 16:41 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
On 19-03-11 10:10, Artjom wrote:
> Thanks, i have found a solution :)
Could you please share it with the forum? Thx
Re: OutlineView: 2 TreeEditParts -> 1 Model [message #660716 is a reply to message #660651] Mon, 21 March 2011 11:27 Go to previous message
Sophia is currently offline SophiaFriend
Messages: 4
Registered: March 2011
Junior Member
I faced the same problem with outline view.
Solution I followed is ..
extend the SelectionSynchronizer and override the selectionChanged(SelectionChangedEvent event) method to do synchronization for all other editparts except my implementations.
Previous Topic:ToolBarManager: remove subItem
Next Topic:Manipulate Notational Model on Element Creation
Goto Forum:
  


Current Time: Tue Nov 12 06:42:14 GMT 2024

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

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

Back to the top