Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » PreferencePage and subclassing nightmares
PreferencePage and subclassing nightmares [message #245250] Tue, 25 May 2004 17:55 Go to next message
Eclipse UserFriend
Originally posted by: mark.melvin.dspfactory.com

Can someone point out what I am doign wrong? I'm not sure if this is
just my lack of knowledge of Java, or if I am fighting a bug in Eclipse.

I have 2 plugins:

Plugin "A" contains a class called ExtensiblePreferencePage which
extends org.eclipse.jface.preference.PreferencePage and implements
org.eclipse.ui.IWorkbenchPreferencePage. Fine.

Plugin "B" *requires* Plugin "A" (plugin A is exporting its dependent
plugins from the eclipse platform), and defines a more specific class
called SpecificPreferencePage which extends
PluginA.ExtensiblePreferencePage.

Now, Plugin "B" also contributes a preference page to Eclipse through
the org.eclipse.ui.preferencePages extension point, with the attribute
class="PluginB.SpecificPreferencePage". However, whenever I try to
instantiate my preference page, Eclipse tells me it failed to load class
PluginB.SpecificPreferencePage.

OK fine. Now, if I remove the subclassing across plugins by basically
cutting the contents of class PluginA.ExtensiblePreferencePage, and
pasting it into PluginB.SpecificPreferencePage, (so I am now extending
org.eclipse.jface.preference.PreferencePage and implementing
org.eclipse.ui.IWorkbenchPreferencePage directly in
PluginB.SpecificPreferencePage) everything works fine.

I have breakpoints everywhere on constructors and they never get
called., so this is very difficult to even begin to debug I am assuming
there is something in the class-loading of Eclipse that refuses to load
a preference page that is subclassed across 2 plugins. Is this correct?
Is this common sense and I just don't know enough about Java?

Any help would be appreciated.

Thanks,
Mark.
Re: PreferencePage and subclassing nightmares [message #245610 is a reply to message #245250] Wed, 26 May 2004 10:07 Go to previous message
Eclipse UserFriend
Originally posted by: mark.melvin.dspfactory.com

OK - I figured this out. Even though I told Plugin 'A' to export its
eclipse plugins by right-clicking the Project and fiddling with the
Properties (I went to the Java Build Path properties, and the "Order and
Export" tab, and checked off "Plug-in Dependencies") - this apparently
didn't work. However, editing the plugin.xml file for Plugin 'A', and
telling it to export them on the "Runtime" tab seems to have done the
trick. Subclassing across plugins now works.

Mark.

Mark Melvin wrote:
> Can someone point out what I am doign wrong? I'm not sure if this is
> just my lack of knowledge of Java, or if I am fighting a bug in Eclipse.
>
> I have 2 plugins:
>
> Plugin "A" contains a class called ExtensiblePreferencePage which
> extends org.eclipse.jface.preference.PreferencePage and implements
> org.eclipse.ui.IWorkbenchPreferencePage. Fine.
>
> Plugin "B" *requires* Plugin "A" (plugin A is exporting its dependent
> plugins from the eclipse platform), and defines a more specific class
> called SpecificPreferencePage which extends
> PluginA.ExtensiblePreferencePage.
>
> Now, Plugin "B" also contributes a preference page to Eclipse through
> the org.eclipse.ui.preferencePages extension point, with the attribute
> class="PluginB.SpecificPreferencePage". However, whenever I try to
> instantiate my preference page, Eclipse tells me it failed to load class
> PluginB.SpecificPreferencePage.
>
> OK fine. Now, if I remove the subclassing across plugins by basically
> cutting the contents of class PluginA.ExtensiblePreferencePage, and
> pasting it into PluginB.SpecificPreferencePage, (so I am now extending
> org.eclipse.jface.preference.PreferencePage and implementing
> org.eclipse.ui.IWorkbenchPreferencePage directly in
> PluginB.SpecificPreferencePage) everything works fine.
>
> I have breakpoints everywhere on constructors and they never get
> called., so this is very difficult to even begin to debug I am assuming
> there is something in the class-loading of Eclipse that refuses to load
> a preference page that is subclassed across 2 plugins. Is this correct?
> Is this common sense and I just don't know enough about Java?
>
> Any help would be appreciated.
>
> Thanks,
> Mark.
Previous Topic:WebDAV
Next Topic:Navigator View Bugs?
Goto Forum:
  


Current Time: Tue May 13 23:23:08 EDT 2025

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

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

Back to the top