From fc5a128d8259fd2b6c584829c60857b6f2530c45 Mon Sep 17 00:00:00 2001 From: Darin Wright Date: Tue, 24 Jan 2006 21:32:41 +0000 Subject: Bug 119488 - java stack trace hyperlinks not .java agnostic --- org.eclipse.ui.console/META-INF/MANIFEST.MF | 3 ++- .../schema/consolePatternMatchListeners.exsd | 4 ++-- .../internal/console/PatternMatchListenerExtension.java | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'org.eclipse.ui.console') diff --git a/org.eclipse.ui.console/META-INF/MANIFEST.MF b/org.eclipse.ui.console/META-INF/MANIFEST.MF index a06b2f40b..a30ed2f0d 100644 --- a/org.eclipse.ui.console/META-INF/MANIFEST.MF +++ b/org.eclipse.ui.console/META-INF/MANIFEST.MF @@ -13,5 +13,6 @@ Require-Bundle: org.eclipse.ui;bundle-version="[3.2.0,4.0.0)", org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)", org.eclipse.ui.workbench.texteditor;bundle-version="[3.2.0,4.0.0)", org.eclipse.core.runtime;bundle-version="[3.1.0,4.0.0)", - org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)" + org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)", + org.eclipse.core.variables Eclipse-LazyStart: true diff --git a/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd b/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd index 522ad1a80..5cb81e02e 100644 --- a/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd +++ b/org.eclipse.ui.console/schema/consolePatternMatchListeners.exsd @@ -66,7 +66,7 @@ - specifies the regular expression to be matched + specifies the regular expression to be matched. Since 3.2, this attribute supports string variable substitution. @@ -80,7 +80,7 @@ - a simple regular expression used to identify a line that may contain this pattern match listener's complete regular expression <code>regex</code>. When a line is found containing this expression, a search is performed from the beginning of the line for this pattern matcher's complete <code>regex</code>. Use of this attribute is optional but can greatly improve performance as lines not containing this expression are disqualified from the search. + a simple regular expression used to identify a line that may contain this pattern match listener's complete regular expression <code>regex</code>. When a line is found containing this expression, a search is performed from the beginning of the line for this pattern matcher's complete <code>regex</code>. Use of this attribute is optional but can greatly improve performance as lines not containing this expression are disqualified from the search. Since 3.2, this attribute supports string variable substitution. diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java index 9347c0281..1bb1f02df 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/PatternMatchListenerExtension.java @@ -19,6 +19,7 @@ import org.eclipse.core.expressions.ExpressionConverter; import org.eclipse.core.expressions.ExpressionTagNames; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.variables.VariablesPlugin; import org.eclipse.ui.IPluginContribution; import org.eclipse.ui.console.ConsolePlugin; import org.eclipse.ui.console.IConsole; @@ -29,6 +30,7 @@ public class PatternMatchListenerExtension implements IPluginContribution { private IConfigurationElement fConfig; private Expression fEnablementExpression; private String fPattern; + private String fQualifier; private int fFlags = -1; public PatternMatchListenerExtension(IConfigurationElement extension) { @@ -93,6 +95,11 @@ public class PatternMatchListenerExtension implements IPluginContribution { public String getPattern() { if (fPattern == null) { fPattern = fConfig.getAttributeAsIs("regex"); //$NON-NLS-1$ + try { + fPattern = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fPattern); + } catch (CoreException e) { + ConsolePlugin.log(e); + } } return fPattern; } @@ -123,6 +130,14 @@ public class PatternMatchListenerExtension implements IPluginContribution { } public String getQuickPattern() { - return fConfig.getAttribute("qualifier"); //$NON-NLS-1$ + if (fQualifier == null) { + fQualifier = fConfig.getAttribute("qualifier"); //$NON-NLS-1$ + try { + fQualifier = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(fQualifier); + } catch (CoreException e) { + ConsolePlugin.log(e); + } + } + return fQualifier; } } -- cgit v1.2.3