启动配置比较程序

org.eclipse.debug.core.launchConfigurationComparators

此扩展点提供了一种可配置机制来比较启动配置的特定属性。通常,可通过 java.lang.Object.equals(Object) 的缺省实现来比较启动配置属性的等同性。因此,需要特殊处理的属性应该实现此扩展点。例如,当将属性作为 XML 存储时,表示等价属性的两个字符串可能会具有不同的空格格式编排。

<!ELEMENT extension (launchConfigurationComparator*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT launchConfigurationComparator EMPTY>

<!ATTLIST launchConfigurationComparator

id        CDATA #REQUIRED

attribute CDATA #REQUIRED

class     CDATA #REQUIRED>


以下是启动配置比较器扩展点的一个示例:

 

<extension point=

"org.eclipse.debug.core.launchConfigurationComparators"

>

<launchConfigurationComparator id=

"com.example.ExampleIdentifier"

attribute=

"com.example.ExampleAttributeName"

class=

"com.example.ComparatorImplementation"

>

</launchConfigurationComparator>

</extension>

在上面的示例中,当比较键入的属性与名称 com.example.ExampleAttributeName 的等同性时将咨询指定类型的启动配置比较程序。

class 属性的值必须是实现 java.util.Comparator 接口的 Java 类的标准名称。