diff options
author | Kevin Barnes | 2004-08-28 13:39:26 +0000 |
---|---|---|
committer | Kevin Barnes | 2004-08-28 13:39:26 +0000 |
commit | e22c9e6a3783479edb61e546219a50ea5a78b338 (patch) | |
tree | abeb63465717ea6720f9e6e8b39789369fe2c26f | |
parent | 9461a195641b5297ec7b7215e4575f904d5ed76c (diff) | |
download | eclipse.platform.debug-e22c9e6a3783479edb61e546219a50ea5a78b338.tar.gz eclipse.platform.debug-e22c9e6a3783479edb61e546219a50ea5a78b338.tar.xz eclipse.platform.debug-e22c9e6a3783479edb61e546219a50ea5a78b338.zip |
Bug 72167 - ProcessConsole should extend IOConsole
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java index 71cb47dc7..f929bcdc8 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/console/IOConsole.java @@ -371,10 +371,7 @@ public class IOConsole extends AbstractConsole implements IDocumentListener { synchronized(patterns) { for (Iterator iter = patterns.iterator(); iter.hasNext();) { CompiledPatternMatchListener pattern = (CompiledPatternMatchListener) iter.next(); - int start = pattern.end; - if (event.fLength > 0) { - start = Math.min(pattern.end, event.fOffset); - } + int start = Math.min(pattern.end, event.fOffset); try { testForMatch(pattern, start); } catch (BadLocationException e) { @@ -389,10 +386,10 @@ public class IOConsole extends AbstractConsole implements IDocumentListener { Matcher matcher = compiled.pattern.matcher(contents); IPatternMatchListener notifier = compiled.listener; while(matcher.find()) { - String group = matcher.group(); - int matchOffset = documentOffset + matcher.start(); - notifier.matchFound(new PatternMatchEvent(this, matchOffset, group.length())); - compiled.end = matcher.end() + documentOffset + 1; + String group = matcher.group(); + int matchOffset = documentOffset + matcher.start(); + notifier.matchFound(new PatternMatchEvent(this, matchOffset, group.length())); + compiled.end = matcher.end() + documentOffset; } } |