Obtain the path of the modified java file using IElementChangedListener


I am using IElementChangedListener to listen to changes in the Java Model in eclipse plug-in I am making.

Is there any way I can get the path of the java file that had the change using this Listener or should I try a different Listener?

Any suggestions or links are appreciated. Thanks

The IJavaElementDelta available in the ElementChangedEvent event has a getElement() method which returns an IJavaElement.

IJavaElement has a getPath() method which 'Returns the path to the innermost resource enclosing this element'.

You may have to look at the added / affected / changed children in the delta to get all changes.