1 11 package org.eclipse.pde.internal.core.target; 12 13 import java.io.PrintWriter ; 14 15 import org.eclipse.pde.internal.core.itarget.IAdditionalLocation; 16 import org.eclipse.pde.internal.core.itarget.ITargetModel; 17 import org.w3c.dom.Element ; 18 import org.w3c.dom.Node ; 19 20 public class AdditionalDirectory extends TargetObject implements 21 IAdditionalLocation { 22 23 private static final long serialVersionUID = 1L; 24 25 private String fPath = ""; 27 public AdditionalDirectory(ITargetModel model) { 28 super(model); 29 } 30 31 public String getPath() { 32 return fPath; 33 } 34 35 public void setPath(String path) { 36 String oldPath = fPath; 37 fPath = path; 38 firePropertyChanged(P_PATH, oldPath, fPath); 39 } 40 41 public void parse(Node node) { 42 if (node.getNodeType() == Node.ELEMENT_NODE) 43 fPath = ((Element )node).getAttribute("path"); } 45 46 public void write(String indent, PrintWriter writer) { 47 writer.println(indent + "<location path=\"" + getWritableString(fPath) + "\"/>"); } 49 } 50 | Popular Tags |