Hi Bob, Good change in the commit below. Sorry I missed that.
BTW: Did you notice the condition for declaring a transition internal? Here I used 2 conditions: source = target and the TransitionKind. Alternatively, we could also just test the TransitionKind... Or only check the source and the kind. I do not find this in the UML standard: what really makes an internal transition? There is not even a WFR for this I think. We have to beware of that implementing stuff in ArgoUML. Kind regards, Michiel On 13-05-11 11:58, [email protected] wrote: > Author: bobtarling > Date: 2011-05-13 02:58:35-0700 > New Revision: 19417 > > Modified: > > trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java > > Log: > Return an empty array rather than null for no internal transitions > > Modified: > trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java > Url: > http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=19417&r1=19416&r2=19417 > ============================================================================== > --- > trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java > (original) > +++ > trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java > 2011-05-13 02:58:35-0700 > @@ -913,17 +913,17 @@ > > public Collection getInternalTransitions(Object handle) { > if (isAVertex(handle)) { > - Region region = ((Vertex) handle).getContainer(); > - if (region == null) { > - return null; > - } > - List<Transition> result = new ArrayList<Transition>(); > - List<Transition> transitions = region.getTransitions(); > - for (Transition transition : transitions) { > - if ((transition.getSource() == handle)&& > - (transition.getTarget() == handle)&& > - transition.getKind() == > TransitionKind.INTERNAL_LITERAL) { > - result.add(transition); > + final List<Transition> result = new ArrayList<Transition>(); > + final Region region = ((Vertex) handle).getContainer(); > + if (region != null) { > + final List<Transition> transitions = > region.getTransitions(); > + for (Transition transition : transitions) { > + if ((transition.getSource() == handle) > +&& (transition.getTarget() == handle) > +&& transition.getKind() > + == TransitionKind.INTERNAL_LITERAL) { > + result.add(transition); > + } > } > } > return result; > > ------------------------------------------------------ > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2735304 > > To unsubscribe from this discussion, e-mail: > [[email protected]]. ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2735315 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]]
