Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2012-02-29 09:15:56 +0000
committerDani Megert2012-02-29 09:15:56 +0000
commit8849002c4b50cc7b0aa21f5acf18008940b96360 (patch)
tree9b86015a0f5a6622ad205c711b56ab69aa973dbe
parent1942dbddd460925c0dd3cbed02bad82b548af896 (diff)
downloadeclipse.platform.text-8849002c4b50cc7b0aa21f5acf18008940b96360.tar.gz
eclipse.platform.text-8849002c4b50cc7b0aa21f5acf18008940b96360.tar.xz
eclipse.platform.text-8849002c4b50cc7b0aa21f5acf18008940b96360.zip
Make sure we don't install the same document again
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java
index a1db7be85..4a1afa357 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/PaintManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 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
@@ -361,8 +361,8 @@ public final class PaintManager implements KeyListener, MouseListener, ISelectio
*/
public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) {
if (oldInput != null) {
- for (Iterator e = fPainters.iterator(); e.hasNext();)
- ((IPainter) e.next()).deactivate(false);
+ for (Iterator e= fPainters.iterator(); e.hasNext();)
+ ((IPainter)e.next()).deactivate(false);
fManager.uninstall(oldInput);
removeListeners();
}
@@ -372,7 +372,7 @@ public final class PaintManager implements KeyListener, MouseListener, ISelectio
* @see ITextInputListener#inputDocumentChanged(IDocument, IDocument)
*/
public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
- if (newInput != null) {
+ if (newInput != null && newInput != fManager.fDocument) {
fManager.install(newInput);
paint(IPainter.TEXT_CHANGE);
addListeners();

Back to the top