<!ELEMENT extension (statusContextViewer*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT statusContextViewer (enablement)>
<!ATTLIST statusContextViewer
id CDATA #REQUIRED
class CDATA #REQUIRED>
<!ELEMENT enablement (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
通用的根元素。這個元素可用於延伸點內定義其 enablement 表示式。 enablement 表示式的子項是使用 and 運算子來組合。
<!ELEMENT not (not | and | or | instanceof | test | systemTest | equals | count | with | resolve | adapt | iterate)>
這個元素代表對其子元素表示式的求值結果執行的 NOT 運算。
<!ELEMENT and (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
這個元素代表對其所有子元素表示式的求值結果執行的 AND 運算。
<!ELEMENT or (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
這個元素代表對其所有子元素表示式的求值結果執行的 OR 運算。
<!ELEMENT instanceof EMPTY>
<!ATTLIST instanceof
value CDATA #REQUIRED>
這個元素是用來執行焦點物件的 instanceof 檢查。如果物件類型是屬性值指定之類型的子類型,則這個表示式傳回 EvaluationResult.TRUE。 否則傳回 EvaluationResult.FALSE。
<!ELEMENT test EMPTY>
<!ATTLIST test
property CDATA #REQUIRED
args CDATA #IMPLIED
value CDATA #IMPLIED>
這個元素是用來評估焦點物件的內容狀態。 testable 內容集可使用內容測試程式延伸點加以延伸。 如果尚未載入要執行實際測試的內容測試程式,則 test 表示式傳回 EvaluationResult.NOT_LOADED。
<!ELEMENT systemTest EMPTY>
<!ATTLIST systemTest
property CDATA #REQUIRED
value CDATA #REQUIRED>
呼叫 System.getProperty 方法來測試系統內容,並比較其結果與透過 value 屬性指定的值。
<!ELEMENT equals EMPTY>
<!ATTLIST equals
value CDATA #REQUIRED>
這個元素是用來執行焦點物件的相等檢查。如果物件等於屬性值提供的值,則表示式傳回 EvaluationResult.TRUE。否則傳回 EvaluationResult.FALSE。
<!ELEMENT count EMPTY>
<!ATTLIST count
value CDATA #REQUIRED>
這個元素是用來測試集合中的元素數目。
<!ELEMENT with (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
<!ATTLIST with
variable CDATA #REQUIRED>
這個元素變更其所有子元素的受視察物件為給定變數所參照的物件。 如果無法解析變數,則表示式在求值時會擲出 ExpressionException。with 表示式的子項是使用 and 運算子來組合。
<!ELEMENT resolve (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
<!ATTLIST resolve
variable CDATA #REQUIRED
args CDATA #IMPLIED>
這個元素變更其所有子元素的受視察物件為給定變數所參照的物件。 如果無法解析變數,則表示式在求值時會擲出 ExpressionException。with 表示式的子項是使用 and 運算子來組合。
<!ELEMENT adapt (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
<!ATTLIST adapt
type CDATA #REQUIRED>
這個元素是用來調整焦點物件,使它成為屬性類型指定的類型。 如果配接器或參照的類型尚未載入,則表示式傳回未載入。 如果類型名稱根本不存在,它會在評估期間擲出 ExpressionException。 adapt 表示式的子項是使用 and 運算子來組合。
<!ELEMENT iterate (not , and , or , instanceof , test , systemTest , equals , count , with , resolve , adapt , iterate)*>
<!ATTLIST iterate
operator (or|and) >
這個元素是用於 java.util.Collection 類型變數的疊代。 如果焦點物件不是 java.util.Collection 類型,則在評估表示式時,將擲出 ExpressionException。
<extension point=
"org.eclipse.ltk.ui.refactoring.statusContextViewers"
>
<statusContextViewer class=
"org.eclipse.ltk.internal.ui.refactoring.FileStatusContextViewer"
id=
"org.eclipse.ltk.internal.ui.refactoring.fileStatusContextViewer"
>
<enablement>
<instanceof value=
"org.eclipse.ltk.core.refactoring.FileStatusContext"
/>
</enablement>
</statusContextViewer>
</extension>
org.eclipse.ltk.ui.refactoring.IStatusContextViewer
Copyright (c) 2001, 2004 IBM Corporation and others.
All rights reserved. 這個程式和檢附的資料是遵循這項分送檢附的 Common Public License 1.0 版條款而提供的,請造訪下列網址,取得這份條款:http://www.eclipse.org/legal/cpl-v10.html