1 11 package org.eclipse.pde.internal.core.text; 12 13 import java.io.Serializable ; 14 15 import org.eclipse.pde.core.plugin.ISharedPluginModel; 16 import org.eclipse.pde.internal.core.ischema.ISchema; 17 18 public interface IDocumentNode extends Serializable , IDocumentRange { 19 20 IDocumentNode getParentNode(); 21 void setParentNode(IDocumentNode node); 22 23 void addChildNode(IDocumentNode child); 24 void addChildNode(IDocumentNode child, int position); 25 IDocumentNode removeChildNode(IDocumentNode child); 26 IDocumentNode[] getChildNodes(); 27 28 void addTextNode(IDocumentTextNode textNode); 29 IDocumentTextNode getTextNode(); 30 void removeTextNode(); 31 32 int indexOf(IDocumentNode child); 33 IDocumentNode getChildAt(int index); 34 35 IDocumentNode getPreviousSibling(); 36 void setPreviousSibling(IDocumentNode sibling); 37 38 void swap(IDocumentNode child1, IDocumentNode child2); 39 40 void setXMLTagName(String tag); 41 String getXMLTagName(); 42 43 void setXMLAttribute(IDocumentAttribute attribute); 44 void setXMLAttribute(String name, String value); 45 String getXMLAttributeValue(String name); 46 47 IDocumentAttribute getDocumentAttribute(String name); 48 IDocumentAttribute[] getNodeAttributes(); 49 void removeDocumentAttribute(IDocumentAttribute attr); 50 51 boolean isErrorNode(); 52 void setIsErrorNode(boolean isErrorNode); 53 54 boolean isRoot(); 55 56 void setOffset(int offset); 57 void setLength(int length); 58 59 void setLineIndent(int indent); 60 int getLineIndent(); 61 62 String write(boolean indent); 63 String writeShallow(boolean terminate); 64 65 public int getChildCount(); 66 67 public void reconnect(ISharedPluginModel model, ISchema schema, IDocumentNode parent); 68 69 } 70 | Popular Tags |