|Re: Extension points: How to define new identifiers? [message #642522 is a reply to message #642510]
||Wed, 01 December 2010 16:28
| Daniel KrÃ¼gler
Registered: July 2009
On 12/1/2010 16:34, Daniel Krügler wrote:|
> If you are defining a new extension point (not implementing one), you
> can select the type "identifier" for an attribute. E.g. in the commands
> extension point 'id' defines a space of valid command id's that have
> been defined somewhere - great!
> Question: If I'm starting to define a *new* extension point with it's
> own *new* id set - how do I define the set that becomes referred to in
> the list?
OK, found it on my own - it's not that hard. In the following assume
that the ext. pt. has the full id 'com.me.thingee'.
1) Define your own ext. pt. element that defines the namespace for the
constants, e.g. "idType". Create an attribute here, i.g. "id" and define
it as required string (not translatable). This element allows users to
introduce a new "idType".
2) Define another element that references an id, let's name this
"referencee" (or whatever is the domain-specific name in your ext. pt.).
Add an element, e.g. name this 'theId' and define it as a required
*identifier*. Now the crucial point: In the exsd-editor (Definition
page), enter in the text field named "References" the string
which 'points' to the id attribute of the idType element. You can also
select the GUI via the Browse... button and enter
which lists you all available attributes with the name 'id' - I found
that way harder than just entering the path to the element as shown
HTH & Greetings from Bremen,
Powered by FUDForum
. Page generated in 0.01821 seconds