Added default preferences for outline options
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpeclipse / LoadPathEntry.java
1 package net.sourceforge.phpeclipse;
2
3 import org.eclipse.core.resources.IProject;
4 import org.eclipse.core.runtime.IPath;
5
6 public class LoadPathEntry {
7         public static final String TYPE_PROJECT = "project";
8         
9         protected IProject project;
10         protected String type;
11
12         public LoadPathEntry(IProject aProjectEntry) {
13                 project = aProjectEntry;
14                 type = TYPE_PROJECT;
15         }
16
17         public IPath getPath() {
18                 return project.getFullPath();
19         }
20         
21         public IProject getProject() {
22                 return project;
23         }
24         
25         public String getType() {
26                 return type;
27         }
28         
29         public String toXML() {
30                 StringBuffer buffer = new StringBuffer();
31                 
32                 buffer.append("<pathentry type=\"");
33                 buffer.append(type + "\" ");
34                 buffer.append("path=\"" + getPath() + "\"/>");
35                 
36                 return buffer.toString();
37         }
38 }