public static IErlProject createProject(final IPath path, final String name)
     throws CoreException {
   final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
   final IProject project2 = root.getProject(name);
   try {
     project2.delete(true, null);
   } catch (final CoreException x) {
     // ignore
   }
   final IErlProject erlProject =
       ErlangEngine.getInstance().getModel().newProject(name, path.toPortableString());
   final IProject project = erlProject.getWorkspaceProject();
   final IErlangProjectProperties prefs = new OldErlangProjectProperties(project);
   final List<IPath> srcDirs = new ArrayList<IPath>();
   srcDirs.add(new Path("src"));
   prefs.setSourceDirs(srcDirs);
   buildPaths(root, project, srcDirs);
   final List<IPath> includeDirs = new ArrayList<IPath>();
   includeDirs.add(new Path("include"));
   buildPaths(root, project, includeDirs);
   prefs.setIncludeDirs(includeDirs);
   final List<IPath> ebinDirs = new ArrayList<IPath>();
   ebinDirs.add(new Path("ebin"));
   buildPaths(root, project, ebinDirs);
   prefs.setOutputDir(ebinDirs.get(0));
   projects.add(erlProject);
   return erlProject;
 }
  @Test
  public void sourcePathsShouldFollowPropertyChange() {
    final String expected = "hello/world;a/b";

    final IProject project = erlProject.getWorkspaceProject();
    final IEclipsePreferences node = new ProjectScope(project).getNode("org.erlide.core");
    node.put(ProjectPreferencesConstants.SOURCE_DIRS, expected);

    final IErlangProjectProperties pp = new ErlangProjectProperties(project);
    final String actual = pp.getSourceDirs().toString();

    assertThat(actual, is(convertListString(expected)));
  }
  @Test
  public void outputPathShouldFollowPropertyChange() {
    final String expected = "hello/world";

    final IProject project = erlProject.getWorkspaceProject();
    final IEclipsePreferences node = new ProjectScope(project).getNode("org.erlide.core");
    node.put(ProjectPreferencesConstants.OUTPUT_DIR, expected);

    final IErlangProjectProperties pp = new ErlangProjectProperties(project);
    final String actual = pp.getOutputDir().toPortableString();

    assertEquals(expected, actual);
  }