Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » NullPointerException on subnode - default icon replaced by red square
NullPointerException on subnode - default icon replaced by red square [message #1490532] Fri, 28 November 2014 08:14 Go to next message
Steven Kauffmann is currently offline Steven KauffmannFriend
Messages: 19
Registered: November 2014
Junior Member
Hi all,

When representing a subnode within a container the node itself shows up on the diagram but I do get a nullpointer exception (see below). For other subnodes I do not get this error. What's also strange is that the default icon is not shown for this subnode but that it's replaced by a red square.
index.php/fa/20063/0/
I didn't specify a custom icon (so I don't know where the req square comes from). When hiding the icon, in the node properties, the nullpointer exception is still there.

Any idea what can be wrong?

Quote:

java.lang.NullPointerException
at org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin$Implementation.getImage(DiagramUIPlugin.java:529)
at org.eclipse.sirius.diagram.ui.internal.sheet.SiriusSheetLabelProvider.getImage(SiriusSheetLabelProvider.java:78)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.refreshTitleBar(TabbedPropertySheetPage.java:850)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:754)
at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:556)
at org.eclipse.gmf.runtime.diagram.ui.properties.views.PropertiesBrowserPage.selectionChanged(PropertiesBrowserPage.java:253)
at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:365)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:218)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.handlePostSelectionChanged(SelectionService.java:122)
at org.eclipse.ui.internal.e4.compatibility.SelectionService.access$1(SelectionService.java:112)
at org.eclipse.ui.internal.e4.compatibility.SelectionService$3.selectionChanged(SelectionService.java:80)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$4.run(SelectionAggregator.java:166)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyPostListeners(SelectionAggregator.java:163)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$8(SelectionAggregator.java:160)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$8$1.run(SelectionAggregator.java:272)
at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:56)
at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$8.changed(SelectionAggregator.java:269)
at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:110)
at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:338)
at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:352)
at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setPostSelection(SelectionServiceImpl.java:36)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$3.selectionChanged(CompatibilityPart.java:127)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:256)
at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:234)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
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.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)


Best regards,
Steven
  • Attachment: example.png
    (Size: 6.31KB, Downloaded 509 times)
Re: NullPointerException on subnode - default icon replaced by red square [message #1490995 is a reply to message #1490532] Fri, 28 November 2014 16:20 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 270
Registered: August 2010
Senior Member
On 11/28/2014 03:23 PM, Steven Kauffmann wrote:
> Hi all,

Hi Steve,

>
> When representing a subnode within a container the node itself shows up on the diagram but I do get a nullpointer exception (see below). For other subnodes I do not get this error. What's also strange is that the default icon is not shown for this subnode but that it's replaced by a red square.
>
> I didn't specify a custom icon (so I don't know where the req square comes from). When hiding the icon, in the node properties, the nullpointer exception is still there.
>
> Any idea what can be wrong?

That might be cause by a missing image in your generated meta-model
images. Could you create a bug report on the Sirius bugzilla[1] ?

[1] https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Sirius

Regards,

Florian

>
> Quote:
>> java.lang.NullPointerException
>> at org.eclipse.sirius.diagram.ui.provider.DiagramUIPlugin$Implementation.getImage(DiagramUIPlugin.java:529)
>> at org.eclipse.sirius.diagram.ui.internal.sheet.SiriusSheetLabelProvider.getImage(SiriusSheetLabelProvider.java:78)
>> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.refreshTitleBar(TabbedPropertySheetPage.java:850)
>> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.setInput(TabbedPropertySheetPage.java:754)
>> at org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage.selectionChanged(TabbedPropertySheetPage.java:556)
>> at org.eclipse.gmf.runtime.diagram.ui.properties.views.PropertiesBrowserPage.selectionChanged(PropertiesBrowserPage.java:253)
>> at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:365)
>> at org.eclipse.ui.internal.e4.compatibility.SelectionService.notifyListeners(SelectionService.java:218)
>> at org.eclipse.ui.internal.e4.compatibility.SelectionService.handlePostSelectionChanged(SelectionService.java:122)
>> at org.eclipse.ui.internal.e4.compatibility.SelectionService.access$1(SelectionService.java:112)
>> at org.eclipse.ui.internal.e4.compatibility.SelectionService$3.selectionChanged(SelectionService.java:80)
>> at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$4.run(SelectionAggregator.java:166)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>> at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.notifyPostListeners(SelectionAggregator.java:163)
>> at org.eclipse.e4.ui.internal.workbench.SelectionAggregator.access$8(SelectionAggregator.java:160)
>> at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$8$1.run(SelectionAggregator.java:272)
>> at org.eclipse.e4.core.contexts.RunAndTrack.runExternalCode(RunAndTrack.java:56)
>> at org.eclipse.e4.ui.internal.workbench.SelectionAggregator$8.changed(SelectionAggregator.java:269)
>> at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:110)
>> at org.eclipse.e4.core.internal.contexts.EclipseContext.processScheduled(EclipseContext.java:338)
>> at org.eclipse.e4.core.internal.contexts.EclipseContext.set(EclipseContext.java:352)
>> at org.eclipse.e4.ui.internal.workbench.SelectionServiceImpl.setPostSelection(SelectionServiceImpl.java:36)
>> at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart$3.selectionChanged(CompatibilityPart.java:127)
>> at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer.flushSelectionEvents(DiagramGraphicalViewer.java:256)
>> at org.eclipse.gmf.runtime.diagram.ui.parts.DiagramGraphicalViewer$1.run(DiagramGraphicalViewer.java:234)
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>> at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
>> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
>> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
>> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>> at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
>> at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
>> at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
>> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
>> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
>> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
>> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
>> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
>> 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.equinox.launcher.Main.invokeFramework(Main.java:648)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
>> at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
>
>
> Best regards,
> Steven
>


--
Florian - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: NullPointerException on subnode - default icon replaced by red square [message #1494131 is a reply to message #1490995] Mon, 01 December 2014 07:54 Go to previous message
Steven Kauffmann is currently offline Steven KauffmannFriend
Messages: 19
Registered: November 2014
Junior Member
Hi Florian,

After some debugging I discovered the cause of the problem.
In the metamodel the class was previously defined as an abstract class. Because of changes in the metamodel the abstract class was changed into a normal class. When removing the class and replace it by a new class (same name, same attributes, ...) and regenerating the code (after removing the old code) it works without nullpointer exception.

I do have some problems with my ecore editor (nightly build version because of sirius 2.0) so I don't know if this problem is related with nightly build ecore editor or it's still because of the code generator.
I will first try to upgrade my ecore editor to see if the problem is still there. If so I will create a bug report.

Regards,
Steven
Previous Topic:How to synchronize layouts between 2 representations?
Next Topic:How to apply layout when creating new presentation
Goto Forum:
  


Current Time: Fri Apr 19 23:32:07 GMT 2024

Powered by FUDForum. Page generated in 0.03254 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top