Author: vrubezhny
Date: 2007-10-09 13:33:36 -0400 (Tue, 09 Oct 2007)
New Revision: 4081
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1016 Duplicate seam folders generated when select
path not to workspace
No more duplicates.
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java 2007-10-09
16:48:23 UTC (rev 4080)
+++
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java 2007-10-09
17:33:36 UTC (rev 4081)
@@ -70,6 +70,16 @@
return importedPrj;
}
+ public static IProject importExistingProject(IProject project, String location, String
name) throws CoreException {
+ IPath path = new Path(location).append(".project");
+ IProjectDescription description =
ResourcesPlugin.getWorkspace().loadProjectDescription(path);
+ description.setName(name);
+ project.create(description, new NullProgressMonitor());
+ project.open(IResource.BACKGROUND_REFRESH, new NullProgressMonitor());
+ ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, new
NullProgressMonitor());
+ return project;
+ }
+
public static IProject createEclipseProject(String projectName,
IProgressMonitor monitor) throws CoreException {