Package org.eclipse.jface.text
Class DocumentEvent
java.lang.Object
org.eclipse.jface.text.DocumentEvent
- Direct Known Subclasses:
- SlaveDocumentEvent
Specification of changes applied to documents. All changes are represented as
 replace commands, i.e. specifying a document range whose text gets replaced
 with different text. In addition to this information, the event also contains
 the changed document.
- See Also:
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new, not initialized document event.DocumentEvent(IDocument doc, int offset, int length, String text) Creates a new document event.
- 
Method Summary
- 
Field Details- 
fDocumentThe changed document
- 
fOffsetpublic int fOffsetThe document offset
- 
fLengthpublic int fLengthLength of the replaced document text
- 
fTextText inserted into the document
- 
fModificationStamppublic long fModificationStampThe modification stamp of the document when firing this event.- Since:
- 3.1 and public since 3.3
 
 
- 
- 
Constructor Details- 
DocumentEventCreates a new document event.- Parameters:
- doc- the changed document
- offset- the offset of the replaced text
- length- the length of the replaced text
- text- the substitution text
 
- 
DocumentEventpublic DocumentEvent()Creates a new, not initialized document event.
 
- 
- 
Method Details- 
getDocumentReturns the changed document.- Returns:
- the changed document
 
- 
getOffsetpublic int getOffset()Returns the offset of the change.- Returns:
- the offset of the change
 
- 
getLengthpublic int getLength()Returns the length of the replaced text.- Returns:
- the length of the replaced text
 
- 
getTextReturns the text that has been inserted.- Returns:
- the text that has been inserted
 
- 
getModificationStamppublic long getModificationStamp()Returns the document's modification stamp at the time when this event was sent.- Returns:
- the modification stamp or IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP.
- Since:
- 3.1
- See Also:
 
- 
toString
 
-