Community
Participate
Working Groups
Working with the FormEditor, and adding objects from the Forms ToolKit Items, give very often refresh errors and in the worst cases the objects in the editor become uneditable. The Java beans view page that usually shows the structure, becomes truncated at a high level (in the hierarchy) composite, no object is visible under it (I presume therefore no element becomes editable). I tried: restarting the file, restarting eclipse and recreating the workspace but does not seem to solve anything. The only workaround that worked (which actually is not), was redo everything from scratch. (quite bad I think). I'm using the latest Eclipse RCP distribution with the latest VE 1.4 The exception appears constantly in the error log: java.lang.ClassCastException: org.eclipse.ve.internal.jcm.impl.BeanSubclassCompositionImpl at org.eclipse.ve.internal.swt.WidgetContainmentHandler.contributeToRemoveRequest(WidgetContainmentHandler.java:45) at org.eclipse.ve.internal.cde.emf.AbstractEMFContainerPolicy.getTrueChild(AbstractEMFContainerPolicy.java:269) at org.eclipse.ve.internal.java.core.BaseJavaContainerPolicy.getTrueChild(BaseJavaContainerPolicy.java:117) at org.eclipse.ve.internal.java.vce.SubclassCompositionContainerPolicy.getTrueChild(SubclassCompositionContainerPolicy.java:44) at org.eclipse.ve.internal.cde.emf.AbstractEMFContainerPolicy.getTrueChildren(AbstractEMFContainerPolicy.java:307) at org.eclipse.ve.internal.cde.emf.AbstractEMFContainerPolicy.getOrphanTheChildrenCommand(AbstractEMFContainerPolicy.java:702) at org.eclipse.ve.internal.cde.core.ContainerPolicy.getOrphanChildrenCommand(ContainerPolicy.java:315) at org.eclipse.ve.internal.cde.core.ContainerPolicy.getCommand(ContainerPolicy.java:401) at org.eclipse.ve.internal.cde.core.VisualInfoXYLayoutEditPolicy.getOrphanChildrenCommand(VisualInfoXYLayoutEditPolicy.java:157) at org.eclipse.gef.editpolicies.LayoutEditPolicy.getCommand(LayoutEditPolicy.java:190) at org.eclipse.gef.editpolicies.ConstrainedLayoutEditPolicy.getCommand(ConstrainedLayoutEditPolicy.java:154) at org.eclipse.ve.internal.cde.core.XYLayoutEditPolicy.getCommand(XYLayoutEditPolicy.java:255) at org.eclipse.ve.internal.cde.core.VisualInfoXYLayoutEditPolicy.getCommand(VisualInfoXYLayoutEditPolicy.java:209) at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:473) at org.eclipse.gef.editpolicies.ComponentEditPolicy.getOrphanCommand(ComponentEditPolicy.java:79) at org.eclipse.gef.editpolicies.ComponentEditPolicy.getCommand(ComponentEditPolicy.java:54) at org.eclipse.gef.editparts.AbstractEditPart.getCommand(AbstractEditPart.java:473) at org.eclipse.gef.tools.DragEditPartsTracker.getCommand(DragEditPartsTracker.java:256) at org.eclipse.gef.tools.DragEditPartsTracker.handleDragInProgress(DragEditPartsTracker.java:351) at org.eclipse.gef.tools.AbstractTool.mouseDrag(AbstractTool.java:994) at org.eclipse.gef.tools.SelectionTool.mouseDrag(SelectionTool.java:511) at org.eclipse.ve.internal.cde.core.CDESelectionTool.mouseDrag(CDESelectionTool.java:52) at org.eclipse.gef.EditDomain.mouseDrag(EditDomain.java:230) at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseMoved(DomainEventDispatcher.java:357) at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseMove(LightweightSystem.java:533) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:199) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
here is another exception, which I assume is directly responsible for making the editor unusable. org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Layout' is not found or is abstract. (file:/C:/calypso_tools/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/com.lhsystems.evalpoc.rcp/org.eclipse.ve.java.core/.cache/emfmodel/src/com/lhsystems/evalpoc/rcp/zone/ZoneEditor.xmi, 2, 52108) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274) at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.getResource(ProjectResourceSetImpl.java:631) at org.eclipse.ve.internal.java.codegen.util.VEModelCacheUtility.doLoadFromCache(VEModelCacheUtility.java:103) at org.eclipse.ve.internal.java.codegen.core.VEModelInstance.createComposition(VEModelInstance.java:100) at org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslator.reConnect(JavaSourceTranslator.java:1134) at org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslator.decodeDocument(JavaSourceTranslator.java:910) at org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslator.loadModel(JavaSourceTranslator.java:597) at org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEditorPart$Setup.run(JavaVisualEditorPart.java:1978) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'Layout' is not found or is abstract. (file:/C:/calypso_tools/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/com.lhsystems.evalpoc.rcp/org.eclipse.ve.java.core/.cache/emfmodel/src/com/lhsystems/evalpoc/rcp/zone/ZoneEditor.xmi, 2, 52108) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2243) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.validateCreateObjectFromFactory(XMLHandler.java:2367) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:2098) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:2030) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.createObject(XMIHandler.java:134) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1839) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1023) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:87) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:169) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181) at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1282) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255) at org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.demandLoad(ProjectResourceSetImpl.java:358) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270) ... 8 more
The track trace said there is a problem of class loader for Layout. In SWT, Layout is abstract. Why you use an abstract class?
Created attachment 156631 [details] xmi metamodel that the VE generated I have attached the xmi metamodel file that Visual Editor generated from the Form java file.
(In reply to comment #2) > The track trace said there is a problem of class loader for Layout. In SWT, > Layout is abstract. Why you use an abstract class? Hi, I did not do any manual coding, I just simply used drag and drop for the components, and made visually the option to grab the space horizontally for the forms. The editor itself choose the layout type as far I can see. Cheers, Igor
Created attachment 156636 [details] example of file that was created and modified only visually, and at the end is not editable anylonger.
Detected a new exception (number 3) in the error log org.eclipse.ve.internal.java.core.IAllocationProcesser$AllocationException: java.lang.IllegalArgumentException: IWAV0177E Expression "span" is too complicated. - span at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:164) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:362) at org.eclipse.ve.internal.java.core.PrimitiveProxyAdapter.instantiateBeanProxy(PrimitiveProxyAdapter.java:287) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateSettingBean(BeanProxyAdapter.java:1011) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateSettingBean(BeanProxyAdapter.java:973) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applySetting(BeanProxyAdapter.java:771) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applied(BeanProxyAdapter.java:700) at org.eclipse.ve.internal.java.core.BeanProxyAdapter$5.isSet(BeanProxyAdapter.java:495) at org.eclipse.jem.internal.instantiation.base.JavaInstance.visitSetFeatures(JavaInstance.java:70) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applyAllSettings(BeanProxyAdapter.java:485) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateAndInitialize(BeanProxyAdapter.java:463) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateBeanProxy(BeanProxyAdapter.java:328) at org.eclipse.ve.internal.java.core.MemberContainerProxyAdapter.initSetting(MemberContainerProxyAdapter.java:546) at org.eclipse.ve.internal.java.core.MemberContainerProxyAdapter.memberInitBeanProxy(MemberContainerProxyAdapter.java:621) at org.eclipse.ve.internal.java.core.MemberContainerProxyAdapter.memberInitBeanProxy(MemberContainerProxyAdapter.java:642) at org.eclipse.ve.internal.java.core.MemberContainerProxyAdapter.initBeanProxy(MemberContainerProxyAdapter.java:570) at org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEditorPart$Setup.run(JavaVisualEditorPart.java:2089) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.lang.IllegalArgumentException: IWAV0177E Expression "span" is too complicated. - span at org.eclipse.jem.internal.instantiation.base.ParseTreeAllocationInstantiationVisitor.visit(ParseTreeAllocationInstantiationVisitor.java:398) at org.eclipse.jem.internal.instantiation.impl.PTInvalidExpressionImpl.accept0(PTInvalidExpressionImpl.java:162) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.childAccept0(PTExpressionImpl.java:126) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.accept(PTExpressionImpl.java:60) at org.eclipse.jem.internal.instantiation.base.ParseTreeAllocationInstantiationVisitor.getProxy(ParseTreeAllocationInstantiationVisitor.java:208) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:160) ... 17 more
detected a another new exception (number 4) in the error log org.eclipse.ve.internal.java.core.IAllocationProcesser$AllocationException: java.lang.IllegalArgumentException: IWAV0177E Expression "glayout.marginHeight=0" is too complicated. - glayout.marginHeight=0 at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:164) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:362) at org.eclipse.ve.internal.java.core.PrimitiveProxyAdapter.instantiateBeanProxy(PrimitiveProxyAdapter.java:287) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateSettingBean(BeanProxyAdapter.java:1011) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateSettingBean(BeanProxyAdapter.java:973) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applySetting(BeanProxyAdapter.java:771) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applied(BeanProxyAdapter.java:700) at org.eclipse.ve.internal.java.core.BeanProxyAdapter$5.isSet(BeanProxyAdapter.java:495) at org.eclipse.jem.internal.instantiation.base.JavaInstance.visitSetFeatures(JavaInstance.java:70) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applyAllSettings(BeanProxyAdapter.java:485) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateAndInitialize(BeanProxyAdapter.java:463) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateBeanProxy(BeanProxyAdapter.java:328) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateSettingBean(BeanProxyAdapter.java:1011) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateSettingBean(BeanProxyAdapter.java:973) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applySetting(BeanProxyAdapter.java:771) at org.eclipse.ve.internal.swt.WidgetProxyAdapter.applySetting(WidgetProxyAdapter.java:112) at org.eclipse.ve.internal.swt.ControlProxyAdapter.applySetting(ControlProxyAdapter.java:353) at org.eclipse.ve.internal.swt.CompositeProxyAdapter.applySetting(CompositeProxyAdapter.java:75) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applied(BeanProxyAdapter.java:700) at org.eclipse.ve.internal.swt.UIThreadOnlyProxyAdapter.primApplied(UIThreadOnlyProxyAdapter.java:200) at org.eclipse.ve.internal.swt.CompositeProxyAdapter.primApplied(CompositeProxyAdapter.java:66) at org.eclipse.ve.internal.swt.UIThreadOnlyProxyAdapter.applied(UIThreadOnlyProxyAdapter.java:174) at org.eclipse.ve.internal.java.core.BeanProxyAdapter$5.isSet(BeanProxyAdapter.java:495) at org.eclipse.jem.internal.instantiation.base.JavaInstance.visitSetFeatures(JavaInstance.java:70) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.applyAllSettings(BeanProxyAdapter.java:485) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateAndInitialize(BeanProxyAdapter.java:463) at org.eclipse.ve.internal.swt.UIThreadOnlyProxyAdapter.primInstantiateAndInitialize(UIThreadOnlyProxyAdapter.java:163) at org.eclipse.ve.internal.swt.UIThreadOnlyProxyAdapter.instantiateAndInitialize(UIThreadOnlyProxyAdapter.java:126) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateBeanProxy(BeanProxyAdapter.java:328) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser$ParseAllocation.visit(BasicAllocationProcesser.java:78) at org.eclipse.jem.internal.instantiation.impl.PTInstanceReferenceImpl.accept0(PTInstanceReferenceImpl.java:165) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.childAccept0(PTExpressionImpl.java:126) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.accept(PTExpressionImpl.java:60) at org.eclipse.jem.internal.instantiation.base.ParseTreeAllocationInstantiationVisitor.visit(ParseTreeAllocationInstantiationVisitor.java:414) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser$ParseAllocation.visit(BasicAllocationProcesser.java:109) at org.eclipse.jem.internal.instantiation.impl.PTMethodInvocationImpl.accept0(PTMethodInvocationImpl.java:290) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.childAccept0(PTExpressionImpl.java:126) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.accept(PTExpressionImpl.java:60) at org.eclipse.jem.internal.instantiation.base.ParseTreeAllocationInstantiationVisitor.getProxy(ParseTreeAllocationInstantiationVisitor.java:208) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:160) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:362) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.primInstantiateDroppedPart(BeanProxyAdapter.java:1264) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.primInstantiateBeanProxy(BeanProxyAdapter.java:1243) at org.eclipse.ve.internal.swt.WidgetProxyAdapter.primInstantiateBeanProxy(WidgetProxyAdapter.java:165) at org.eclipse.ve.internal.swt.ControlProxyAdapter.primInstantiateBeanProxy(ControlProxyAdapter.java:148) at org.eclipse.ve.internal.java.core.BeanProxyAdapter.instantiateAndInitialize(BeanProxyAdapter.java:387) at org.eclipse.ve.internal.swt.UIThreadOnlyProxyAdapter.primInstantiateAndInitialize(UIThreadOnlyProxyAdapter.java:163) at org.eclipse.ve.internal.swt.UIThreadOnlyProxyAdapter$2.doRun(UIThreadOnlyProxyAdapter.java:133) at org.eclipse.jem.internal.proxy.swt.DisplayManager$ExpressionDisplayRunnable.run(DisplayManager.java:221) at org.eclipse.jem.internal.proxy.swt.DisplayManager$DisplayRunnable.calledBack(DisplayManager.java:141) at org.eclipse.jem.internal.proxy.remote.REMCallbackThread.run(REMCallbackThread.java:187) Caused by: java.lang.IllegalArgumentException: IWAV0177E Expression "glayout.marginHeight=0" is too complicated. - glayout.marginHeight=0 at org.eclipse.jem.internal.instantiation.base.ParseTreeAllocationInstantiationVisitor.visit(ParseTreeAllocationInstantiationVisitor.java:398) at org.eclipse.jem.internal.instantiation.impl.PTInvalidExpressionImpl.accept0(PTInvalidExpressionImpl.java:162) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.childAccept0(PTExpressionImpl.java:126) at org.eclipse.jem.internal.instantiation.impl.PTExpressionImpl.accept(PTExpressionImpl.java:60) at org.eclipse.jem.internal.instantiation.base.ParseTreeAllocationInstantiationVisitor.getProxy(ParseTreeAllocationInstantiationVisitor.java:208) at org.eclipse.ve.internal.java.core.BasicAllocationProcesser.allocate(BasicAllocationProcesser.java:160) ... 50 more
A simple way to trigger the failure of the editor to the inconsistent state is, before saving several drag and drop operations, do an "undo".