1 11 package org.eclipse.jface.text.projection; 12 13 14 import org.eclipse.jface.text.DocumentEvent; 15 import org.eclipse.jface.text.IDocument; 16 import org.eclipse.jface.text.SlaveDocumentEvent; 17 18 19 34 public class ProjectionDocumentEvent extends SlaveDocumentEvent { 35 36 37 public final static Object PROJECTION_CHANGE= new Object (); 38 39 public final static Object CONTENT_CHANGE= new Object (); 40 41 42 private Object fChangeType; 43 44 private int fMasterOffset= -1; 45 46 private int fMasterLength= -1; 47 48 61 public ProjectionDocumentEvent(IDocument doc, int offset, int length, String text, DocumentEvent masterEvent) { 62 super(doc, offset, length, text, masterEvent); 63 fChangeType= CONTENT_CHANGE; 64 } 65 66 78 public ProjectionDocumentEvent(IDocument doc, int offset, int length, String text, int masterOffset, int masterLength) { 79 super(doc, offset, length, text, null); 80 fChangeType= PROJECTION_CHANGE; 81 fMasterOffset= masterOffset; 82 fMasterLength= masterLength; 83 } 84 85 101 public ProjectionDocumentEvent(IDocument doc, int offset, int length, String text, int masterOffset, int masterLength, DocumentEvent masterEvent) { 102 super(doc, offset, length, text, masterEvent); 103 fChangeType= PROJECTION_CHANGE; 104 fMasterOffset= masterOffset; 105 fMasterLength= masterLength; 106 } 107 108 114 public Object getChangeType() { 115 return fChangeType; 116 } 117 118 124 public int getMasterOffset() { 125 return fMasterOffset; 126 } 127 128 134 public int getMasterLength() { 135 return fMasterLength; 136 } 137 } 138 | Popular Tags |