Not able to Add JButton or JLabel to any container [message #33578] |
Wed, 28 April 2004 16:47  |
Eclipse User |
|
|
|
I am not able to add JBurron or JLabel to any of the swing containers. The
log file contains the following stack. Any idea how get this working?
java.lang.NullPointerException
at
org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter.addCo mponentWithConstraint(ContainerProxyAdapter.java:210)
at
org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter.addCo mponent(ContainerProxyAdapter.java:178)
at
org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter.appli ed(ContainerProxyAdapter.java:53)
at
org.eclipse.ve.internal.java.core.BeanProxyAdapter.notifyCha nged(BeanProxyAdapter.java:120)
at
org.eclipse.emf.common.notify.impl.NotifierImpl.eNotify(Noti fierImpl.java:243)
at
org.eclipse.emf.ecore.util.EcoreEList.dispatchNotification(E coreEList.java:216)
at
org.eclipse.emf.common.notify.impl.NotifyingListImpl.addAllU nique(NotifyingListImpl.java:337)
at org.eclipse.emf.common.util.BasicEList.addAll(BasicEList.jav a:729)
at
org.eclipse.ve.internal.cde.commands.ApplyAttributeSettingCo mmand.execute(ApplyAttributeSettingCommand.java:94)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorCommandStack$1.run(JavaVisualEditorCommandStack.java:49)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$JavaModelChangeController.run(JavaVisualEditorPart. java:1029)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorCommandStack.execute(JavaVisualEditorCommandStack.java:4 6)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(Abs tractTool.java:416)
at
org.eclipse.gef.tools.CreationTool.performCreation(CreationT ool.java:198)
at
org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTo ol.java:122)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1006)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:232)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Released(DomainEventDispatcher.java:346)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(Li ghtweightSystem.java:511)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:132)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2022)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1729)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
|
|
|
|
|
|
|
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #34113 is a reply to message #34080] |
Fri, 30 April 2004 11:07  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
Now the problem is I don't see how this is possible.:-(
Try appending the .log as an attachment and I'll see if there is
anything else of interest because so far I can't figure it out.
Rich Kulp wrote:
> Thanks! It is very possible that this NPE could cause the NPE to occur.
> Now the question is why did this NPE occur?
>
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSetting Delegate(EStructuralFeatureImpl.java:840)
>>
>> at
>> org.eclipse.emf.ecore.impl.EObjectImpl.eSettingDelegate(EObj ectImpl.java:671)
>>
>> at
>> org.eclipse.emf.ecore.impl.EObjectImpl.eDynamicIsSet(EObject Impl.java:485)
>>
>> at
>> org.eclipse.emf.ecore.impl.EObjectImpl.eIsSet(EObjectImpl.ja va:472)
>> at
>
>
>
--
Thanks, Rich Kulp
|
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587529 is a reply to message #33646] |
Thu, 29 April 2004 14:14  |
Eclipse User |
|
|
|
Here is the versions I am running.
org.eclipse.ve (0.5.0) "org.eclipse.ve"
org.eclipse.emf (1.1.1) "org.eclipse.emf"
org.eclipse.gef (2.1.2) "org.eclipse.gef"
org.eclipse.platform (2.1.2) "org.eclipse.platform"
java.runtime.version=1.4.2_04-b05
I have checked the version requirements and this seems to be right.
Vinodh R.
Rich Kulp wrote:
> What version of VE, EMF, GEF, Eclipse, and java do you have?
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587538 is a reply to message #33885] |
Thu, 29 April 2004 14:32  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
I don't know. That shouldn't of happened. Looking at the code I don't
see how the variable could of been null at that point in the code.
Is this consistent?
Does this occur by just subclassing JPanel, and with no further changes,
you can't drop a JButton or a JLabel?
But you can drop other kind of Swing components?
Is the container you trying to drop on more complicated than just an
empty JPanel?
--
Thanks, Rich Kulp
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587545 is a reply to message #33999] |
Thu, 29 April 2004 17:10  |
Eclipse User |
|
|
|
The container is just a plain JPanel.
I initially had a class which subclassed JInternalFrame. But then I tried
this on a plain JPanel after that. Here is a list of components I could
not add.
JButton
JCheckBox
JRadioButton
JToggleButton (If it had stopped here I would have thought that the
problem had something to do with AbstractButton)
JLabel
JTable on JScrollPane
JScrollPane
Everything else seems to work. And If I add a any of this myself and try
to open the class in Visual editor, it fails with a dialog saying there
was a null pointer exception.
I also tried it with JRE 1.3.1 with the same results.
Vinodh R.
Rich Kulp wrote:
> I don't know. That shouldn't of happened. Looking at the code I don't
> see how the variable could of been null at that point in the code.
> Is this consistent?
> Does this occur by just subclassing JPanel, and with no further changes,
> you can't drop a JButton or a JLabel?
> But you can drop other kind of Swing components?
> Is the container you trying to drop on more complicated than just an
> empty JPanel?
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587559 is a reply to message #34008] |
Thu, 29 April 2004 18:29  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
I don't know. There is something unusual about your setup. We've never
ran into something like this. And we can't reproduce it. It just
shouldn't be happening. I know of no way to get into that condition.
--
Thanks, Rich Kulp
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587568 is a reply to message #34022] |
Thu, 29 April 2004 18:28  |
Eclipse User |
|
|
|
I also found this Stack trace. See if this helps. If not I guess I will
wait till I upgrade to 3.0 for trying out VE 1.0
Thanks.
Vinodh R.
java.lang.NullPointerException
at
org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSetting Delegate(EStructuralFeatureImpl.java:840)
at
org.eclipse.emf.ecore.impl.EObjectImpl.eSettingDelegate(EObj ectImpl.java:671)
at
org.eclipse.emf.ecore.impl.EObjectImpl.eDynamicIsSet(EObject Impl.java:485)
at org.eclipse.emf.ecore.impl.EObjectImpl.eIsSet(EObjectImpl.ja va:472)
at
org.eclipse.ve.internal.java.vce.rules.VCEPreSetCommand.hand leValue(VCEPreSetCommand.java:267)
at
org.eclipse.ve.internal.java.vce.rules.VCEPreSetCommand.hand leValue(VCEPreSetCommand.java:292)
at
org.eclipse.ve.internal.java.vce.rules.VCEPreSetCommand.exec ute(VCEPreSetCommand.java:121)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.propertysheet.common.commands.Compou ndCommand.execute(CompoundCommand.java:217)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorCommandStack$1.run(JavaVisualEditorCommandStack.java:49)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorPart$JavaModelChangeController.run(JavaVisualEditorPart. java:1029)
at
org.eclipse.ve.internal.java.codegen.editorpart.JavaVisualEd itorCommandStack.execute(JavaVisualEditorCommandStack.java:4 6)
at
org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(Abs tractTool.java:416)
at
org.eclipse.gef.tools.CreationTool.performCreation(CreationT ool.java:198)
at
org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTo ol.java:122)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java :1006)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:232)
at
org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouse Released(DomainEventDispatcher.java:346)
at
org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(Li ghtweightSystem.java:511)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:132)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :81)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2022)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :1729)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1402)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.java:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
at org.eclipse.core.launcher.Main.run(Main.java:747)
at org.eclipse.core.launcher.Main.main(Main.java:583)
Rich Kulp wrote:
> I don't know. There is something unusual about your setup. We've never
> ran into something like this. And we can't reproduce it. It just
> shouldn't be happening. I know of no way to get into that condition.
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587575 is a reply to message #34047] |
Thu, 29 April 2004 18:41  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
Thanks! It is very possible that this NPE could cause the NPE to occur.
Now the question is why did this NPE occur?
>
> java.lang.NullPointerException
> at
> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSetting Delegate(EStructuralFeatureImpl.java:840)
> at
> org.eclipse.emf.ecore.impl.EObjectImpl.eSettingDelegate(EObj ectImpl.java:671)
> at
> org.eclipse.emf.ecore.impl.EObjectImpl.eDynamicIsSet(EObject Impl.java:485)
> at org.eclipse.emf.ecore.impl.EObjectImpl.eIsSet(EObjectImpl.ja va:472)
> at
--
Thanks, Rich Kulp
|
|
|
Re: Not able to Add JButton or JLabel to any container [message #587587 is a reply to message #34080] |
Fri, 30 April 2004 11:07  |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
Now the problem is I don't see how this is possible.:-(
Try appending the .log as an attachment and I'll see if there is
anything else of interest because so far I can't figure it out.
Rich Kulp wrote:
> Thanks! It is very possible that this NPE could cause the NPE to occur.
> Now the question is why did this NPE occur?
>
>>
>> java.lang.NullPointerException
>> at
>> org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSetting Delegate(EStructuralFeatureImpl.java:840)
>>
>> at
>> org.eclipse.emf.ecore.impl.EObjectImpl.eSettingDelegate(EObj ectImpl.java:671)
>>
>> at
>> org.eclipse.emf.ecore.impl.EObjectImpl.eDynamicIsSet(EObject Impl.java:485)
>>
>> at
>> org.eclipse.emf.ecore.impl.EObjectImpl.eIsSet(EObjectImpl.ja va:472)
>> at
>
>
>
--
Thanks, Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.05481 seconds