<!ELEMENT extension (consolePatternMatchListener*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT consolePatternMatchListener (enablement)>
<!ATTLIST consolePatternMatchListener
id CDATA #REQUIRED
class CDATA #REQUIRED
regex CDATA #REQUIRED
flags CDATA #IMPLIED
qualifier CDATA #IMPLIED>
IPatternMatchListenerDelegate
java.util.regex.Pattern
and should be specified as Strings (eg "Pattern.MULTILINE" or "MULTILINE")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.In the above example, the contributed console pattern matcher will be used for consoles with a type of "exampleConsole."<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>
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