Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Editor window persistence problem
Editor window persistence problem [message #334069] Mon, 19 January 2009 05:29 Go to next message
Sheela is currently offline SheelaFriend
Messages: 52
Registered: July 2009
Member
I have a multipage editor based on eclipse platform.
A bug i noticed in my editor is that when i delete a file from the
navigator window, if the file is the active editor in the editor window,
the editor continues to stay open(as though the file hasnt been deleted
i.e, it does not close), even though the file has been removed from the
navigator view.

Eclipse itself works perfectly when i tried this, so im not sure what i ve
missed.

Thanks in advance,

Regards,
Sheela
Re: Editor window persistence problem [message #334084 is a reply to message #334069] Mon, 19 January 2009 19:29 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Something based on AbstractTextEditor is using the IDocument,
IDocumentProvider, and
org.eclipse.ui.texteditor.AbstractTextEditor.ElementStateLis tener to
close itself when the element is deleted.

If you are processing a FileEditorInput you would have to add your own
IResourceChangeListener (or appropriate workspace listener) so if the
resource is deleted you can close your editor.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:[PDE Build] Feature builds question
Next Topic:Best Practice for FormEditor's dirtyState/saving
Goto Forum:
  


Current Time: Thu Jul 18 03:27:00 GMT 2024

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

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

Back to the top