private static BPListElement findElement(IModelElement element, BPListElement[] elements) {
   IPath path = element.getPath();
   for (int i = 0; i < elements.length; i++) {
     BPListElement cur = elements[i];
     if (cur.getEntryKind() == IBuildpathEntry.BPE_SOURCE && cur.getPath().equals(path)) {
       return cur;
     }
   }
   return null;
 }
 /** {@inheritDoc} */
 protected INewWizard createWizard() throws CoreException {
   BPListElement newEntrie =
       new BPListElement(fSelectedProject, IBuildpathEntry.BPE_SOURCE, false);
   BPListElement[] existing = BPListElement.createFromExisting(fSelectedProject);
   boolean isProjectSrcFolder = BPListElement.isProjectSourceFolder(existing, fSelectedProject);
   fAddSourceFolderWizard =
       new AddSourceFolderWizard(
           existing, newEntrie, fIsLinked, false, false, isProjectSrcFolder, isProjectSrcFolder);
   return fAddSourceFolderWizard;
 }
 /** {@inheritDoc} */
 protected INewWizard createWizard() throws CoreException {
   BPListElement[] existingEntries = BPListElement.createFromExisting(fSelectedProject);
   BPListElement elementToEdit = findElement(fSelectedElement, existingEntries);
   fEditFilterWizard = new EditFilterWizard(existingEntries, elementToEdit);
   return fEditFilterWizard;
 }