#
Console Pattern Match Listeners

###### Identifier:

org.eclipse.ui.console.consolePatternMatchListeners

###### Since:

3.1

###### Description:

Provides regular expression matching for text consoles. Pattern match listeners can be contributed to specific consoles by using an enablement expression. Listeners are notified as matches are found.

###### Configuration Markup:

<!ELEMENT extension (consolePatternMatchListener*)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

<!ELEMENT consolePatternMatchListener (enablement)>

<!ATTLIST consolePatternMatchListener

id CDATA #REQUIRED

class CDATA #REQUIRED

regex CDATA #REQUIRED

flags CDATA #IMPLIED

qualifier CDATA #IMPLIED>

- id - specifies a unique identifier for this console pattern match listener
- class - specifies a fully qualified name of a Java class that implements `IPatternMatchListenerDelegate`
- regex - specifies the regular expression to be matched
- flags - specifies flags to be used when matching the pattern. Acceptable flags are defined in `java.util.regex.Pattern` and should be specified as Strings (eg "Pattern.MULTILINE" or "MULTILINE")
- qualifier - a simple regular expression used to identify a line that may contain this pattern match listener's complete regular expression `regex`. When a line is found containing this expression, a search is performed from the beginning of the line for this pattern matcher's complete `regex`. Use of this attribute is optional but can greatly improve performance as lines not containing this expression are disqualified from the search.

###### Examples:

The following is an example of a console pattern match listener extension point:

       <extension
             point="org.eclipse.ui.console.consolePatternMatchListener">
          <consolePatternMatchListener
                class="com.example.ExampleConsolePatternMatcher"
                id="com.example.ExampleConsolePatternMatcher"
                regex=".*foo.*">
             <enablement>
                <test property="org.eclipse.ui.console.consoleTypeTest" value="exampleConsole"/>
             </enablement>
          </consolePatternMatchListener>
       </extension>

In the above example, the contributed console pattern matcher will be used for consoles with a type of "exampleConsole."

###### API Information:

Value of the attribute class must be a fully qualified name of a Java class that implements the interface org.eclipse.ui.console.IPatternMatchListenerDelegate.

###### Supplied Implementation:

The console plug-in provides a console type property tester for enablement expressions that tests the value of `IConsole.getType()`. The property tester's identifier is `org.eclipse.ui.console.consoleTypeTest`.

Copyright (c) 2000, 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html