[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: Does anyone here use the Visual Editor?

I had the same problem... I got a little further along by attempting to open 
up one of the SWT example java sources and then I saw the SWT Controls, 
Menus, etc. in the Palette... however, the GUI doesn't work for SWT.... i.e. 
the objects don't show up in the Visual Editor window...

I checked out the error log and found a couple of exceptions...

1) 
org.eclipse.ve.internal.java.core.IAllocationProcesser$AllocationException: 
java.lang.IllegalArgumentException: IWAV0177E Expression 
"layout.marginHeight=3" is too complicated. -     layout.marginHeight=3
    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)
    etc...

and

2) java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:514)
at 
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectForURIFragmentRootSegment(ResourceImpl.java:642)
at 
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:692)
at 
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject(ResourceImpl.java:671)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setValueFromId(XMLHandler.java:2522)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2450)
at 
org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAttribs(SAXXMIHandler.java:74)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFactory(XMLHandler.java:1940)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:1844)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1779)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1587)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:881)
at 
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:82)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:860)
at 
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown 
Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown 
Source)
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown 
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:179)
at 
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:179)
at 
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1094)
at 
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:900)
at 
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:249)
at 
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.demandLoad(ProjectResourceSetImpl.java:83)
at 
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:264)
at 
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:390)
at 
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.getResource(ProjectResourceSetImpl.java:262)
etc...

It was suggested that I can get rid of the second exception by a VE 
developer named Rich Kulp:
--At 11:34 AM 10/11/2006, you wrote:

  The only suggestion I can think of is to go into debug mode, and stop on 
ArrayIndexOutOfBounds. Then go back in the stack to the:

  at 
org.eclipse.ve.internal.java.codegen.util.VEModelCacheUtility.doLoadFromCache(VEModelCacheUtility.java:103)

  method and see what file it was trying to load. Then send us a copy of 
that file.

  Rich
  Did you do this

No.


  and was this issue resolved? If so, how please?

Yes.  Clear the cache by manually removing the plugin's directory in 
.metadata/.plugins directory.  Do it in both the standard workspace and in 
the runtime workspace (if you are developing a plugin).  Then restart 
with -clean.