Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2004-08-28 13:39:26 +0000
committerKevin Barnes2004-08-28 13:39:26 +0000
commite22c9e6a3783479edb61e546219a50ea5a78b338 (patch)
treeabeb63465717ea6720f9e6e8b39789369fe2c26f
parent9461a195641b5297ec7b7215e4575f904d5ed76c (diff)
downloadeclipse.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.java13
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;
}
}

Back to the top