How to access the kind of an extension attribute ? [message #288731] |
Fri, 22 July 2005 10:26  |
Eclipse User |
|
|
|
Hi,
From the extensions defined for a given extension point in a plugin, I'm
trying to determine programmatically the ones that have an attribute with
"Java" kind. So basically, the attribute that contains a fully qualified
name of a Java class.
From what I'm seeing in the interfaces, IExtension or
IConfigurationElement seems not to provide such possibilities. After some
research, it sounds that this information is available in ISchemaAttribute
(accessible via ISchema)... But those interfaces are internal. I'm not
very enclined to use them, but if it's the only place where I can reach
such data I think I'll resign myself to do it. Could you tell me if there
are more proper solution to access the "type/kind" of an extension
attribute ?
If no, could you describe me how I could get the "ISchema" instance
related to a given plugin using the less internal classes as possible ?
I'm using Eclipse 3.1.
Thanks for your consideration,
Regards,
Emmanuel.
|
|
|
Re: How to access the kind of an extension attribute ? [message #288732 is a reply to message #288731] |
Fri, 22 July 2005 10:43   |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Emmanuel,
Won't IConfigurationElement.getAttribute do the trick?
egeay@us.ibm.com wrote:
>Hi,
>
>From the extensions defined for a given extension point in a plugin, I'm
>trying to determine programmatically the ones that have an attribute with
>"Java" kind. So basically, the attribute that contains a fully qualified
>name of a Java class.
>From what I'm seeing in the interfaces, IExtension or
>IConfigurationElement seems not to provide such possibilities. After some
>research, it sounds that this information is available in ISchemaAttribute
>(accessible via ISchema)... But those interfaces are internal. I'm not
>very enclined to use them, but if it's the only place where I can reach
>such data I think I'll resign myself to do it. Could you tell me if there
>are more proper solution to access the "type/kind" of an extension
>attribute ?
>If no, could you describe me how I could get the "ISchema" instance
>related to a given plugin using the less internal classes as possible ?
>
>I'm using Eclipse 3.1.
>
>Thanks for your consideration,
>
>Regards,
>
>Emmanuel.
>
>
|
|
|
Re: How to access the kind of an extension attribute ? [message #288733 is a reply to message #288732] |
Fri, 22 July 2005 11:21   |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
He wants to know whether attribute is just a string, or the name of a
class. That info is only available during development in the schema. It
is not available during runtime. The PDE is the only one that uses it so
that it can give a nicer experience when editing the plugin.xml. If the
schema says it is a class attribute it knows to verify if the class
exists in the development workspace.
Ed Merks wrote:
> Emmanuel,
>
> Won't IConfigurationElement.getAttribute do the trick?
>
>
> egeay@us.ibm.com wrote:
>
>> Hi,
>>
>> From the extensions defined for a given extension point in a plugin,
>> I'm trying to determine programmatically the ones that have an
>> attribute with "Java" kind. So basically, the attribute that contains
>> a fully qualified name of a Java class.
>> From what I'm seeing in the interfaces, IExtension or
>> IConfigurationElement seems not to provide such possibilities. After
>> some research, it sounds that this information is available in
>> ISchemaAttribute (accessible via ISchema)... But those interfaces are
>> internal. I'm not very enclined to use them, but if it's the only
>> place where I can reach such data I think I'll resign myself to do it.
>> Could you tell me if there are more proper solution to access the
>> "type/kind" of an extension attribute ?
>> If no, could you describe me how I could get the "ISchema" instance
>> related to a given plugin using the less internal classes as possible ?
>>
>> I'm using Eclipse 3.1.
>>
>> Thanks for your consideration,
>>
>> Regards,
>>
>> Emmanuel.
>>
>>
--
Thanks,
Rich Kulp
|
|
|
|
|
|
|
|
Re: How to access the kind of an extension attribute ? [message #288755 is a reply to message #288754] |
Fri, 22 July 2005 15:41  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
But it works against the target not against the running eclipse. So if
you are interested in the target eclipse instead of the one that is
currently running, then ok. But if you wanted the one that is currently
running then you are out of luck if it happens to be different than the
target eclipse.
egeay@us.ibm.com wrote:
> PDECore to access IPluginExtension instances for a given plugin gave me an
> entry point to get access to the schema.
>
> Thanks.
>
> Emmanuel.
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.28477 seconds