Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Accessing editor preference page preferences from Edit plugin(getting NoClassDefFound error when running built application)
icon5.gif  Accessing editor preference page preferences from Edit plugin [message #516976] Thu, 25 February 2010 16:31 Go to next message
Greg Mising name is currently offline Greg Mising nameFriend
Messages: 47
Registered: July 2009
Member
I have a RCP EMF project and there is a bunch of functionality in the edit plugin that requires access to the user-defined preferences of a custom editor preference page (from the Editor Plugin). The way I have implemented this is as follows.

When the EditorPlugin initializes the editing domain, it passes its IPreferenceStore to the edit plugin.

The Edit plugin has a class that defines the preference page preferences and default values using the IPreferenceStore passed by the EditorPlugin. The Editor plugin has a custom preference page that uses this class to populate it.

The Edit plugin has a bunch of classes with code that makes reference to the current values of the preference store preferences.

I had to add org.eclipse.ui as a plugin dependency to the Edit plugin in order to make IPreferenceStore visible.

Everything works fine when I run from the IDE but when I build the application and run it standalone I get the following stack trace:

Could not open the editor...
java.lang.NoClassDefFoundError: org/eclipse/jface/preference/IPreferenceStore
at aaf.datagen.preferences.AAFPreferences.initialize(AAFPrefere nces.java:135) <-- Part of the Edit Plugin
at aaf.datagen.presentation.DatagenEditor.initializeEditingDoma in(DatagenEditor.java:543)
at aaf.datagen.presentation.DatagenEditor.<init>(DatagenEditor.java:493)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e Method)
...

AAFPreferences.java:135 = preferenceStore.setDefault( AW_INSTALL_LOCATION, AW_INSTALL_LOCATION_DEFAULT );

Can anyone explain why I'm getting this error? Is there a better way to achieve what I'm trying to do? One that works?!

Thanks.
Greg
Re: Accessing editor preference page preferences from Edit plugin [message #517047 is a reply to message #516976] Thu, 25 February 2010 21:32 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Greg,

IPreferenceStore is located in org.eclipse.jface so I think you should
narrow your dependency to that. Perhaps you've not deployed all the
dependencies you need?


Greg wrote:
> I have a RCP EMF project and there is a bunch of functionality in the
> edit plugin that requires access to the user-defined preferences of a
> custom editor preference page (from the Editor Plugin). The way I
> have implemented this is as follows.
>
> When the EditorPlugin initializes the editing domain, it passes its
> IPreferenceStore to the edit plugin.
> The Edit plugin has a class that defines the preference page
> preferences and default values using the IPreferenceStore passed by
> the EditorPlugin. The Editor plugin has a custom preference page that
> uses this class to populate it.
>
> The Edit plugin has a bunch of classes with code that makes reference
> to the current values of the preference store preferences.
>
> I had to add org.eclipse.ui as a plugin dependency to the Edit plugin
> in order to make IPreferenceStore visible.
>
> Everything works fine when I run from the IDE but when I build the
> application and run it standalone I get the following stack trace:
>
> Could not open the editor...
> java.lang.NoClassDefFoundError:
> org/eclipse/jface/preference/IPreferenceStore
> at aaf.datagen.preferences.AAFPreferences.initialize(AAFPrefere
> nces.java:135) <-- Part of the Edit Plugin
> at aaf.datagen.presentation.DatagenEditor.initializeEditingDoma
> in(DatagenEditor.java:543)
> at
> aaf.datagen.presentation.DatagenEditor.<init>(DatagenEditor.java:493)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Nativ e
> Method)
> ...
>
> AAFPreferences.java:135 = preferenceStore.setDefault(
> AW_INSTALL_LOCATION, AW_INSTALL_LOCATION_DEFAULT );
>
> Can anyone explain why I'm getting this error? Is there a better way
> to achieve what I'm trying to do? One that works?!
>
> Thanks.
> Greg


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Multiple Serializations
Next Topic:Ecore annotations propagating to genmodel
Goto Forum:
  


Current Time: Fri Apr 19 13:27:32 GMT 2024

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

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

Back to the top