Package org.eclipse.ui.console
Interface IPatternMatchListener
- All Superinterfaces:
IPatternMatchListenerDelegate
A pattern match listener is registered with a
TextConsole
, and
is notified when its pattern has been matched to contents in that console. A
pattern match listener can be registered with a console programmatically or
via the consolePatternMatchListeners
extension point.
Following is an example console pattern match listener extension definition.
<extension point="org.eclipse.ui.console.consolePatternMatchListeners"> <consolePatternMatchListener id="com.example.ConsolePatternMatcher" regex=".*foo.*" class="com.example.ConsolePatternMatcher"> </consolePatternMatchListener> </extension>Attributes are specified as follows:
id
- a unique identifier for the pattern match listenerregex
- regular expression to matchclass
- fully qualified name of the Java class implementingorg.eclipse.ui.console.IPatternMatchListenerDelegate
Optionally a qualifier
attribute may be specified to improve
performance of regular expression matching. A qualifier specifies a simple
regular expression used to qualify lines for the search. Lines that do not
contain the qualifier are not considered.
Optionally an enablement
expression may be provided to specify
which console(s) a pattern matcher should be contributed to.
Clients may implement this interface directly if registering a pattern match
listener with a text console programmatically. Clients contributing a pattern
match listener via an extension implement
IPatternMatchListenerDelegate
instead.
- Since:
- 3.1
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the flags to use when compiling this pattern match listener's regular expression, as defined by byPattern.compile(String regex, int flags)
Returns a simple regular expression used to identify lines that may match this pattern matcher's complete pattern, ornull
.Returns the pattern to be used for matching.Methods inherited from interface org.eclipse.ui.console.IPatternMatchListenerDelegate
connect, disconnect, matchFound
-
Method Details
-
getPattern
String getPattern()Returns the pattern to be used for matching. The pattern is a string representing a regular expression.- Returns:
- the regular expression to be used for matching
-
getCompilerFlags
int getCompilerFlags()Returns the flags to use when compiling this pattern match listener's regular expression, as defined by byPattern.compile(String regex, int flags)
- Returns:
- the flags to use when compiling this pattern match listener's regular expression
- See Also:
-
getLineQualifier
String getLineQualifier()Returns a simple regular expression used to identify lines that may match this pattern matcher's complete pattern, ornull
. Use of this attribute can improve performance by disqualifying lines from the search. When a line is found containing a match for this expression, the line is searched from the beginning for this pattern matcher's complete pattern. Lines not containing this pattern are discarded.- Returns:
- a simple regular expression used to identify lines that may
match this pattern matcher's complete pattern, or
null
-