Trolltech Home | Qt-jambi-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-jambi-interest Archive, September 2007
Re: promoting a widget in QtJambi


Message 1 in thread

On 7/23/07, Eskil Abrahamsen Blomfeldt <eblomfel@xxxxxxxxxxxxx> wrote:

> A different way of doing custom widgets in the Eclipse integration is to
> right click on your project, selecting properties, then the "Qt Designer
> Plugins" page. On this page, all your widgets should be listed, and you
> should be able to tick off your QListWidget subclass to enable it as a
> custom widget. Once you have done this and accepted the dialog box, the
> widget will appear in the widget box together with the default ones.
>
> -- Eskil

I'm unable to use custom widgets with Jambi..  When I go to the "Qt
Designer Plugins" page, I get an error message that "the currently
displayed page contains invalid values", and nothing shows up on the
page.

It seems that Jambi is dying trying to reference one of the external
classes I use in my project, which is in my project build path (Google
Guice)...   Perhaps QtJambi could skip classes it is unable to load?

regards,
Valient


Backtrace from eclipse log file:

!ENTRY org.eclipse.jface 4 2 2007-09-23 22:50:23.451
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NoClassDefFoundError: com/google/inject/Module
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at com.trolltech.qtjambi.plugintest.QtJambiPluginTest.loadClass(QtJambiP
luginTest.java:88)
        at com.trolltech.qtjambi.plugintest.QtJambiPluginTest.<init>(QtJambiPlug
inTest.java:70)
        at com.trolltech.qtjambi.properties.QtDesignerPlugins.init(QtDesignerPlu
gins.java:59)
        at com.trolltech.qtjambi.properties.QtDesignerPlugins.createContents(QtD
esignerPlugins.java:92)
        at org.eclipse.jface.preference.PreferencePage.createControl(PreferenceP
age.java:233)
...


Message 2 in thread

Hi, Valient Gough

Thanks for reporting the problem, we had a catch for exceptions around the 
loading of the class, this has now been changed to Throwable, so Errors will 
be caught as well.

As a workaround for you until the next version is out would be to edit the xml 
file by hand. You will find the file under your project at:

<Your project>/plugins/qtjambi/designer.xml
(create it if missing)

and then designer.xml should look something like this:

<qt-jambi-custom-widget-list>
    <qt-jambi-custom-widget
        class="com.test.HelloWorld"
        group="Test"
    />
</qt-jambi-custom-widget-list>

you could also remove the classes that makes the plug-in detection fail, and 
add them back in again after the XML file has been created for you. Thanks 
again :-)

Regards,
	Håvard F

On Monday 24 September 2007 08:07, Valient Gough wrote:
> On 7/23/07, Eskil Abrahamsen Blomfeldt <eblomfel@xxxxxxxxxxxxx> wrote:
> > A different way of doing custom widgets in the Eclipse integration is to
> > right click on your project, selecting properties, then the "Qt Designer
> > Plugins" page. On this page, all your widgets should be listed, and you
> > should be able to tick off your QListWidget subclass to enable it as a
> > custom widget. Once you have done this and accepted the dialog box, the
> > widget will appear in the widget box together with the default ones.
> >
> > -- Eskil
>
> I'm unable to use custom widgets with Jambi..  When I go to the "Qt
> Designer Plugins" page, I get an error message that "the currently
> displayed page contains invalid values", and nothing shows up on the
> page.
>
> It seems that Jambi is dying trying to reference one of the external
> classes I use in my project, which is in my project build path (Google
> Guice)...   Perhaps QtJambi could skip classes it is unable to load?
>
> regards,
> Valient
>
>
> Backtrace from eclipse log file:
>
> !ENTRY org.eclipse.jface 4 2 2007-09-23 22:50:23.451
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.jface". !STACK 0
> java.lang.NoClassDefFoundError: com/google/inject/Module
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12 4)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at
> com.trolltech.qtjambi.plugintest.QtJambiPluginTest.loadClass(QtJambiP
> luginTest.java:88)
>         at
> com.trolltech.qtjambi.plugintest.QtJambiPluginTest.<init>(QtJambiPlug
> inTest.java:70)
>         at
> com.trolltech.qtjambi.properties.QtDesignerPlugins.init(QtDesignerPlu
> gins.java:59)
>         at
> com.trolltech.qtjambi.properties.QtDesignerPlugins.createContents(QtD
> esignerPlugins.java:92)
>         at
> org.eclipse.jface.preference.PreferencePage.createControl(PreferenceP
> age.java:233)
> ...