<!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
,且應指定為 Strings(例如,"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()
值的啟用表示式提供了一個主控台類型內容測試程式。內容測試程式的 ID 為 org.eclipse.ui.console.consoleTypeTest
。
Copyright (c) 2000, 2005 IBM Corporation and others.
All rights reserved.
本程式與隨附的資料依照 Elipse Public License 1.0 版此次發行所隨附的條款而提供,
可以在以下網址取得:http://www.eclipse.org/legal/epl-v10.html