Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Document save event in eclipse
Document save event in eclipse [message #461539] Thu, 11 January 2007 12:35 Go to next message
Eclipse UserFriend
Hi,

In my eclipse plugin how do I know if a document was saved in the
editor? (Either using File->Save or Save All or click on the 'X' button of
the editor).

Thanks in advance,
Vishal
Re: Document save event in eclipse [message #461552 is a reply to message #461539] Thu, 11 January 2007 19:07 Go to previous messageGo to next message
Eclipse UserFriend
You can ask an IEditorPart if it isDirty() ... that will tell you if a
document has been saved (or never been dirtied).

Later,
PW
Re: Document save event in eclipse [message #461560 is a reply to message #461552] Fri, 12 January 2007 01:59 Go to previous messageGo to next message
Eclipse UserFriend
Hi Paul,

Many thanks for your reply.

Actually I need to keep track that a file was saved in eclipse. So when do
I query the editor part?

I am working on eclipse 3.1 plug-in. What I have currently done is I have
replaced the editor's Save action and put in my own(in the menubar,
context menu and registered with the key binding service). Thus I get a
event when the file is saved using File->Save. However, when the file is
saved with save all or by clicking the 'X' button my save action does not
get any event.

Best Regards,
Vishal
Re: Document save event in eclipse [message #461590 is a reply to message #461560] Fri, 12 January 2007 15:30 Go to previous message
Eclipse UserFriend
Hi,

IResourceChangeEvent seems to be promising but it does not get called when
a single file is opened without any project being opened in the eclipse
editor.

Thanks,
Vishal
Previous Topic:Show_View-Action allways disabled
Next Topic:Extension Point Question
Goto Forum:
  


Current Time: Wed Mar 26 08:22:09 EDT 2025

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

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

Back to the top