1 11 package org.eclipse.pde.internal.core.text; 12 13 public class DocumentTextNode implements IDocumentTextNode { 14 15 private static final long serialVersionUID = 1L; 16 17 private transient int fOffset = -1; 18 private transient int fLength = 0; 19 private transient IDocumentNode fEnclosingElement; 20 21 private String fText; 22 23 26 public void setEnclosingElement(IDocumentNode node) { 27 fEnclosingElement = node; 28 } 29 32 public IDocumentNode getEnclosingElement() { 33 return fEnclosingElement; 34 } 35 38 public void setText(String text) { 39 fText = text; 40 } 41 44 public String getText() { 45 return fText == null ? "" : fText; } 47 50 public void setOffset(int offset) { 51 fOffset = offset; 52 } 53 56 public int getOffset() { 57 return fOffset; 58 } 59 60 63 public int getLength() { 64 return fLength; 65 } 66 67 70 public void setLength(int length) { 71 fLength = length; 72 } 73 74 77 public void reconnect(IDocumentNode parent) { 78 fEnclosingElement = parent; 81 fLength = -1; 83 fOffset = -1; 85 } 86 87 } 88 | Popular Tags |