Looking a bit more closely I think the StereotypeUtility.getAvailableStereotypes is only supposed to be returning those stereotypes that are able to now be applied (and are not already applied).
>From what I can recall StereotypeUtility was built from code extracted from the original stereotype tab implementation and this was the method for producing the list on the left hand side of that tab. It was extracted when the code to implement changing stereotype by right click on figs etc was introduced. I notice a defect with the current tab, moving items from left to right leaves things in the left but the tab corrects itself on redraw. An aside - the StereotypeUtility.dealWithStereotypes method looks like it should probably move into the notation subsystem. The parameters look very specific for usage there (the only place its used) and its purpose by its method name is not clear out of context with where its used. Bob. On 14 April 2010 01:24, Luis Sergio Oliveira <[email protected]> wrote: > Hi Tom, > > On 13 April 2010 17:57, Tom Morris <[email protected]> wrote: >> Luis wrote a test recently which assumes that >> getAvailableStereotypes() will not include any applied stereotypes in >> the set that it returns (because they can't be applied a second time). >> As far as I can tell, the current behavior of including all valid >> stereotypes, whether they've been applied already or not, is the >> intended behavior for the current code. > > Maybe, but, I think that the only use of getAvailableStereotypes is > for the other method getApplicableStereotypeActions (I think that that > is its name) and AFAIK it shouldn't return the stereotypes that are > already applied. > > I haven't checked if from the point of view of valid UML is is > desirable to have the same stereotype applied twice to the same model > element. For me it doesn't make much sense. > > This is related to issue 5969 and I kind of agree to the defect > report. Maybe getAvailableStereotypes should be renamed to > getApplicableStereotypes and its behaviour adapted accordingly. > > PS: I think that I committed a failing test that Hudson build is > complaining about, but, I was offline for several days in a row and > only now I'm running the full build. All tests passed on my machine > before committing... > > Luís > >> >> Does anyone know if it used to work differently? How should it work? >> The API documentation doesn't really say one way or the other. >> >> Tom >> >> ------------------------------------------------------ >> http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2581020 >> >> 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]] >> > > ------------------------------------------------------ > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2581483 > > 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]] > ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2581929 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]]
