Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Howto observe external folder with IResourceChangeListener
Howto observe external folder with IResourceChangeListener [message #699818] Fri, 22 July 2011 07:30
T. Wilhelm is currently offline T. Wilhelm
Messages: 7
Registered: December 2010
Junior Member
Hi all,

i have a question about the IResourceChangeListener. I want to observe a special folder which is not located in my workspace. Is that possible? Can i do that with IResourceChangeListener? I tried it already, but wasn´t really successful. I found a solution which first creates a project within the workspace, then creates a link to the external folder and that seems to work, but thats solution is not really nice.

Here is my code (without the link solution) , any idea whats wrong or why my resourceChanged() method is never been called? Thanks a lot!

IWorkspace workspace = ResourcesPlugin.getWorkspace();
workspace.addResourceChangeListener( this );

IPathVariableManager pathManager = workspace.getPathVariableManager();
this.path = new Path( "c:/temp/folderToObserve");
URI uri = this.path.toFile().toURI();

if ( pathManager.validateName( "myName" ).isOK() && pathManager.validateValue( value ).isOK() )
{
    pathManager.setURIValue( "myName", uri );
}


Thanks alot
Thomas
Previous Topic:How to change the caption of a button in the eclipse main toolbar
Next Topic:What is the difference between forums PDE - Plugin Development Environment and Plugin Development En
Goto Forum:
  


Current Time: Thu Jul 24 20:38:33 EDT 2014

Powered by FUDForum. Page generated in 0.01583 seconds