|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.DocumentEvent
org.eclipse.jface.text.SlaveDocumentEvent
org.eclipse.jface.text.projection.ProjectionDocumentEvent
This event is sent out by an
ProjectionDocument
when it is
manipulated. The manipulation is either a content manipulation or a change of
the projection between the master and the slave. Clients can determine the
type of change by asking the projection document event for its change type
(see getChangeType()
) and comparing it with the predefined types
PROJECTION_CHANGE
and CONTENT_CHANGE
.
Clients are not supposed to create instances of this class. Instances are
created by ProjectionDocument
instances. This class is not intended to be subclassed.
Field Summary | |
---|---|
static Object |
CONTENT_CHANGE
The change type indicating a content change |
static Object |
PROJECTION_CHANGE
The change type indicating a projection change |
Fields inherited from class org.eclipse.jface.text.DocumentEvent |
---|
fDocument, fLength, fModificationStamp, fOffset, fText |
Constructor Summary | |
---|---|
ProjectionDocumentEvent(IDocument doc,
int offset,
int length,
String text,
DocumentEvent masterEvent)
Creates a new content change event caused by the given master document change. |
|
ProjectionDocumentEvent(IDocument doc,
int offset,
int length,
String text,
int masterOffset,
int masterLength)
Creates a new projection change event for the given properties. |
|
ProjectionDocumentEvent(IDocument doc,
int offset,
int length,
String text,
int masterOffset,
int masterLength,
DocumentEvent masterEvent)
Creates a new projection document event for the given properties. |
Method Summary | |
---|---|
Object |
getChangeType()
Returns the change type of this event. |
int |
getMasterLength()
Returns the length of the master document range that has been added or removed in case this event describes a projection changed, otherwise -1 . |
int |
getMasterOffset()
Returns the offset of the master document range that has been added or removed in case this event describes a projection change, otherwise it returns -1 . |
Methods inherited from class org.eclipse.jface.text.SlaveDocumentEvent |
---|
getMasterEvent |
Methods inherited from class org.eclipse.jface.text.DocumentEvent |
---|
getDocument, getLength, getModificationStamp, getOffset, getText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final Object PROJECTION_CHANGE
public static final Object CONTENT_CHANGE
Constructor Detail |
public ProjectionDocumentEvent(IDocument doc, int offset, int length, String text, DocumentEvent masterEvent)
-1
when calling getMasterOffset
or
getMasterLength
. This information can be obtained by
accessing the master event.
doc
- the changed projection documentoffset
- the offset in the projection documentlength
- the length in the projection documenttext
- the replacement textmasterEvent
- the original master eventpublic ProjectionDocumentEvent(IDocument doc, int offset, int length, String text, int masterOffset, int masterLength)
doc
- the projection documentoffset
- the offset in the projection documentlength
- the length in the projection documenttext
- the replacement textmasterOffset
- the offset in the master documentmasterLength
- the length in the master documentpublic ProjectionDocumentEvent(IDocument doc, int offset, int length, String text, int masterOffset, int masterLength, DocumentEvent masterEvent)
doc
- the projection documentoffset
- the offset in the projection documentlength
- the length in the projection documenttext
- the replacement textmasterOffset
- the offset in the master documentmasterLength
- the length in the master documentmasterEvent
- the master document eventMethod Detail |
public Object getChangeType()
PROJECTION_CHANGE
or
CONTENT_CHANGE
.
public int getMasterOffset()
-1
.
-1
public int getMasterLength()
-1
.
-1
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.