Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Showing the property while programmatically selecting a node
Showing the property while programmatically selecting a node [message #644021] Thu, 09 December 2010 06:26 Go to next message
Jeno Jeyakumar Nathaniel is currently offline Jeno Jeyakumar NathanielFriend
Messages: 18
Registered: April 2010
Junior Member
Hi All,

I have added a new view to my RCP based GMF editor.I have provided a tree view with a filter attached to it.So when I select a node from tree,the corresponding node is getting selected.But the property of that node is not visible in the property view.

For selecting the node i have used,
shapeNodeEditPart.getViewer().setSelection(
new StructuredSelection(shapeNodeEditPart));

Please help me in achieving it.




Re: Showing the property while programmatically selecting a node [message #644096 is a reply to message #644021] Thu, 09 December 2010 13:33 Go to previous messageGo to next message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hello,

You can try this:

DiagramEditDomain domain = (DiagramEditDomain)shapeEditPart.getViewer().getEditDomain();
domain.getDiagramEditorPart().getSite().getSelectionProvider().setSelection(
  new StructuredSelection(shapeNodeEditPart));


Regards,
Michael
Re: Showing the property while programmatically selecting a node [message #644257 is a reply to message #644021] Fri, 10 December 2010 09:32 Go to previous messageGo to next message
Jeno Jeyakumar Nathaniel is currently offline Jeno Jeyakumar NathanielFriend
Messages: 18
Registered: April 2010
Junior Member
Thanks Michael for your response...

I tried the same,but its not working for me.

Do we have to use the tree viewer for it?I am using SWT Tree to form the tree.

[Updated on: Fri, 10 December 2010 09:32]

Report message to a moderator

Re: Showing the property while programmatically selecting a node [message #644665 is a reply to message #644257] Mon, 13 December 2010 17:06 Go to previous message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hello,

I don't see how it may be related, because no matter what is your tree implementation, the code above relies on the GMF editor sending the selection change notification which should be handled by the property sheet.

Are you sure that you really tried the code above, because your original sample IS slightly different and should NOT work.

Regards,
Michael

[Updated on: Mon, 13 December 2010 17:08]

Report message to a moderator

Previous Topic:Diagram partitioning, keep editor
Next Topic:GMF model ported to web browser?
Goto Forum:
  


Current Time: Sat Apr 27 04:50:54 GMT 2024

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

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

Back to the top