Author: mculpepper(a)jboss.com
Date: 2007-05-21 19:56:22 -0400 (Mon, 21 May 2007)
New Revision: 2050
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java
Log:
added a new utility method "workspacePathToAbsolutePath"
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java
===================================================================
---
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java 2007-05-21
23:55:30 UTC (rev 2049)
+++
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/ModelUtil.java 2007-05-21
23:56:22 UTC (rev 2050)
@@ -26,6 +26,7 @@
import java.util.Collections;
import org.eclipse.core.runtime.IPath;
+import org.jboss.ide.eclipse.archives.core.ArchivesCore;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModel;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
@@ -190,4 +191,12 @@
return lastConcrete;
}
+
+ public static IPath workspacePathToAbsolutePath (IPath workspacePath)
+ {
+ String projectName = workspacePath.segment(0);
+ IPath projectPath =
ArchivesCore.getInstance().getVariables().getProjectPath(projectName);
+
+ return projectPath.append(workspacePath.removeFirstSegments(1));
+ }
}
Show replies by date