Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Problem with IResourceChangeEvent ??
Problem with IResourceChangeEvent ?? [message #143471] Tue, 14 October 2003 05:29
Eclipse UserFriend
Hi,

I am perplexed as to why my ResourceDeltaVistor does print any
System.out's if I do the "event.getResource().getType()" call in listener.

If I comment that line out, everything works fine for this DeltaVisitor, but
since I seem to have done a "delta.getResource().getType()" in it, my other
deltavisitors in other plugins now dont get invoked.

Am I doing something wrong ? Can someone please help ??

Sincerely,

-Mohsin


public class MyResourceListener implements IResourceChangeListener
{
public void resourceChanged( IResourceChangeEvent event )
{
try
{
// doing a getType() causes the ResourceDeltaVisitor to not be invoked
???
event.getResource().getType();

event.getDelta().accept( new IResourceDeltaVisitor()
{
public boolean visit( IResourceDelta delta )
throws CoreException
{
System.out.println( "Flag " + delta.getFlags() );
System.out.println( "Kind " + delta.getKind() );
System.out.println( "Type " + delta.getResource().getType() );

// do not visit children
return true;
}
}
);
}
catch ( CoreException e )
{
e.printStackTrace();
}
}
}
Previous Topic:Cross version API compatibility
Next Topic:IViewActionDelegate and TableViewer
Goto Forum:
  


Current Time: Thu May 08 14:57:53 EDT 2025

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

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

Back to the top