eclipse plugin: use the location full path rather than directory name

This commit is contained in:
Timotei Dolean 2010-07-04 20:25:27 +00:00
parent 230d4e9c96
commit 468ed5e063

View file

@ -142,10 +142,14 @@ public class WorkspaceUtils
if (!proj.exists())
{
IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription("User Addons");
// cleanup any project file if exists.
// cleanup any strictly-project related files if any.
if (new File(userDir + Path.SEPARATOR + "data/add-ons/.project").exists())
new File(userDir + Path.SEPARATOR + "data/add-ons/.project").delete();
if (new File(userDir + Path.SEPARATOR + "data/add-ons/.ignore").exists())
new File(userDir + Path.SEPARATOR + "data/add-ons/.ignore").delete();
description.setLocation(new Path(userDir + Path.SEPARATOR + "data/add-ons/"));
proj.create(description, null);
proj.open(null);
@ -167,7 +171,7 @@ public class WorkspaceUtils
{
if (project.getName().equals("User Addons"))
continue;
skipList += (project.getName() + "\n");
skipList += (project.getLocation().toOSString() + "\n");
}
ResourceUtils.createFile(proj, ".ignore",skipList);
}