<!ELEMENT extension (variable*)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT variable EMPTY>
<!ATTLIST variable
name CDATA #REQUIRED
initialValue CDATA #IMPLIED
initializerClass CDATA #IMPLIED
description CDATA #IMPLIED>
initializerClass
属性。org.eclipse.core.variables.IValueVariableInitializer
的 Java 类的标准名称。当指定了此项时,一定不能指定 initialValue
属性。
在以上示例中,指定的变量是使用初始值“/usr/local/foo”创建的。 以下是具有初始化器类的值变量添加项的一个示例:<extension point=
"org.eclipse.core.variables.valueVariables"
>
<variable name=
"FOO_HOME"
initialValue=
"/usr/local/foo"
>
</variable>
</extension>
在上述示例中,创建了变量 FOO_HOME,当首次请求值时,将使用“com.example.FooLocator”类来初始化值。<extension point=
"org.eclipse.core.variables.valueVariables"
>
<variable name=
"FOO_HOME"
initializerClass=
"com.example.FooLocator"
>
</variable>
</extension>
Copyright (c) 2003, 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