Skip to main content


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 11:30
T. Wilhelm is currently offline T. WilhelmFriend
Messages: 8
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 Apr 25 20:18:35 GMT 2024

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

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

Back to the top