title: IResourceChangeEvent - how to identify a project delete/rename
body: <p>How can I properly distinguish, inside an <code>IResourceChangeListener</code> that is added via <code>ResourcePlugin.getWorkspace().addResourceChangeListener(...)</code> that a Project was deleted / renamed?</p>
  
  <p>Through trying things out, it would seem that the <code>IResourceChangeEvent.getDelta() -&gt; IResourceDelta</code> would be the answer.</p>
  
  <p>From <a href="http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fresources%2FIResourceChangeEvent.html" rel="noreferrer">Eclipse API</a>: </p>
  
  <blockquote>
    <p>After-the-fact batch reports of arbitrary creations, deletions and
    modifications to one or more resources expressed as a hierarchical
    resource delta. Event type is POST_CHANGE, and getDelta returns the
    hierarchical delta. The resource delta is rooted at the workspace
    root. These events are broadcast to interested parties after a set of
    resource changes and happen whether or not autobuilding is enabled.
    The workspace is closed for change during notification of these
    events. The delta reported in this event cycle is identical across all
    listeners registered for this type of event.</p>
  </blockquote>
  
  <p>EDIT: adding my findings so far</p>
  
  <p>So, the <code>Event.getType()</code> is <code>POST_CHANGE</code> and there needs to be either </p>
  
  <ul>
  <li><p>a delta that contains a child <code>IResourceDelta</code> that has the <code>getKind() == REMOVED</code> for a deletion, and the delta <code>getResource().getType() == PROJECT</code>  so that we know it's a project
  ( this <code>IResourceDelta</code> should not have any children ) </p></li>
  <li><p>a <code>getDelta()</code> that contains two children <code>IResourceDelta</code> that have <code>getKind() == REMOVED</code> and <code>getKind() == ADDED</code>, also the <code>getResource().getType() == PROJECT</code>, and those <code>IResourceDelta</code> contain no children Deltas (I've observed that when a file is renamed/deleted, the <code>IProject</code> the resource belongs to is the one that is on the first row of children of the parent <code>Delta</code>...)</p></li>
  </ul>
  
  <p>Can someone confirm this supposition? Is if it really necessary to do a tree depth search for children to realize if the Event is of a project rename/delete or a file/folder?</p>