Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Avoid Tree Collapsing
Avoid Tree Collapsing [message #175058] Mon, 03 March 2008 07:18 Go to next message
Eclipse UserFriend
Originally posted by: kamesh.sampath.gmail.com

Hi ,

I was trying the "Integrating EMF and GMF Generated Editors by Volker
Wegert and Alex Shatalin"

I successfully integrated the editor and things are working fine.


I have a small doubt on the same ,
Whenever i save the changes, the tree in the TreeViewer is automatically
collapsed .

Can anyone let me know how to avoid that so that my tree remains in the
last node selected when i clicked "save"

~Kamesh
Re: Avoid Tree Collapsing [message #175110 is a reply to message #175058] Mon, 03 March 2008 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hi Kamesh,

In your xxxDiagramEditor resourceChanged is invoked on save.Here you can
call your treeViewer.refresh(object) to maintain the tree state instead of
treeViewer.setInput(object).This will help you maitain the tree state.


Hope this will of help.

Regards,
Shwetha
Re: Avoid Tree Collapsing [message #175509 is a reply to message #175058] Tue, 04 March 2008 13:38 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Kamesh,

I think the reason for it is a refresh called from resourceChangeListener
of EMF-generated Editor (call to the handleActivate() method from resourceChanged()
one).

You can try to debug this code and modify it to correctly handle editor saving
(one possible solution is to fill savedResources collection with proper resources,
another - remove this listener at all and patch GMF-generated document provider
to update EMF editor too).

-----------------
Alex Shatalin
Previous Topic:how to get NodeObject from Notification
Next Topic:CustomModificationListener missing??
Goto Forum:
  


Current Time: Fri Apr 26 22:19:25 GMT 2024

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

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

Back to the top