<!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 类的标准名称 java.util.regex.Pattern
中定义的,并且应指定为字符串(例如,“Pattern.MULTILINE”或“MULTILINE”)regex
的行。当发现某一行包含此表达式时,从该行的开始处执行搜索以查找此模式匹配的完整 regex
。是否使用此属性是可选的。但是,当未包含此表达式的行排除在搜索范围内时,使用此属性可极大提高性能。在上面的示例中,添加的控制台模式匹配程序将用于类型为“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()
的值。属性测试对象的标识为 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