diff options
author | Kevin Barnes | 2005-04-02 17:14:53 +0000 |
---|---|---|
committer | Kevin Barnes | 2005-04-02 17:14:53 +0000 |
commit | 9d6b474f928fe4a58f21c1db529016dc7e5ae6c9 (patch) | |
tree | 6a78e28b6f23759160db47275bb98ccf729b381b | |
parent | 8f3fd8990191cc6ea54540fffee6a5533c64d2c9 (diff) | |
download | eclipse.platform.debug-9d6b474f928fe4a58f21c1db529016dc7e5ae6c9.tar.gz eclipse.platform.debug-9d6b474f928fe4a58f21c1db529016dc7e5ae6c9.tar.xz eclipse.platform.debug-9d6b474f928fe4a58f21c1db529016dc7e5ae6c9.zip |
Bug 85595 - Core exception from Java Stack trace console
-rw-r--r-- | org.eclipse.debug.ui/plugin.xml | 2 | ||||
-rw-r--r-- | org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessTypePropertyTester.java | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml index 78b825bb8..8a2addb3c 100644 --- a/org.eclipse.debug.ui/plugin.xml +++ b/org.eclipse.debug.ui/plugin.xml @@ -2190,7 +2190,7 @@ M4 = Platform-specific fourth key </propertyTester> <propertyTester namespace="org.eclipse.debug.ui" - type="org.eclipse.ui.console.IOConsole" + type="org.eclipse.ui.console.IConsole" class="org.eclipse.debug.internal.ui.views.console.ProcessTypePropertyTester" properties="processTypeTest" id="org.eclipse.jdt.debug.ui.JavaConsolePropertyTester"/> diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessTypePropertyTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessTypePropertyTester.java index dc2df2ef5..e04b80702 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessTypePropertyTester.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessTypePropertyTester.java @@ -13,7 +13,7 @@ package org.eclipse.debug.internal.ui.views.console; import org.eclipse.core.expressions.PropertyTester; import org.eclipse.debug.core.model.IProcess; import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.ui.console.IOConsole; +import org.eclipse.ui.console.TextConsole; /** * Tests if a process type matches the expected value. @@ -27,11 +27,13 @@ public class ProcessTypePropertyTester extends PropertyTester { */ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { boolean testPassed = false; - IOConsole console = (IOConsole) receiver; - IProcess process = (IProcess) console.getAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS); - if (process != null) { - String type = process.getAttribute(IProcess.ATTR_PROCESS_TYPE); - testPassed = (type != null && type.equals(expectedValue)); + if (receiver instanceof TextConsole) { + TextConsole console = (TextConsole) receiver; + IProcess process = (IProcess) console.getAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS); + if (process != null) { + String type = process.getAttribute(IProcess.ATTR_PROCESS_TYPE); + testPassed = (type != null && type.equals(expectedValue)); + } } return testPassed; } |