On Mon, Jan 31, 2011 at 5:00 AM, Thomas Neustupny <[email protected]> wrote:
> my work on tagged values for UML2 (using stereotype properties) is stalling > because I'm just not keen enough to work with the model event pump. At least > this is what I'm guessing, because while with MDR events are fired when > choosing a tag definition in the tagged values pane, nothing happens when > doing the same with eUML. > > Can someone explain to me what I should do? I've read > http://argouml.tigris.org/wiki/%3C%3CSubsystem%3E%3E_Model, but still have no > solution. A lot of this stuff at the top of that page is of historical interest only or no interest at all. The main thing to understand is that both the event listener registration and listener processing itself needs to be correct and the name of the events/properties, as well as their source, is tied to the UML metamodel. If you're listening to a UML 1.4 source for a UML 1.4 property name and this has changed in UML 2.x, your listener code will never get invoked. When I was working on the UML 1.3 to UML 1.4 conversion the event processing is where a large portion of the time went, so I wouldn't be surprised if the same were true when moving to UML 2.x. If you look at the current event pump implementation, you'll see that each event basically gets replicated. This is because relationships are asymmetric in MDR and it only fires an event for what it considers to be the "owning" end of the relationship, with the associated property name. The old NSUML event registration code basically expected to be able to register for either end, so the event pump looks up the inverse property and fires events for that too. I think either Bogdan or I replicated all this machinery for the eUML implementation already, so this is primarily background information rather than something you should need to actively worry about. As I recall there's also some simple property name mapping which will map from UML 2.x property names back to UML 1.4 equivalent names, but this is likely to only be effective in the simplest of cases. If you're listening to the wrong object, it won't matter what the property names are. If you've got a specific question I'd be happy to answer it, but there is not going to be any magic bullet here. It's just going to require going through and conditionalizing things that have changed between the two metamodels (or providing mappings within the event pump, where that's possible). Tom ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2701698 To unsubscribe from this discussion, e-mail: [[email protected]]. To be allowed to post to the list contact the mailing list moderator, email: [[email protected]]
