Hello,
I am attempting to create a custom ModelElement to use in my Diagrams within VP and I am experiencing some difficulties:
-
I am trying to define the new element by implementing the IModelElement interface. In order to do this I need to override over 84 methods, where most of the methods don’t have a clear meaning to me. I was wondering if there is a list of method that are strictly necessary to be overridden in order for the custom ModelElement to work. In case of a negative answer, I was wondering if there was any documentation regarding what all those methods are supposed to do. Some methods, like getName() are very straightforward; but there are other methods, like ‘public IModelElement getChildByName(String arg0, String arg1)’, where the attributes are not helpful to get the method implementation right. When looking at the online API documentation I noticed that there is no class, interface, or method descriptions.
-
I am trying to add my custom ModelElement as a child to a VP State2 Model. When I do this I get an illegal cast exception stating that my custom ModelElement cannot be cast to v.alua. I am not sure what this means. Can this be because I am not overriding the correct methods? Or are there any restrictions regarding what ‘Types’ of ModelElements can be added to a State2 Model?
-
My final goal is to have custom information embedded within the State2 Model when I export the project/diagram using VP XMI / XML export capability. Can this be achieved using the approach I am currently taking? If I manage to add the custom ModelElement as a child to the State2 Model, will it be exported as a custom XMI / XML tag within the State2’s tag in the export document?
Thank you very much in advance for your help,
Eduardo