I am not sure whether anyone did encounter this problem.
I linked two SysMLPorts(metaclass) from an object(metaclass) to a class(metaclass).
After typecasting the IRPApplication.getSelectedElement() into IRPLink, there will be NullPointerException either in IRPLink.getFromSysMLPort or IRPLink.getToSysMLPort.
This problem will not exist if both of the linked SysMLPorts are from objects(IRPInstance).
Does anyone know how to solve this problem for getting the information from both IRPLink.getFromSysMLPort and IRPLink.getToSysMLPort?
Thank you very much in advance!
Pinned topic Link between an object and class -> nullpointer exists, any solution idea?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-10-26T08:34:14Z at 2012-10-26T08:34:14Z by lecping
W0G6_Neelakantam_Pavani 270004W0G611 Posts
Re: Link between an object and class -> nullpointer exists, any solution idea?2012-10-22T18:20:49ZThis is the accepted answer. This is the accepted answer.hi,
right click on the class in the diagram and select "make an object" from the menu... do this for both the classes.
then it will allow to create a link between the object.
Re: Link between an object and class -> nullpointer exists, any solution idea?2012-10-26T08:31:35ZThis is the accepted answer. This is the accepted answer.
- Vipsy 270004PHJY
I see, but due to some animation reasons, my supervisor insisted to have class to be linked to an object. Now, i defined that those ports must be sub-entity of the class. So when i run my java-plugin by selecting the class from the browser view, I use IRPLink.getFrom/to to get the information of the SysMLPort first, for searching its information from the lower level searching tree. It works but in a more structured way.
Re: Link between an object and class -> nullpointer exists, any solution idea?2012-10-26T08:34:14ZThis is the accepted answer. This is the accepted answer.
- W0G6_Neelakantam_Pavani 270004W0G6
That's to instantiate the class into an object. My supervisor shown me that there is a difference in inheriting operations(for State Chart Diagram) when linking class-object or object-object. Some of the operations from the IBD are not inherited into the state chart diagram. Therefore, my supervisor always insist get the link between a class-oject.
Thanks for the tips!
Chuan Ping Lee