描述:此扩展点提供了一种可配置机制来比较启动配置的特定属性。通常,可通过 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 的等同性时将咨询指定类型的启动配置比较程序。
API 信息:属性 class 的值必须是实现接口 java.util.Comparator 的 Java 类的全限定名。