|
|
|
|
|
|
Re: IResourceListener only called at workspace level. [message #336176 is a reply to message #336169] |
Wed, 27 May 2009 21:30 |
|
Ray Pendergraph wrote:
> But I am not even getting any notification to say "go look at the
> deltas". In other words, given:
>
> IResourceChangeListener rcl = new IResourceChangeListener() {
> public void resourceChanged(IResourceChangeEvent event) {
> System.out.println("Got event "+event.getType()+"
> "+event.getResource().getName());
> .. }
> };
> ResourcesPlugin.getWorkspace().addResourceChangeListener(rcl );
>
>
> The println is never seen except for workspace level artifacts ... I
> should at least get that is what I am thinking. Even if there was a bug
> in my code handling the deltas later. I can successfully get the
> notification and deltas for a renamed project, but no notification
> whatsoever for renamed artifacts within a project.
The event holds a single delta, but that delta likely has child
deltas containing the information you seek. Use a
IResourceDeltaVisitor as indicated previously, and as Ed pointed
out, return *true* so that you also visit the child deltas as far
down as they go.
http://www.eclipse.org/articles/Article-Resource-deltas/reso urce-deltas.html
--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Powered by
FUDForum. Page generated in 0.03691 seconds