[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: Help with IResourceChangeListener

Ani,

The DELETE delta should have the MOVED_TO flag set and the ADD delta will have the MOVED_FROM flag set. When these flags are set, you can use the getMovedToPath/getMovedFromPath methods to get the destination/source paths respectively.

If you want to just look for a single delta node, I would suggest looking for the ADD, check to ensure that it has the MOVED_FROM flag set (delta.getFlags() & IResourceDelta.MOVED_FROM != 0) and, if it does, call getMovedFromPath to get the source path.

Michael

Ani wrote:
Hello
I have implmented the IResourceChangeListener to keep track of changes to resources. When a resource is renamed, how can I detect the Old name of the resource
Looks like for a name change , there are 2 entries in the ResourceDelta 1) For a IResource.DELETE 2) IResource.ADD



I cannot figure out a simple methods to get the old name of the resource, whose name has changed


Any help / references is appreciated

thanks
- Ani