Community
Participate
Working Groups
Build Identifier: Eclipse 3.7 20110615-0604 I actually posted this bug first as an WindowBuilder bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=354908), but it seems to be more a XWT bug. The XWT Form Composite wizard copies some libraries into the project, e.g. org.eclipse.e4.xwt_0.9.1.SNAPSHOT.jar (see also the appended workspace screenshot). I appended the hole forms file in the state before adding the composite. When adding a composite element as a child of a tabitem a StackOverflow is caused. This is the code produced in the XML-File: <TabItem text="A"> <TabItem.control> <Composite/> </TabItem.control> </TabItem> !ENTRY org.eclipse.wb.core 4 4 2011-08-17 08:58:05.895 !MESSAGE Designer [1.0.0.r37x201106081531.201108170858]: java.lang.StackOverflowError !STACK 0 java.lang.StackOverflowError at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.initialize(AbstractMetaclass.java:614) at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.assertInitialize(AbstractMetaclass.java:610) at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:360) at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63) at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361) at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63) at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361) at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63) at org.eclipse.e4.xwt.javabean.metadata.AbstractMetaclass.newInstance(AbstractMetaclass.java:361) at org.eclipse.e4.xwt.forms.metaclass.AbstractFormMetaclass.doNewInstance(AbstractFormMetaclass.java:63) Maybe the problem is that the Window Builder wizard uses the SNAPSHOT version of the XWT library. Reproducible: Always Steps to Reproduce: 1. Create new plug-in project 2. Create package in src 3. Create a new XWT file with the XWT Forms Composite wizard 4. Create TabFolder with TabItems 5. Try to add a composite to the TabItem
Created attachment 201705 [details] The form before adding the composite
Created attachment 201706 [details] The project containing the copied XWT libraries
The problem seems to be at the end of the method doNewInstance in org.eclipse.xwt.forms.metaclass.AbstractFormMetaclass where there should be a call to super.doNewInstance instead of super.newInstance. I can't provide a patch right now, but this seems pretty trivial. Similar to this bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=425450
Created attachment 245027 [details] possible solution
Thanks for the report. We'll check it out.
Matteo Di Liberto Gasparin's solution works for me.
Valided and committed.