Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Detecting external changes to a resource
Detecting external changes to a resource [message #814492] Tue, 06 March 2012 09:10 Go to next message
Sabelia Ruiz is currently offline Sabelia Ruiz
Messages: 2
Registered: June 2011
Junior Member
Hello,

I'm working in an editor using MultiPageEditorPart, but I realize that this is not dectatecta changes made outside of Eclipse, I'm using IResourceChangeListener but this detects only changes in the workspace.

And I'm looking to detect changes in the workspace that occur outside the Eclice.

any ideas?
Re: Detecting external changes to a resource [message #814504 is a reply to message #814492] Tue, 06 March 2012 09:29 Go to previous messageGo to next message
Martin Skorsky is currently offline Martin Skorsky
Messages: 112
Registered: July 2009
Senior Member
Check if the file is synchronized and refresh if needed:
if (!file.isSynchronized(IResource.DEPTH_ZERO)) {
file.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
}
Object file is an IFile.
Re: Detecting external changes to a resource [message #814683 is a reply to message #814504] Tue, 06 March 2012 14:17 Go to previous messageGo to next message
Sabelia Ruiz is currently offline Sabelia Ruiz
Messages: 2
Registered: June 2011
Junior Member
ok I did the check and refresh but still does not detect any changes made outside of Eclipse
Re: Detecting external changes to a resource [message #869493 is a reply to message #814492] Thu, 03 May 2012 09:27 Go to previous message
Dani Megert is currently offline Dani Megert
Messages: 3801
Registered: July 2009
Senior Member
On 06.03.2012 15:10, Sabelia Ruiz wrote:
> Hello,
>
> I'm working in an editor using MultiPageEditorPart, but I realize that
> this is not dectatecta changes made outside of Eclipse, I'm using
> IResourceChangeListener but this detects only changes in the workspace.
>
> And I'm looking to detect changes in the workspace that occur outside
> the Eclice.
In 3.7 and newer, you can choose to refresh on access (see 'Workspace'
preference page). If that's enabled then you should get the delta at
some point.

Dani
>
> any ideas?
Previous Topic:New+CTRL+SPACE in Scrapbook
Next Topic:Terminology Questions
Goto Forum:
  


Current Time: Mon Jul 28 04:36:41 EDT 2014

Powered by FUDForum. Page generated in 0.02039 seconds