Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Extension points: How to define new identifiers?
Extension points: How to define new identifiers? [message #642510] Wed, 01 December 2010 15:34 Go to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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?

Thanks & Greetings from Bremen,

Daniel Krügler
Re: Extension points: How to define new identifiers? [message #642522 is a reply to message #642510] Wed, 01 December 2010 16:28 Go to previous message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
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

com.me.thingee/idType/@id

which 'points' to the id attribute of the idType element. You can also
select the GUI via the Browse... button and enter

id

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
above, though.

HTH & Greetings from Bremen,

Daniel Krügler
Previous Topic:Hide ContributionItem but be able to trigger it via accellerator
Next Topic:-p2 directory call with -uninstallIU
Goto Forum:
  


Current Time: Thu Apr 25 14:13:37 GMT 2024

Powered by FUDForum. Page generated in 0.03149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top