Fixed bug 171018: [implementation] View port listeners of TextViewer never receive resize events
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java
index 2d45db1..cc8e743 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -206,11 +206,9 @@
/* ---------- listeners ------------- */
/**
- * Adds the given view port listener to this viewer. The listener
- * is informed about all changes to the visible area of this viewer.
- * If the listener is already registered with this viewer, this call
- * has no effect.
- *
+ * Adds the given view port listener to this viewer. If the listener is already registered with
+ * this viewer, this call has no effect.
+ *
* @param listener the listener to be added
*/
void addViewportListener(IViewportListener listener);
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java
index 57d4c9d..0bd60af 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/IViewportListener.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2009 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,22 +11,27 @@
package org.eclipse.jface.text;
-
/**
- * Registered with a text viewer, view port listeners are informed about changes
- * of a text viewer's view port. The view port is that portion of the viewer's
- * document which is visible in the viewer.
+ * Registered with a text viewer, view port listeners are informed about changes of a text viewer's
+ * view port. The view port is that portion of the viewer's document which is visible in the viewer.
* <p>
- * Clients may implement this interface.</p>
- *
- * @see org.eclipse.jface.text.ITextViewer
+ * <strong>Note:</strong> This listener will not be notified when the viewer is resized.
+ * </p>
+ * <p>
+ * Clients may implement this interface.
+ * </p>
+ *
+ * @see org.eclipse.jface.text.ITextViewer#addViewportListener(IViewportListener)
*/
public interface IViewportListener {
/**
- * Informs about view port changes. The given vertical position is the new
- * vertical scrolling offset measured in pixels.
- *
+ * Informs that the view port changed. The given vertical position is the new vertical scrolling
+ * offset measured in pixels.
+ * <p>
+ * <strong>Note:</strong> This event will not be sent when the viewer is resized.
+ * </p>
+ *
* @param verticalOffset the vertical offset measured in pixels
*/
void viewportChanged(int verticalOffset);