X-Git-Url: http://git.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/BufferChangedEvent.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/BufferChangedEvent.java
index 2b030b5..b178c4c 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/BufferChangedEvent.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/core/BufferChangedEvent.java
@@ -16,31 +16,31 @@ import java.util.EventObject;
* A buffer changed event describes how a buffer has changed. These events are
* used in IBufferChangedListener
notifications.
*
- * For text insertions, getOffset
is the offset
- * of the first inserted character, getText
is the
- * inserted text, and getLength
is 0.
+ * For text insertions, getOffset
is the offset of the first
+ * inserted character, getText
is the inserted text, and
+ * getLength
is 0.
*
- * For text removals, getOffset
is the offset
- * of the first removed character, getText
is null
,
- * and getLength
is the length of the text that was removed.
+ * For text removals, getOffset
is the offset of the first
+ * removed character, getText
is null
, and
+ * getLength
is the length of the text that was removed.
*
- * For replacements (including IBuffer.setContents
),
- * getOffset
is the offset
- * of the first replaced character, getText
is the replacement
- * text, and getLength
is the length of the original text
- * that was replaced.
+ * For replacements (including IBuffer.setContents
),
+ * getOffset
is the offset of the first replaced character,
+ * getText
is the replacement text, and getLength
+ * is the length of the original text that was replaced.
*
- * When a buffer is closed, getOffset
is 0, getLength
- * is 0, and getText
is null
.
+ * When a buffer is closed, getOffset
is 0,
+ * getLength
is 0, and getText
is
+ * null
.
*
* This class is not intended to be instantiated or subclassed by clients. * Instances of this class are automatically created by the Java model. *
- * + * * @see IBuffer */ public class BufferChangedEvent extends EventObject { @@ -60,55 +60,65 @@ public class BufferChangedEvent extends EventObject { */ private String text; -/** - * Creates a new buffer changed event indicating that the given buffer has changed. - * - * @param buffer the given buffer - * @param offset the given offset - * @param length the given length - * @param text the given text - */ -public BufferChangedEvent(IBuffer buffer, int offset, int length, String text) { - super(buffer); - this.offset = offset; - this.length = length; - this.text = text; -} -/** - * Returns the buffer which has changed. - * - * @return the buffer affected by the change - */ -public IBuffer getBuffer() { - return (IBuffer) source; -} -/** - * Returns the length of text removed or replaced in the buffer, or - * 0 if text has been inserted into the buffer. - * - * @return the length of the original text fragment modified by the - * buffer change ( 0
in case of insertion).
- */
-public int getLength() {
- return this.length;
-}
-/**
- * Returns the index of the first character inserted, removed, or replaced
- * in the buffer.
- *
- * @return the source offset of the textual manipulation in the buffer
- */
-public int getOffset() {
- return this.offset;
-}
-/**
- * Returns the text that was inserted, the replacement text,
- * or null
if text has been removed.
- *
- * @return the text corresponding to the buffer change ( null
- * in case of deletion).
- */
-public String getText() {
- return this.text;
-}
+ /**
+ * Creates a new buffer changed event indicating that the given buffer has
+ * changed.
+ *
+ * @param buffer
+ * the given buffer
+ * @param offset
+ * the given offset
+ * @param length
+ * the given length
+ * @param text
+ * the given text
+ */
+ public BufferChangedEvent(IBuffer buffer, int offset, int length,
+ String text) {
+ super(buffer);
+ this.offset = offset;
+ this.length = length;
+ this.text = text;
+ }
+
+ /**
+ * Returns the buffer which has changed.
+ *
+ * @return the buffer affected by the change
+ */
+ public IBuffer getBuffer() {
+ return (IBuffer) source;
+ }
+
+ /**
+ * Returns the length of text removed or replaced in the buffer, or 0 if
+ * text has been inserted into the buffer.
+ *
+ * @return the length of the original text fragment modified by the buffer
+ * change ( 0
in case of insertion).
+ */
+ public int getLength() {
+ return this.length;
+ }
+
+ /**
+ * Returns the index of the first character inserted, removed, or replaced
+ * in the buffer.
+ *
+ * @return the source offset of the textual manipulation in the buffer
+ */
+ public int getOffset() {
+ return this.offset;
+ }
+
+ /**
+ * Returns the text that was inserted, the replacement text, or
+ * null
if text has been removed.
+ *
+ * @return the text corresponding to the buffer change ( null
+ * in case of deletion).
+ */
+ public String getText() {
+ return this.text;
+ }
}