/** ***************************************************************************** */
  void editProject(Element pxml) {
    for (Element oelt : IvyXml.children(pxml, "OPTION")) {
      String k = IvyXml.getAttrString(oelt, "KEY");
      String v = IvyXml.getAttrString(oelt, "VALUE");
      pybase_prefs.setProperty(k, v);
    }

    Set<IPathSpec> done = new HashSet<IPathSpec>();
    boolean havepath = false;
    for (Element pelt : IvyXml.children(pxml, "PATH")) {
      havepath = true;
      File f1 = new File(IvyXml.getAttrString(pelt, "DIRECTORY"));
      try {
        f1 = f1.getCanonicalFile();
      } catch (IOException e) {
        f1 = f1.getAbsoluteFile();
      }
      boolean fnd = false;
      for (IPathSpec ps : project_paths) {
        if (done.contains(ps)) continue;
        File p1 = ps.getOSFile(base_directory);
        if (f1.equals(p1)) {
          done.add(ps);
          fnd = true;
          // handle changes to ps at this point
          break;
        }
      }
      if (!fnd) {
        String fp1 = f1.getPath();
        String fp2 = base_directory.getPath();
        boolean rel = false;
        if (fp1.startsWith(fp2)) {
          String fp3 = fp1.substring(fp2.length());
          StringTokenizer tok = new StringTokenizer(fp3, File.separator);
          File fd = null;
          while (tok.hasMoreTokens()) {
            String nm0 = tok.nextToken();
            if (fd == null) fd = new File(nm0);
            else fd = new File(fd, nm0);
          }
          f1 = fd;
          rel = true;
        }
        boolean usr = IvyXml.getAttrBool(pelt, "USER");
        IPathSpec ps = project_manager.createPathSpec(f1, usr, true, rel);
        done.add(ps);
        project_paths.add(ps);
      }
    }

    if (havepath) {
      for (Iterator<IPathSpec> it = project_paths.iterator(); it.hasNext(); ) {
        IPathSpec ps = it.next();
        if (!done.contains(ps)) it.remove();
      }
    }

    project_nature.rebuildPath();

    saveProject();
  }