Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » About navigator....
About navigator.... [message #735357] Tue, 11 October 2011 15:22 Go to next message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
does anybody know how to delete the element in the navigator? As far as i know this navigator is read-only.. but i wonder if there is anyway to realize this delete action. now i could only get the EObject from the navigator but could not get the editpart..
could anybody help??

Re: About navigator.... [message #735479 is a reply to message #735357] Wed, 12 October 2011 00:50 Go to previous messageGo to next message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
any body?
Re: About navigator.... [message #735550 is a reply to message #735479] Wed, 12 October 2011 07:31 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

do you want to delete model elements when having a file exploded in navigator so that it shows the structure of your model as tree view? I think this is read only but you could take the code that is generated by emf for the editor and put it into a view. This would enable you to display a file in a tree view and modify it.

Ralph
Re: About navigator.... [message #736058 is a reply to message #735550] Thu, 13 October 2011 13:23 Go to previous messageGo to next message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
Hey thanks for your prompt answer:) could you give me some more detail on how to use this edit plugin? i mean how to generate a view form the edit. do you mean i should implement my own navigator ?
Re: About navigator.... [message #736719 is a reply to message #736058] Fri, 14 October 2011 09:12 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

for your emf model you can create a .editor plugin in the same way you can create the model code. In this plugin take a look at xxxEditor.java. This implements a TreeEditor for your EMF model. This is a good starting point. If you need further assistance on this you also might ask the people in the EMF forums.

Ralph
Re: About navigator.... [message #739385 is a reply to message #736719] Mon, 17 October 2011 12:16 Go to previous messageGo to next message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
Hey thank you for your answer:-) Anyway i will try this..
but i still get a question before i abandon the navigator generated by gmf..
i wonder if there is anyway i could get the editpart when i select an element in the navigator..
i believe i could realize my requirment if i could get a selected editpart:-)
Re: About navigator.... [message #740195 is a reply to message #739385] Tue, 18 October 2011 08:50 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
You can get the editopart if you enable the small synchronize button at the top of the navigator view.
Re: About navigator.... [message #741111 is a reply to message #740195] Wed, 19 October 2011 07:33 Go to previous messageGo to next message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
hey thank you~ but how to enable the small synchronize button? By setting *.gmfgen-->gen Diagram *DiagramEditPart-->Diagram-->Synchronized to true?
Re: About navigator.... [message #742354 is a reply to message #741111] Thu, 20 October 2011 12:21 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
This button is by default in the navigator view. You only need to press it.
Re: About navigator.... [message #753409 is a reply to message #742354] Thu, 27 October 2011 06:32 Go to previous messageGo to next message
Cindy  is currently offline Cindy Friend
Messages: 59
Registered: May 2011
Member
hey thank you ~ but i am still confused.. how can i get the editpart with the button pressed? could you give me a sample of code for this ?
Re: About navigator.... [message #753423 is a reply to message #753409] Thu, 27 October 2011 08:18 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

take a look at this link http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Freference%2Fref-27.htm There is this section

Quote:
Link with Editor

This command toggles whether the Project Explorer view selection is linked to the active editor. When this option is selected, changing the active editor will automatically update the Project Explorer selection to the resource being edited.
Previous Topic:Setting attribute by drag&drop
Next Topic:Shared editing domain -- problems with references to host edit parts in edit policies
Goto Forum:
  


Current Time: Thu Mar 28 15:22:10 GMT 2024

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

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

Back to the top