Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnes2006-04-10 17:13:05 -0400
committerKevin Barnes2006-04-10 17:13:05 -0400
commit2e0dd92868a5392d81a08a696b023d66b10a5aa7 (patch)
treeb7ec1ced61677803c03780121bff49a90864ce8e /org.eclipse.ui.console
parentc74443faee0baf5b3a5625993a68e811cb0df5fb (diff)
downloadeclipse.platform.debug-2e0dd92868a5392d81a08a696b023d66b10a5aa7.tar.gz
eclipse.platform.debug-2e0dd92868a5392d81a08a696b023d66b10a5aa7.tar.xz
eclipse.platform.debug-2e0dd92868a5392d81a08a696b023d66b10a5aa7.zip
Bug 133379 - Bad console pattern listener breaks launching
Diffstat (limited to 'org.eclipse.ui.console')
-rw-r--r--org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java18
1 files changed, 12 insertions, 6 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
index 77da839a6..cb2b630e2 100644
--- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
+++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/ConsoleManager.java
@@ -15,6 +15,7 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+import java.util.regex.PatternSyntaxException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -216,10 +217,7 @@ public class ConsoleManager implements IConsoleManager {
IConsole console = consoles[i];
if(console instanceof TextConsole) {
TextConsole ioconsole = (TextConsole)console;
- IPatternMatchListener[] matchListeners = createPatternMatchListeners(ioconsole);
- for (int j = 0; j < matchListeners.length; j++) {
- ioconsole.addPatternMatchListener(matchListeners[j]);
- }
+ createPatternMatchListeners(ioconsole);
}
if (!fConsoles.contains(console)) {
fConsoles.add(console);
@@ -391,8 +389,16 @@ public class ConsoleManager implements IConsoleManager {
continue;
}
- if (extension.isEnabledFor(console)) {
- list.add(new PatternMatchListener(extension));
+ if (console instanceof TextConsole && extension.isEnabledFor(console)) {
+ TextConsole textConsole = (TextConsole) console;
+ PatternMatchListener patternMatchListener = new PatternMatchListener(extension);
+ try {
+ textConsole.addPatternMatchListener(patternMatchListener);
+ list.add(patternMatchListener);
+ } catch (PatternSyntaxException e) {
+ ConsolePlugin.log(e);
+ i.remove();
+ }
}
} catch (CoreException e) {
ConsolePlugin.log(e);

Back to the top