1 11 package org.eclipse.text.edits; 12 13 import org.eclipse.jface.text.BadLocationException; 14 import org.eclipse.jface.text.IDocument; 15 16 23 public final class CopyingRangeMarker extends TextEdit { 24 25 private String fText; 26 27 34 public CopyingRangeMarker(int offset, int length) { 35 super(offset, length); 36 } 37 38 41 private CopyingRangeMarker(CopyingRangeMarker other) { 42 super(other); 43 fText= other.fText; 44 } 45 46 49 protected TextEdit doCopy() { 50 return new CopyingRangeMarker(this); 51 } 52 53 56 protected void accept0(TextEditVisitor visitor) { 57 boolean visitChildren= visitor.visit(this); 58 if (visitChildren) { 59 acceptChildren(visitor); 60 } 61 } 62 63 66 int performDocumentUpdating(IDocument document) throws BadLocationException { 67 fText= document.get(getOffset(), getLength()); 68 fDelta= 0; 69 return fDelta; 70 } 71 72 75 boolean deleteChildren() { 76 return false; 77 } 78 } 79 | Popular Tags |