我正在为我的 Eclipse RCP 应用程序定义一个具有一些属性的扩展点。其中一个属性是string,它最多应该有3 个字母字符。
目前我有以下定义:
<element name="type">
<complexType>
<attribute name="type_identifier" type="string" use="required">
<annotation>
<documentation>
Dieser String sollte noch auf maximal 3 Zeichn begrenzt werden
</documentation>
</annotation>
</attribute>
</complexType>
</element>
通过编辑器,我只能添加枚举限制,在 xml-source 中显示为:
<restriction base="string">
<enumeration value="blubb">
</enumeration>
</restriction>
但我想要的是这样的:
<restriction base="string">
<pattern value="[A-Z]{3}">
</pattern>
</restriction>
我可以将此模式通知用于我的扩展点吗?我目前无法测试该设置,因此对我来说不可能简单地“试一试”。