Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Defining an extension point in a RAP app and using it
Defining an extension point in a RAP app and using it [message #118781] Mon, 19 January 2009 18:52 Go to next message
Eclipse UserFriend
Originally posted by: spanprevention-nursubscriptions.gmail.com

Hi All,

A newbie question related to extension points. I have a RAP application
(in plugin P1). It provides an extension point, say ExP1. There is a
plugin P2 that provides an extention for extension point ExP1. P2's
MANIFEST.MF refers to P1 in its "Require-Bundle" key to implement an
interface exported by P1 towards fulfillment of extension point contract.
P1 itself has no dependency on P2. Both P1 and P2 are open projects in the
workbench. When the RAP app (i.e. P1) is run through Eclipse, no
extensions are found for the extension point ExP1.

Following is the code used in P1:
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint point = registry.getExtensionPoint("ID of ExP1");
if (point != null) {
IExtension[] extensions = point.getExtensions();
// the extensions array obtained above is empty
}

I had expected the extension contributed by P2 to be found, but that
wasn't the case. I believe i am missing something rather basic here. Any
pointers on how to obtain the extension contributed by P2 would be greatly
appreciated.

TIA,
Best Regards,
- Abhi
Re: Defining an extension point in a RAP app and using it [message #118795 is a reply to message #118781] Mon, 19 January 2009 21:07 Go to previous messageGo to next message
Benjamin Muskalla is currently offline Benjamin MuskallaFriend
Messages: 237
Registered: July 2009
Senior Member
Hi Abhi,

your snippet looks good so far.
The only case I can think which behaves slightly different than in RCP
is when trying to read extensions of org.eclipse.ui.

If you really want to read the extensions of another plugin, be sure
that your contributing bundle is selected in your launch configuration.
Try to start with the "-console" parameter and type "ss" into the OSGi
console. There you should check if you bundle with the extension is
available (does not even need to be active at that moment).

Regards
Benny

Abhi wrote:
> Hi All,
>
> A newbie question related to extension points. I have a RAP application
> (in plugin P1). It provides an extension point, say ExP1. There is a
> plugin P2 that provides an extention for extension point ExP1. P2's
> MANIFEST.MF refers to P1 in its "Require-Bundle" key to implement an
> interface exported by P1 towards fulfillment of extension point
> contract. P1 itself has no dependency on P2. Both P1 and P2 are open
> projects in the workbench. When the RAP app (i.e. P1) is run through
> Eclipse, no extensions are found for the extension point ExP1.
> Following is the code used in P1:
> IExtensionRegistry registry = Platform.getExtensionRegistry();
> IExtensionPoint point = registry.getExtensionPoint("ID of ExP1");
> if (point != null) {
> IExtension[] extensions = point.getExtensions();
> // the extensions array obtained above is empty
> }
>
> I had expected the extension contributed by P2 to be found, but that
> wasn't the case. I believe i am missing something rather basic here. Any
> pointers on how to obtain the extension contributed by P2 would be
> greatly appreciated.
>
> TIA,
> Best Regards,
> - Abhi
>
>
Re: Defining an extension point in a RAP app and using it [message #118874 is a reply to message #118795] Tue, 20 January 2009 12:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: spanprevention-nursubscriptions.gmail.com

Hi Benny,

Your tip about checking the launch configuration did the trick! Very silly
on my part not to have checked it.

Thanks a lot for the tip!

Best Regards,
- Abhi
Re: Defining an extension point in a RAP app and using it [message #126953 is a reply to message #118874] Thu, 02 April 2009 22:25 Go to previous message
Nitha is currently offline NithaFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Abhi,

I am not sure if this is the right place. But I was browsing for
"Enable/Disable Plugin versions dynamically " and found you posted asking
for the same.

I am looking for exactly same info on a scenario where I need to enable
one version of the plugin and on other scenarios other versions of the
same plugin needs enabled. Could you share your findings on this topic....

thanks,
nitha
Previous Topic:Eclipse Help System in RAP Basics?
Next Topic:JSWriter in 1.2.0M4?
Goto Forum:
  


Current Time: Tue Dec 07 01:01:51 GMT 2021

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

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

Back to the top