Home » Eclipse Projects » Eclipse 4 » org.eclipse.e4.xwt.XWTException(All forms being executed throws XWTException)
org.eclipse.e4.xwt.XWTException [message #521811] |
Thu, 18 March 2010 15:04  |
Eclipse User |
|
|
|
Hello,
I have this example from the test examples:
<Composite xmlns="http://www.eclipse.org/xwt/presentation"
xmlns:j="clr-namespace:test.ui"
xmlns:x="http://www.eclipse.org/xwt">
<Composite.layout>
<GridLayout numColumns="1" />
</Composite.layout>
<Section name="Section" x:style="Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED "
text="Section Two">
<Section.client>
<Label name="Section.Label" text="test" />
</Section.client>
</Section>
</Composite>
with the following code-behind:
package snippets.e4.forms;
import java.net.URL;
import org.eclipse.e4.xwt.IConstants;
import org.eclipse.e4.xwt.XWT;
public class Section
{
public static void main( String[] args )
{
URL url = Section.class.getResource( Section.class.getSimpleName() + IConstants.XWT_EXTENSION_SUFFIX );
try
{
XWT.open( url );
}
catch( Exception e )
{
e.printStackTrace();
}
}
}
Running the code-behind throws this exception:
org.eclipse.e4.xwt.XWTException: Type Section is not found.
at org.eclipse.e4.xwt.XWTLoader.getMetaclass(XWTLoader.java:899 )
at org.eclipse.e4.xwt.javabean.ResourceLoader.doCreate(Resource Loader.java:419)
at org.eclipse.e4.xwt.javabean.ResourceLoader.doCreate(Resource Loader.java:648)
at org.eclipse.e4.xwt.javabean.ResourceLoader.doCreate(Resource Loader.java:449)
at org.eclipse.e4.xwt.javabean.ResourceLoader.createCLRElement( ResourceLoader.java:353)
at org.eclipse.e4.xwt.internal.core.Core.createCLRElement(Core. java:606)
at org.eclipse.e4.xwt.internal.core.Core.load(Core.java:646)
at org.eclipse.e4.xwt.internal.core.Core.load(Core.java:633)
at org.eclipse.e4.xwt.XWTLoader.loadWithOptions(XWTLoader.java: 835)
at org.eclipse.e4.xwt.XWTLoader$1.run(XWTLoader.java:768)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.e4.xwt.XWTLoader.open(XWTLoader.java:762)
at org.eclipse.e4.xwt.XWTLoader.open(XWTLoader.java:714)
at org.eclipse.e4.xwt.XWT.open(XWT.java:411)
at snippets.e4.forms.Section.main(Section.java:17)
A similar exception is thown for all my forms.
My dependencies in e4 are:
javax.inject;bundle-version="1.0.0",
org.eclipse.core.resources;bundle-version="3.6.0",
org.eclipse.core.runtime;bundle-version="3.6.0",
org.eclipse.swt;bundle-version="3.6.0",
org.eclipse.core.databinding;bundle-version="1.3.0",
org.eclipse.core.databinding.beans;bundle-version="1.2.0",
org.eclipse.jface;bundle-version="3.6.0",
org.eclipse.jface.databinding;bundle-version="1.4.0",
org.eclipse.e4.ui.services;bundle-version="0.9.1",
org.eclipse.e4.ui.workbench;bundle-version="0.9.1",
org.eclipse.e4.core.services;bundle-version="0.9.1",
org.eclipse.e4.ui.workbench.swt;bundle-version="0.9.1",
org.eclipse.core.databinding.property;bundle-version="1.2.100 ",
org.eclipse.e4.ui.css.core;bundle-version="0.9.0",
org.w3c.css.sac;bundle-version="1.3.0",
org.eclipse.e4.core.commands;bundle-version="0.9.0",
org.eclipse.e4.ui.bindings;bundle-version="0.9.0",
org.junit4;bundle-version="4.7.0",
org.eclipse.e4.xwt;bundle-version="0.9.1",
com.ibm.icu;bundle-version="4.2.1",
org.eclipse.e4.xwt.tests;bundle-version="0.9.1",
org.eclipse.e4.xwt.forms;bundle-version="0.9.1",
org.eclipse.ui.forms;bundle-version="3.5.0"
I don't know exactly why the xwt and swt form packages are not being recognized.
Similarl, the form fails to be displayed in the XWT editor.
Any help will be appreciated.
Thanks
|
|
| |
Re: org.eclipse.e4.xwt.XWTException [message #521866 is a reply to message #521811] |
Thu, 18 March 2010 20:25   |
Eclipse User |
|
|
|
You need org.eclipse.e4.xwt.forms plugin. You can find examples in the
package org.eclipse.e4.xwt.test.forms
Regards
yves
"St Clair Clarke" <st_clair@flowja.com> wrote in message
news:hnttfe$g3b$1@build.eclipse.org...
> Hello,
>
> I have this example from the test examples:
>
> <Composite xmlns="http://www.eclipse.org/xwt/presentation"
> xmlns:j="clr-namespace:test.ui"
> xmlns:x="http://www.eclipse.org/xwt">
> <Composite.layout>
> <GridLayout numColumns="1" />
> </Composite.layout>
> <Section name="Section"
> x:style="Section.TITLE_BAR|Section.TWISTIE|Section.EXPANDED "
> text="Section Two">
> <Section.client>
> <Label name="Section.Label" text="test" />
> </Section.client>
> </Section>
> </Composite>
>
> with the following code-behind:
>
> package snippets.e4.forms;
>
> import java.net.URL;
>
> import org.eclipse.e4.xwt.IConstants;
> import org.eclipse.e4.xwt.XWT;
>
> public class Section
> {
> public static void main( String[] args )
> {
> URL url = Section.class.getResource( Section.class.getSimpleName()
> + IConstants.XWT_EXTENSION_SUFFIX );
> try
> {
> XWT.open( url );
> }
> catch( Exception e )
> {
> e.printStackTrace();
> }
> }
> }
>
> Running the code-behind throws this exception:
>
> org.eclipse.e4.xwt.XWTException: Type Section is not found.
> at org.eclipse.e4.xwt.XWTLoader.getMetaclass(XWTLoader.java:899 )
> at org.eclipse.e4.xwt.javabean.ResourceLoader.doCreate(Resource
> Loader.java:419)
> at org.eclipse.e4.xwt.javabean.ResourceLoader.doCreate(Resource
> Loader.java:648)
> at org.eclipse.e4.xwt.javabean.ResourceLoader.doCreate(Resource
> Loader.java:449)
> at org.eclipse.e4.xwt.javabean.ResourceLoader.createCLRElement(
> ResourceLoader.java:353)
> at org.eclipse.e4.xwt.internal.core.Core.createCLRElement(Core. java:606)
> at org.eclipse.e4.xwt.internal.core.Core.load(Core.java:646)
> at org.eclipse.e4.xwt.internal.core.Core.load(Core.java:633)
> at org.eclipse.e4.xwt.XWTLoader.loadWithOptions(XWTLoader.java: 835)
> at org.eclipse.e4.xwt.XWTLoader$1.run(XWTLoader.java:768)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault
> (Realm.java:332)
> at org.eclipse.e4.xwt.XWTLoader.open(XWTLoader.java:762)
> at org.eclipse.e4.xwt.XWTLoader.open(XWTLoader.java:714)
> at org.eclipse.e4.xwt.XWT.open(XWT.java:411)
> at snippets.e4.forms.Section.main(Section.java:17)
>
>
> A similar exception is thown for all my forms.
>
> My dependencies in e4 are:
>
> javax.inject;bundle-version="1.0.0",
> org.eclipse.core.resources;bundle-version="3.6.0",
> org.eclipse.core.runtime;bundle-version="3.6.0",
> org.eclipse.swt;bundle-version="3.6.0",
> org.eclipse.core.databinding;bundle-version="1.3.0",
> org.eclipse.core.databinding.beans;bundle-version="1.2.0",
> org.eclipse.jface;bundle-version="3.6.0",
> org.eclipse.jface.databinding;bundle-version="1.4.0",
> org.eclipse.e4.ui.services;bundle-version="0.9.1",
> org.eclipse.e4.ui.workbench;bundle-version="0.9.1",
> org.eclipse.e4.core.services;bundle-version="0.9.1",
> org.eclipse.e4.ui.workbench.swt;bundle-version="0.9.1",
> org.eclipse.core.databinding.property;bundle-version="1.2.100 ",
> org.eclipse.e4.ui.css.core;bundle-version="0.9.0",
> org.w3c.css.sac;bundle-version="1.3.0",
> org.eclipse.e4.core.commands;bundle-version="0.9.0",
> org.eclipse.e4.ui.bindings;bundle-version="0.9.0",
> org.junit4;bundle-version="4.7.0",
> org.eclipse.e4.xwt;bundle-version="0.9.1",
> com.ibm.icu;bundle-version="4.2.1",
> org.eclipse.e4.xwt.tests;bundle-version="0.9.1",
> org.eclipse.e4.xwt.forms;bundle-version="0.9.1",
> org.eclipse.ui.forms;bundle-version="3.5.0"
>
> I don't know exactly why the xwt and swt form packages are not being
> recognized.
>
> Similarl, the form fails to be displayed in the XWT editor.
>
>
> Any help will be appreciated.
>
> Thanks
|
|
| | | | | |
Re: org.eclipse.e4.xwt.XWTException [message #522084 is a reply to message #522078] |
Fri, 19 March 2010 16:55   |
Eclipse User |
|
|
|
St Clair Clarke wrote on Fri, 19 March 2010 23:28 |
Thanks. And the fault was mine. Just missed that important piece of code.
|
Yes, this was surprise for me too.
St Clair Clarke wrote on Fri, 19 March 2010 23:28 | All the forms are now working, but I noticed something peculiar.
None of the forms are displayed in the designer. The designer just has a text saying Loading...
This is also what the cvs checkout does.
Any idea why the forms are not being rendered in the Designer?
|
As we know now, support for Forms lives in separate plugin which does not contribute anything into main XWT. Instead you should "pull" this support by using special renderer - XWTForms. As I can see, this is not done in org.eclipse.e4.xwt.tools.ui.designer plugin. So, no rendering for Forms.
I've noticed also that org.eclipse.e4.xwt.tools.ui.designer has class org.eclipse.e4.xwt.tools.ui.designer.loader.ResourceVisitor which is almost identical to the org.eclipse.e4.xwt.javabean.ResourceLoader in XWT library itself. So, probably, currently designer is just quick and dirty implementation to prove concept of XML based SWT UI editing and not all features are supported.
|
|
| | | | | | | | | |
Re: org.eclipse.e4.xwt.XWTException [message #572200 is a reply to message #523603] |
Sun, 28 March 2010 10:38  |
Eclipse User |
|
|
|
Hello Yves,
Thanks for the reply. Please reply with a small example of how this registration should be done.
I have tried to to this in the code-behind class of the corresponding XWT forms but then the XWT.register() does not allow it.
Thanks
St Clair
|
|
|
Goto Forum:
Current Time: Tue Jul 22 18:44:18 EDT 2025
Powered by FUDForum. Page generated in 0.06446 seconds
|