VE showing components inherited from JPanel? [message #144610] |
Mon, 21 April 2008 17:25 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arkles.sedsystems.ca
Hi,
I'll try to list all of the relevant information here. Please let me
know if I've missed anything. I'm not sure if I can actually post the
code, although, if necessary, I could probably recreate a sanitized
version of it.
I have a component that inherits from JPanel, that I'm trying to add a
JButton to using VE. This panel uses a GridBagLayout, and contains 3
components that also inherit from JPanel.
The original design of the top panel was done using VE (I'm 99% sure),
but now the panel shows up in the VE blank (doesn't show a grid at all).
Is there anything special that needs to be done to have the child panels
draw properly in VE? If I run the Java code, it all looks perfect (the
way I remember it showing up in VE before).
I've been trying a few things to try to get it to render (based on other
posts I've found). One important question from that: is there a
particular order that things need to be in? Right now the initialize()
function is ordered:
this.setSize
this.setLayout
<create gridbagconstraints>
this.add(getComponent1, gridbagconstraint1)
this.add(getComponent2, gridbagconstraint2)
this.add(getComponent3, gridbagconstraint3)
And I may have mucked with that ordering in my futile attempt to get
this to render :)
Here's the versions I'm using:
Eclipse SDK
Version: 3.2.0
Build id: M20060629-1905
EMF: 3.0.0v20060918_M
GEF: 3.2.0.v20060626
Visual Editor: 1.2.0.v20060518_RC1
Visual Editor Common Data Editor: 1.2.0.v20060918_M
Visual Editor for Java user Guide: 1.2.0.v20060824_M
Visual Editor for Java Core: 1.2.1.v20060918_M
Visual Editor for Java Foundation Classes: 1.2.1.v20060918_M
Visual Editor PropertySheet: 1.2.0.v20060824_M
Visual Editor for Standard Widget Toolkit: 1.2.1.v20060918_M
There's an exception in the .log file that I think might be relevant:
!ENTRY org.eclipse.ve.java.core 4 0 2008-04-21 11:10:28.231
!MESSAGE Exception thrown.
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: -1
at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 14)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectF orURIFragmentRootSegment(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(XML Handler.java:2511)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2439)
at
org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:74)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:1929)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTy peName(XMLHandler.java:1833)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHa ndler.java:1768)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1576)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:876)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:82)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:854)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:626)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:533)
at
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(AbstractXMLDocumentParser.java:220)
at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:322)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFra gmentScannerImpl.java:1693)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 368)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:834)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:764)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.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:179)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1089)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:895)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:390)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
at
org.eclipse.ve.internal.java.codegen.util.VEModelCacheUtilit y.doLoadFromCache(VEModelCacheUtility.java:103)
at
org.eclipse.ve.internal.java.codegen.core.VEModelInstance.cr eateComposition(VEModelInstance.java:100)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.reConnect(JavaSourceTranslator.java:1134)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.decodeDocument(JavaSourceTranslator.java:910)
at
org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.loadModel(JavaSourceTranslator.java:597)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup.run(JavaVisualEditorPart.java:1978)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Thanks for the help.
Cheers,
Tony
--
Any views or opinions presented in this email are solely those of the
author.
|
|
|
Re: VE showing components inherited from JPanel? [message #144619 is a reply to message #144610] |
Mon, 21 April 2008 22:56 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arkles.sedsystems.ca
This sounds a lot like Bugzilla entry #162669
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=162669), but there is no
workaround posted. Mine differs a bit though, in that it is only one
particular window that is doing it.
Tony Arkles wrote:
> Hi,
>
> I'll try to list all of the relevant information here. Please let me
> know if I've missed anything. I'm not sure if I can actually post the
> code, although, if necessary, I could probably recreate a sanitized
> version of it.
>
> I have a component that inherits from JPanel, that I'm trying to add a
> JButton to using VE. This panel uses a GridBagLayout, and contains 3
> components that also inherit from JPanel.
>
> The original design of the top panel was done using VE (I'm 99% sure),
> but now the panel shows up in the VE blank (doesn't show a grid at all).
>
> Is there anything special that needs to be done to have the child panels
> draw properly in VE? If I run the Java code, it all looks perfect (the
> way I remember it showing up in VE before).
>
> I've been trying a few things to try to get it to render (based on other
> posts I've found). One important question from that: is there a
> particular order that things need to be in? Right now the initialize()
> function is ordered:
>
> this.setSize
> this.setLayout
> <create gridbagconstraints>
> this.add(getComponent1, gridbagconstraint1)
> this.add(getComponent2, gridbagconstraint2)
> this.add(getComponent3, gridbagconstraint3)
>
> And I may have mucked with that ordering in my futile attempt to get
> this to render :)
>
> Here's the versions I'm using:
>
> Eclipse SDK
> Version: 3.2.0
> Build id: M20060629-1905
>
> EMF: 3.0.0v20060918_M
>
> GEF: 3.2.0.v20060626
>
> Visual Editor: 1.2.0.v20060518_RC1
> Visual Editor Common Data Editor: 1.2.0.v20060918_M
> Visual Editor for Java user Guide: 1.2.0.v20060824_M
> Visual Editor for Java Core: 1.2.1.v20060918_M
> Visual Editor for Java Foundation Classes: 1.2.1.v20060918_M
> Visual Editor PropertySheet: 1.2.0.v20060824_M
> Visual Editor for Standard Widget Toolkit: 1.2.1.v20060918_M
>
>
> There's an exception in the .log file that I think might be relevant:
>
> !ENTRY org.eclipse.ve.java.core 4 0 2008-04-21 11:10:28.231
> !MESSAGE Exception thrown.
> !STACK 0
> java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 14)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectF orURIFragmentRootSegment(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(XML Handler.java:2511)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2439)
>
> at
> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:74)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:1929)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTy peName(XMLHandler.java:1833)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHa ndler.java:1768)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1576)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:876)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:82)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:854)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:626)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:533)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(AbstractXMLDocumentParser.java:220)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:322)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFra gmentScannerImpl.java:1693)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 368)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:834)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:764)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.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:179)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1089)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:895)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:390)
>
> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
>
> at
> org.eclipse.ve.internal.java.codegen.util.VEModelCacheUtilit y.doLoadFromCache(VEModelCacheUtility.java:103)
>
> at
> org.eclipse.ve.internal.java.codegen.core.VEModelInstance.cr eateComposition(VEModelInstance.java:100)
>
> at
> org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.reConnect(JavaSourceTranslator.java:1134)
>
> at
> org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.decodeDocument(JavaSourceTranslator.java:910)
>
> at
> org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.loadModel(JavaSourceTranslator.java:597)
>
> at
> org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup.run(JavaVisualEditorPart.java:1978)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
>
>
> Thanks for the help.
>
> Cheers,
> Tony
>
>
--
Any views or opinions presented in this email are solely those of the
author.
|
|
|
Re: VE showing components inherited from JPanel? [message #617081 is a reply to message #144610] |
Mon, 21 April 2008 22:56 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: arkles.sedsystems.ca
This sounds a lot like Bugzilla entry #162669
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=162669), but there is no
workaround posted. Mine differs a bit though, in that it is only one
particular window that is doing it.
Tony Arkles wrote:
> Hi,
>
> I'll try to list all of the relevant information here. Please let me
> know if I've missed anything. I'm not sure if I can actually post the
> code, although, if necessary, I could probably recreate a sanitized
> version of it.
>
> I have a component that inherits from JPanel, that I'm trying to add a
> JButton to using VE. This panel uses a GridBagLayout, and contains 3
> components that also inherit from JPanel.
>
> The original design of the top panel was done using VE (I'm 99% sure),
> but now the panel shows up in the VE blank (doesn't show a grid at all).
>
> Is there anything special that needs to be done to have the child panels
> draw properly in VE? If I run the Java code, it all looks perfect (the
> way I remember it showing up in VE before).
>
> I've been trying a few things to try to get it to render (based on other
> posts I've found). One important question from that: is there a
> particular order that things need to be in? Right now the initialize()
> function is ordered:
>
> this.setSize
> this.setLayout
> <create gridbagconstraints>
> this.add(getComponent1, gridbagconstraint1)
> this.add(getComponent2, gridbagconstraint2)
> this.add(getComponent3, gridbagconstraint3)
>
> And I may have mucked with that ordering in my futile attempt to get
> this to render :)
>
> Here's the versions I'm using:
>
> Eclipse SDK
> Version: 3.2.0
> Build id: M20060629-1905
>
> EMF: 3.0.0v20060918_M
>
> GEF: 3.2.0.v20060626
>
> Visual Editor: 1.2.0.v20060518_RC1
> Visual Editor Common Data Editor: 1.2.0.v20060918_M
> Visual Editor for Java user Guide: 1.2.0.v20060824_M
> Visual Editor for Java Core: 1.2.1.v20060918_M
> Visual Editor for Java Foundation Classes: 1.2.1.v20060918_M
> Visual Editor PropertySheet: 1.2.0.v20060824_M
> Visual Editor for Standard Widget Toolkit: 1.2.1.v20060918_M
>
>
> There's an exception in the .log file that I think might be relevant:
>
> !ENTRY org.eclipse.ve.java.core 4 0 2008-04-21 11:10:28.231
> !MESSAGE Exception thrown.
> !STACK 0
> java.lang.ArrayIndexOutOfBoundsException: -1
> at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:5 14)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObjectF orURIFragmentRootSegment(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(XML Handler.java:2511)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XML Handler.java:2439)
>
> at
> org.eclipse.emf.ecore.xmi.impl.SAXXMIHandler.handleObjectAtt ribs(SAXXMIHandler.java:74)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromFa ctory(XMLHandler.java:1929)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTy peName(XMLHandler.java:1833)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHa ndler.java:1768)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLH andler.java:1576)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:876)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:82)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:854)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:626)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:533)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocume ntParser.emptyElement(AbstractXMLDocumentParser.java:220)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScanner Impl.scanStartElement(XMLNSDocumentScannerImpl.java:322)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFra gmentScannerImpl.java:1693)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 368)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:834)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:764)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.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:179)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:179)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1089)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:895)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:249)
>
> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:264)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:390)
>
> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
>
> at
> org.eclipse.ve.internal.java.codegen.util.VEModelCacheUtilit y.doLoadFromCache(VEModelCacheUtility.java:103)
>
> at
> org.eclipse.ve.internal.java.codegen.core.VEModelInstance.cr eateComposition(VEModelInstance.java:100)
>
> at
> org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.reConnect(JavaSourceTranslator.java:1134)
>
> at
> org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.decodeDocument(JavaSourceTranslator.java:910)
>
> at
> org.eclipse.ve.internal.java.codegen.core.JavaSourceTranslat or.loadModel(JavaSourceTranslator.java:597)
>
> at
> org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$Setup.run(JavaVisualEditorPart.java:1978)
>
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
>
>
> Thanks for the help.
>
> Cheers,
> Tony
>
>
--
Any views or opinions presented in this email are solely those of the
author.
|
|
|
Powered by
FUDForum. Page generated in 0.06882 seconds