Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » issue for calling createExecutableExtension in eclipse3.0
issue for calling createExecutableExtension in eclipse3.0 [message #251798] Fri, 11 June 2004 10:34 Go to next message
Eclipse UserFriend
Originally posted by: annabel.arnaud.bull.net

Here is the piece of code we used to call for descovering plugin extension
store in exsd file:

private static IConfigurationElement retrieveServiceMembers()


IExtensionPoint extensionPoint =
Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_ POINT);

if (extensionPoint == null) {
System.err.println("unable to resolve extension-point: " +
EXTENSION_POINT);
}

IConfigurationElement[] members =
extensionPoint.getConfigurationElements();
return members[0];
}

In eclipse 3.0 the extensionPoint.getConfigurationElements(); method can not
be used without adding the compatibitily plugin. We do not want to use the
compatibility plugin BUT we do not find how to retrieve our
IConfigurationElement[] without this method.

We use that to call the createExecutableExtension method.

Any ideas ?

Thanks.
Re: issue for calling createExecutableExtension in eclipse3.0 [message #251873 is a reply to message #251798] Fri, 11 June 2004 12:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

Who told you it can't be used without the compatibility plugin? It isn't
deprecated.


--
Thanks, Rich Kulp

Re: issue for calling createExecutableExtension in eclipse3.0 [message #251920 is a reply to message #251873] Fri, 11 June 2004 14:54 Go to previous messageGo to next message
Eclipse UserFriend
Rich Kulp a écrit :
> Who told you it can't be used without the compatibility plugin? It isn't
> deprecated.
>
>
The fact is that if we use the code as is in the RCp version, the
following line
IConfigurationElement[] members =
extensionPoint.getConfigurationElements();
always return null ! In the code documentation of the
getConfigurationElements method it is written that this method will
always return null if we do not use the compatibility plugins !!

What are we missing ??

Sorry for the other post concerning the same subject in the forum :-(
Re: issue for calling createExecutableExtension in eclipse3.0 [message #251938 is a reply to message #251920] Fri, 11 June 2004 15:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.NO.SPAM.us.ibm.com

I'm looking at yesterday's build (6/10) and
IExtensionPoint.getConfigurationElements() has absolutely no restriction
on it being in compatibility mode. I don't where your's is coming from.

/**
* Returns all configuration elements from all extensions configured
* into this extension point. Returns an empty array if this extension
* point has no extensions configured, or none of the extensions
* contain configuration elements.
*
* @return the configuration elements for all extension configured
* into this extension point
*/
public IConfigurationElement[] getConfigurationElements();


As you can see it says nothing about compatibility mode.

--
Thanks, Rich Kulp

Re: issue for calling createExecutableExtension in eclipse3.0 [message #251978 is a reply to message #251938] Fri, 11 June 2004 18:23 Go to previous messageGo to next message
Eclipse UserFriend
Rich Kulp a écrit :
> I'm looking at yesterday's build (6/10) and
> IExtensionPoint.getConfigurationElements() has absolutely no restriction
> on it being in compatibility mode. I don't where your's is coming from.
>
> /**
> * Returns all configuration elements from all extensions configured
> * into this extension point. Returns an empty array if this extension
> * point has no extensions configured, or none of the extensions
> * contain configuration elements.
> *
> * @return the configuration elements for all extension configured
> * into this extension point
> */
> public IConfigurationElement[] getConfigurationElements();
>
>
> As you can see it says nothing about compatibility mode.
>
ok, I will check it Monday. The fact is the we switch a lot between
version and perhapps a link is badly made. Today, we do not success in
having our public IConfigurationElement[] getConfigurationElements();
returning something else than NULL ! I will check it.
Thanks!
Re: issue for calling createExecutableExtension in eclipse3.0 [message #252215 is a reply to message #251978] Mon, 14 June 2004 04:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: annabel.arnaud.bull.net

I thought that the problem comes from the compatibility plugin because when
I remove this plugin of the required plugins the
IExtensionPoint.getConfigurationElements() return null (an array with 0
element) and if the compatibility plugin is added to the required plugin the
good IConfigurationElement is returned and the perspective is open without
problems.
What is the role of the compatibility plugin here?
Thanks.

"strus" <strus_fr@yahoo.fr> a
Re: issue for calling createExecutableExtension in eclipse3.0 [message #252282 is a reply to message #252215] Mon, 14 June 2004 09:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: annabel.arnaud.bull.net

I solved my problem,
I had an unused import in the fragment.xml file which certainly needed the
compatibility plugin then I removed the import
(import="org.eclipse.core.ressource") and now the getConfigurationElements()
method return the good result.
Thanks

"Annabelle Arnaud" <annabel.arnaud@bull.net> a
Re: issue for calling createExecutableExtension in eclipse3.0 [message #252354 is a reply to message #252282] Mon, 14 June 2004 11:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.nospam.inf.ufsc.br

Anabelle, what build of Eclipse are you target against? It must be an old
one. The implementation of IExtensionPoint.getConfigurationElements is
supposed to never return null, no matter in what strange state you may
have got. It could have returned an empty array, but not null.

Rafael

Annabelle Arnaud wrote:

> I solved my problem,
> I had an unused import in the fragment.xml file which certainly needed the
> compatibility plugin then I removed the import
> (import="org.eclipse.core.ressource") and now the getConfigurationElements()
> method return the good result.
> Thanks
Re: issue for calling createExecutableExtension in eclipse3.0 [message #252371 is a reply to message #252354] Mon, 14 June 2004 12:27 Go to previous messageGo to next message
Eclipse UserFriend
Rafael Chaves a écrit :
> Anabelle, what build of Eclipse are you target against? It must be an old
> one. The implementation of IExtensionPoint.getConfigurationElements is
> supposed to never return null, no matter in what strange state you may
> have got. It could have returned an empty array, but not null.
>
> Rafael
>
> Annabelle Arnaud wrote:
>
>
>>I solved my problem,
>>I had an unused import in the fragment.xml file which certainly needed the
>>compatibility plugin then I removed the import
>>(import="org.eclipse.core.ressource") and now the getConfigurationElements()
>>method return the good result.
>>Thanks
>
>
>
We target RCP-3.0 and our previous plugin was running on eclipse2.1.3

The fact is that if we use the import="org.eclipse.core.ressource" in
RCP-eclipse3.0.0 without the compatibility plugin, the
IExtensionPoint.getConfigurationElements returns null.

Now that we found that, our migration is finished, all works fine with
eclipse-RCP-3.0(RC2)!!! great :-)


Thanks for the help.
Re: issue for calling createExecutableExtension in eclipse3.0 [message #252772 is a reply to message #252371] Tue, 15 June 2004 12:18 Go to previous message
Eclipse UserFriend
Originally posted by: chaves.nospam.inf.ufsc.br

strus wrote:

> We target RCP-3.0 and our previous plugin was running on eclipse2.1.3
> The fact is that if we use the import="org.eclipse.core.ressource" in
> RCP-eclipse3.0.0 without the compatibility plugin, the
> IExtensionPoint.getConfigurationElements returns null.
> Now that we found that, our migration is finished, all works fine with
> eclipse-RCP-3.0(RC2)!!! great :-)

That is good. However, I believe your problem description was incorrect.
You could be getting a null extension point by calling
IExtensionRegistry.getExtensionPoint, but you would never get null as a
result of calling IExtensionPoint.getConfigurationElements, that is just
impossible...
Previous Topic:line number insert feature
Next Topic:Plug-In: Is this resource a CVS resource?
Goto Forum:
  


Current Time: Wed May 07 13:40:29 EDT 2025

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

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

Back to the top