PHP perspective and new Project Wizard
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / LoadPathEntry.java
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/LoadPathEntry.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/LoadPathEntry.java
new file mode 100644 (file)
index 0000000..9008abf
--- /dev/null
@@ -0,0 +1,38 @@
+package net.sourceforge.phpeclipse;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+
+public class LoadPathEntry {
+       public static final String TYPE_PROJECT = "project";
+       
+       protected IProject project;
+       protected String type;
+
+       public LoadPathEntry(IProject aProjectEntry) {
+               project = aProjectEntry;
+               type = TYPE_PROJECT;
+       }
+
+       public IPath getPath() {
+               return project.getFullPath();
+       }
+       
+       public IProject getProject() {
+               return project;
+       }
+       
+       public String getType() {
+               return type;
+       }
+       
+       public String toXML() {
+               StringBuffer buffer = new StringBuffer();
+               
+               buffer.append("<pathentry type=\"");
+               buffer.append(type + "\" ");
+               buffer.append("path=\"" + getPath() + "\"/>");
+               
+               return buffer.toString();
+       }
+}