Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime
IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime [message #502948] Thu, 10 December 2009 06:51 Go to next message
Jens von Pilgrim is currently offline Jens von Pilgrim
Messages: 293
Registered: July 2009
Senior Member
Hi,

I have a problem that IExtensionRegistry.getExtensionPoint(..) returns
null in a standalone runtime, but it works from within a self-hosted
runtime (e.g. in a Run As-Runtime).

This is the set up:
A plugin "..graphics3d" defines an extension point:
<extension-point id="org.eclipse.draw3d.graphics3d"
name="org.eclipse.draw3d.graphics3d"
schema="src/schema/graphics3d.exsd"/>

Another plugin "..lwjgl" defines that extension:
<extension point="org.eclipse.draw3d.graphics3d">
...
</extension>

In the first plugin "..graphics3d", I try to find all extensions of
that extension point -- and there should be at least one! This is how I
try to locate the extensions, this code can be found in the
"..graphics3d" plugin which defines the extension point:

IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint point =
registry.getExtensionPoint("org.eclipse.draw3d.graphics3d");
if (point == null) {
log.severe("Extension point 'org.eclipse.draw3d.graphics3d' not
found"); //$NON-NLS-1$
return;
}
IExtension[] extensions = point.getExtensions();
...

When I run Eclipse self-hosted, i.e. "Run As..", in order to test and
debug it, everything is working (i.e. the point is not null). However,
when installing all my plugins in a standalone runtime, it does not
work (i.e. the point is null). According to the console, the extension
point is not found:

... [0x0-0x33033].org.eclipse.eclipse SEVERE: Extension point
'org.eclipse.draw3d.graphics3d' not found

All plugins are installed and listed in the installation details of the
about dialog.

Actually, this problem is reported in a bug report
https://bugs.eclipse.org/297428 and I want to fix it -- but I do not
know why the extension point is not found. Maybe I missed something in
my manifest files? Here are my manifest files:

"..graphics3d":
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Graphical Editing Framework 3D, Graphics3D
Bundle-SymbolicName: org.eclipse.draw3d.graphics3d;singleton:=true
Bundle-Version: 0.8.1
Bundle-Vendor: Eclipse.org
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.draw2d;bundle-version>="3.4.0",
org.eclipse.draw3d.geometry;bundle-version>="0.8.0",
org.eclipse.core.runtime;bundle-version>="3.4.0"
Export-Package: org.eclipse.draw3d.graphics3d
Bundle-ActivationPolicy: lazy


"..lwjgl":
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Graphics3D implementation using LWJGL Plug-in
Bundle-SymbolicName: org.eclipse.draw3d.lwjgl;singleton:=true
Bundle-Version: 0.8.1
Bundle-Activator: org.eclipse.draw3d.lwjgl.Activator
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.lwjgl;bundle-version>="2.0.0",
org.eclipse.draw3d.graphics3d;bundle-version>="0.8.0",
org.eclipse.draw3d;bundle-version>="0.8.1"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.eclipse.draw3d.graphics3d.lwjgl,
org.eclipse.draw3d.graphics3d.lwjgl.font,
org.eclipse.draw3d.graphics3d.lwjgl.graphics,
org.eclipse.draw3d.graphics3d.lwjgl.offscreen,
org.eclipse.draw3d.graphics3d.lwjgl.util
Bundle-ActivationPolicy: lazy



I have already played around with the Bundle-ActivationPolicy and the
versions, but this had no effect. Do you have any ideas?

Cheers

Jens
Re: IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime [message #502949 is a reply to message #502948] Thu, 10 December 2009 06:54 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5296
Registered: July 2009
Senior Member
Is it possible that you forgot to add it to the build.properties?

Tom

Am 10.12.09 12:51, schrieb Jens v.P.:
> Hi,
>
> I have a problem that IExtensionRegistry.getExtensionPoint(..) returns
> null in a standalone runtime, but it works from within a self-hosted
> runtime (e.g. in a Run As-Runtime).
>
> This is the set up:
> A plugin "..graphics3d" defines an extension point:
> <extension-point id="org.eclipse.draw3d.graphics3d"
> name="org.eclipse.draw3d.graphics3d" schema="src/schema/graphics3d.exsd"/>
>
> Another plugin "..lwjgl" defines that extension:
> <extension point="org.eclipse.draw3d.graphics3d">
> ...
> </extension>
>
> In the first plugin "..graphics3d", I try to find all extensions of that
> extension point -- and there should be at least one! This is how I try
> to locate the extensions, this code can be found in the "..graphics3d"
> plugin which defines the extension point:
>
> IExtensionRegistry registry = Platform.getExtensionRegistry();
> IExtensionPoint point =
> registry.getExtensionPoint("org.eclipse.draw3d.graphics3d");
> if (point == null) {
> log.severe("Extension point 'org.eclipse.draw3d.graphics3d'
> not found"); //$NON-NLS-1$
> return;
> }
> IExtension[] extensions = point.getExtensions();
> ...
>
> When I run Eclipse self-hosted, i.e. "Run As..", in order to test and
> debug it, everything is working (i.e. the point is not null). However,
> when installing all my plugins in a standalone runtime, it does not work
> (i.e. the point is null). According to the console, the extension point
> is not found:
>
> .. [0x0-0x33033].org.eclipse.eclipse SEVERE: Extension point
> 'org.eclipse.draw3d.graphics3d' not found
>
> All plugins are installed and listed in the installation details of the
> about dialog.
>
> Actually, this problem is reported in a bug report
> https://bugs.eclipse.org/297428 and I want to fix it -- but I do not
> know why the extension point is not found. Maybe I missed something in
> my manifest files? Here are my manifest files:
>
> "..graphics3d":
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Graphical Editing Framework 3D, Graphics3D
> Bundle-SymbolicName: org.eclipse.draw3d.graphics3d;singleton:=true
> Bundle-Version: 0.8.1
> Bundle-Vendor: Eclipse.org
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Require-Bundle: org.eclipse.draw2d;bundle-version>="3.4.0",
> org.eclipse.draw3d.geometry;bundle-version>="0.8.0",
> org.eclipse.core.runtime;bundle-version>="3.4.0"
> Export-Package: org.eclipse.draw3d.graphics3d
> Bundle-ActivationPolicy: lazy
>
>
> "..lwjgl":
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Graphics3D implementation using LWJGL Plug-in
> Bundle-SymbolicName: org.eclipse.draw3d.lwjgl;singleton:=true
> Bundle-Version: 0.8.1
> Bundle-Activator: org.eclipse.draw3d.lwjgl.Activator
> Bundle-Vendor: Eclipse.org
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> org.lwjgl;bundle-version>="2.0.0",
> org.eclipse.draw3d.graphics3d;bundle-version>="0.8.0",
> org.eclipse.draw3d;bundle-version>="0.8.1"
> Bundle-RequiredExecutionEnvironment: J2SE-1.5
> Export-Package: org.eclipse.draw3d.graphics3d.lwjgl,
> org.eclipse.draw3d.graphics3d.lwjgl.font,
> org.eclipse.draw3d.graphics3d.lwjgl.graphics,
> org.eclipse.draw3d.graphics3d.lwjgl.offscreen,
> org.eclipse.draw3d.graphics3d.lwjgl.util
> Bundle-ActivationPolicy: lazy
>
>
>
> I have already played around with the Bundle-ActivationPolicy and the
> versions, but this had no effect. Do you have any ideas?
>
> Cheers
>
> Jens
>
>
Re: IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime [message #503068 is a reply to message #502949] Thu, 10 December 2009 13:38 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1338
Registered: July 2009
Senior Member
Tom Schindl wrote on Thu, 10 December 2009 06:54
Is it possible that you forgot to add it to the build.properties?


Jens, Tom, I (reporter of bug) just checked and it isn't in build.properties. So good guess, Tom. I'll submit a patch on that bug, Jens.

I actually had noticed this issue before but I didn't mention it in my report because fixing it didn't seem to fix the issue and I assumed that there was more work needed. But I think that was because of plugin loading behavior -- apparantly when you replace a plugin in the runtime -- even with exact same name -- new extensions aren't noticed. I suppose this is cached somewhere.. When I manually disabled the plugin and then re-enabled it, I was able to get proper behavior.

This is just another reason to try to get self-hosting / local build and PDE build aligned. Smile And to come up with a better way to test runtime configurations. Or perhaps there is one and I just don't know how to do it. I was working with Kristian to help diagnose this issue a couple of weeks ago (we had't pinned it down to this area yet) and it was a major hassle just to test a single set of build changes.

-Miles

[Updated on: Thu, 10 December 2009 08:55]

Report message to a moderator

Re: IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime [message #503243 is a reply to message #503068] Fri, 11 December 2009 05:02 Go to previous messageGo to next message
Jens von Pilgrim is currently offline Jens von Pilgrim
Messages: 293
Registered: July 2009
Senior Member
Tom, Miles,

thanks for your help. Indeed I forgot the plugin.xml in the
build.properties, and Miles even provided a bugfix. Fixed bug
https://bugs.eclipse.org/297428 thanks to you!

On 2009-12-10 19:38:24 +0100, Miles Parker <milesparker@gmail.com> said:
> This is just another reason to try to get self-hosting / local build
> and PDE build aligned. :)

Yes, you're absolutely right. However I want to wait until JOGL is IP
approved, as I do want to create self-contained releases and builds.
(Besides I have almost no time at the moment for that, since I have to
spend all my time working on my thesis... I will do that as soon as the
thesis is submitted, promised ;-) ).

Cheers

Jens
Re: IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime [message #503320 is a reply to message #503243] Fri, 11 December 2009 10:12 Go to previous messageGo to next message
Miles Parker is currently offline Miles Parker
Messages: 1338
Registered: July 2009
Senior Member
Jens von Pilgrim wrote on Fri, 11 December 2009 05:02
(Tim and Miles) Fixed bug
https://bugs.eclipse.org/297428 thanks to you!


Happy to do it. Goodness knows I've spent enough time dorking around with plugin packaging issues to know what can go wrong..

Quote:
On 2009-12-10 19:38:24 +0100, Miles Parker <milesparker@gmail.com> said:
> This is just another reason to try to get self-hosting / local build
> and PDE build aligned. Smile

Quote:
Yes, you're absolutely right.... I will do that as soon as the
thesis is submitted, promised Wink ).

Cheers

Jens



Actually I was talking about getting the <i>PDE and Local build process<i> itself aligned. That's a much bigger can of worms. Smile The basic issue is that there are a lot of things that the self-hosting environment ignores that PDE Build and the platform runtime don't. And OTOH, there are situations where things don't work properly under self-hosting but do work under runtime. Actually it's not really the fault of PDE build per se, since they are following build packaging as defined by developer, but that is much more stringent than what the self-hosting environment requires so you end up with this big potential mis-match between what happens on development environment and otherwise. Actually, you really have three (!) seperate scenarios, because building plugins and features using wizards and installing them locally also has differences!

But this is all as I say a much bigger issue -- one I think the B3 team and others are tackling.

[Updated on: Fri, 11 December 2009 10:12]

Report message to a moderator

Re: IExtensionRegistry.getExtensionPoint(..) returns null in standalon runtime [message #503382 is a reply to message #503320] Sat, 12 December 2009 11:11 Go to previous message
Jens von Pilgrim is currently offline Jens von Pilgrim
Messages: 293
Registered: July 2009
Senior Member
On 2009-12-11 16:12:12 +0100, Miles Parker <milesparker@gmail.com> said:
> Actually I was talking about getting the <i>PDE and Local build
> process<i> itself aligned. [...]

Ah, ok. ;-) Probably it's my remorse for not having set up the Athena
build system and other things (such as automated tests) ...

Jens
Previous Topic:Funcitonality for "Cleanup" views, other fine-grained control..
Next Topic:content-type selection by filename-pattern?
Goto Forum:
  


Current Time: Sun Aug 31 04:39:32 EDT 2014

Powered by FUDForum. Page generated in 0.02203 seconds