Community
Participate
Working Groups
Generate code from textual model then the following NPE thrown when trying to sync user code from generate source. java.lang.NullPointerException at org.eclipse.papyrusrt.xtumlrt.xtext.codegen.ui.cdt.UmlrtXtextEObjectLocator.getTransition(UmlrtXtextEObjectLocator.java:301) at org.eclipse.papyrusrt.xtumlrt.xtext.codegen.ui.cdt.UmlrtXtextEObjectLocator.getUserCodeElement(UmlrtXtextEObjectLocator.java:189) at org.eclipse.papyrusrt.xtumlrt.xtext.codegen.ui.cdt.UmlrtXtextEObjectLocator.getEObject(UmlrtXtextEObjectLocator.java:127) at org.eclipse.papyrusrt.xtumlrt.xtext.codegen.ui.cdt.UmlrtXtextEObjectLocator.saveSource(UmlrtXtextEObjectLocator.java:372) at org.eclipse.papyrusrt.codegen.EObjectLocator.saveSource(EObjectLocator.java:96) at org.eclipse.papyrusrt.codegen.UserEditableRegion.commit(UserEditableRegion.java:235) at org.eclipse.papyrusrt.codegen.build.GeneratedSrcBuilder.commit(GeneratedSrcBuilder.java:466)
(In reply to Young-Soo Roh from comment #0) > Generate code from textual model then the following NPE thrown when trying > to sync user code from generate source. > > > java.lang.NullPointerException > at > org.eclipse.papyrusrt.xtumlrt.xtext.codegen.ui.cdt.UmlrtXtextEObjectLocator. > getTransition(UmlrtXtextEObjectLocator.java:301) Can you give a bit more info on this? Does it happen with any model? The NPE occurs in the CDT integration, and I've never touched that code, so I'm not sure why the CDT integration fails. Furthermore, it may be an old error, because the line (301) where the NPE happens is a closing brace '}'. Maybe the error is with the preceding code? for (Trigger t : transition.getTriggers()) { RTTrigger trigger = (RTTrigger) t; if (trigger.getSignal().getName().equals(detail.getSignal()) && comparetriggerPorts(trigger.getPorts(), detail.getPorts())) { found = true; break; } If that's the case, it looks like maybe the CDT integration is making some (incorrect) assumptions about what it expects to see in the (xtUMLrt) model. In any case, I'm not sure this is critical for 1.0.
I think this is textual only issue and Simon said that we should move it out of 1.0 in this case. (In reply to Ernesto Posse from comment #1) > (In reply to Young-Soo Roh from comment #0) > > Generate code from textual model then the following NPE thrown when trying > > to sync user code from generate source. > > > > > > java.lang.NullPointerException > > at > > org.eclipse.papyrusrt.xtumlrt.xtext.codegen.ui.cdt.UmlrtXtextEObjectLocator. > > getTransition(UmlrtXtextEObjectLocator.java:301) > > Can you give a bit more info on this? Does it happen with any model? > > The NPE occurs in the CDT integration, and I've never touched that code, so > I'm not sure why the CDT integration fails. > > Furthermore, it may be an old error, because the line (301) where the NPE > happens is a closing brace '}'. > > Maybe the error is with the preceding code? > > for (Trigger t : transition.getTriggers()) { > RTTrigger trigger = (RTTrigger) t; > if (trigger.getSignal().getName().equals(detail.getSignal()) && > comparetriggerPorts(trigger.getPorts(), detail.getPorts())) { > found = true; > break; > } > > If that's the case, it looks like maybe the CDT integration is making some > (incorrect) assumptions about what it expects to see in the (xtUMLrt) model. > > In any case, I'm not sure this is critical for 1.0.
Textual only - moving to future