Skip to main content



      Home
Home » Eclipse Projects » GEF » Best way to refresh GraphicalEditor when resource changes outside GEF
Best way to refresh GraphicalEditor when resource changes outside GEF [message #227295] Fri, 01 December 2006 17:57 Go to next message
Eclipse UserFriend
Originally posted by: pbeag_RemoverIfNotASpammer_an.yahoo.com

I have implemented my GraphicalEditor as a IResourceChangeListener. I
detect that my underlying XML
file has been modified.

What is the best way to refresh my Editor? I was thinking:

1. upon focus returning to editor, display a message box to user
notifying of changed resource and asking if he wants to reload.
2. opening a new editor window, using IDE.openEditor
3. closing the old editor window


And ideas? Could I somehow refresh the contents of the editor from
within the editor itself? Like just call setInput() again?
Re: Best way to refresh GraphicalEditor when resource changes outside GEF [message #227332 is a reply to message #227295] Sun, 03 December 2006 19:35 Go to previous message
Eclipse UserFriend
Hi Patrick,

There is an example of this functionality in the Logic Editor example that
comes with GEF... Look at LogicEditor class, there is an inner class
ResourceTracker that handles situation of resource modification outside
the application.
Hope this helps.

Cheers,
Alex
Previous Topic:Guarantee uniqueness of labels
Next Topic:TranslateToAbsolute() with ScrollPane
Goto Forum:
  


Current Time: Sat May 24 09:56:01 EDT 2025

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

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

Back to the top