summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepak Azad2012-04-23 02:28:50 (EDT)
committer Dani Megert2012-04-23 02:28:50 (EDT)
commitb0dfba155489bb89ceb735d37809b3fa858c2220 (patch)
treecdb076705e6f8acc4467f261064aa1ce5dca258d
parent7471537879c56f83c4621f57bb29a96e53743f50 (diff)
downloadeclipse.platform.text-b0dfba155489bb89ceb735d37809b3fa858c2220.zip
eclipse.platform.text-b0dfba155489bb89ceb735d37809b3fa858c2220.tar.gz
eclipse.platform.text-b0dfba155489bb89ceb735d37809b3fa858c2220.tar.bz2
in MatchingCharacterPainter.draw(..)
-rw-r--r--org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java17
1 files changed, 5 insertions, 12 deletions
diff --git a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
index 3fb9c56..5cc1925 100644
--- a/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
+++ b/org.eclipse.jface.text/src/org/eclipse/jface/text/source/MatchingCharacterPainter.java
@@ -20,7 +20,6 @@ import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IPaintPositionManager;
import org.eclipse.jface.text.IPainter;
@@ -431,7 +430,7 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener {
/**
* Installs or uninstalls the text listener depending on the boolean parameter.
*
- * @param install <code>true</code> to install the text listener, <code>false</code> to uninstall
+ * @param install <code>true</code> to install the text listener, <code>false</code> to uninstall
*
* @since 3.8
*/
@@ -484,20 +483,14 @@ public final class MatchingCharacterPainter implements IPainter, PaintListener {
if (!fHighlightEnclosingPeerCharacters || !(fMatcher instanceof ICharacterPairMatcherExtension))
return;
- String text= event.getText();
- String replacedText= event.getReplacedText();
-
- boolean viewerRedrawState= event.getViewerRedrawState();
- DocumentEvent documentEvent= event.getDocumentEvent();
- if (documentEvent == null && !viewerRedrawState)
+ if (!event.getViewerRedrawState())
return;
+ String text= event.getText();
+ String replacedText= event.getReplacedText();
ICharacterPairMatcherExtension matcher= (ICharacterPairMatcherExtension)fMatcher;
- boolean found= searchForCharacters(text, matcher) || searchForCharacters(replacedText, matcher);
-
- if (found || (documentEvent == null && viewerRedrawState)) {
+ if (searchForCharacters(text, matcher) || searchForCharacters(replacedText, matcher))
paint(IPainter.INTERNAL);
- }
}
/**