Author: linus Date: 2011-07-23 00:35:13-0700 New Revision: 19616 Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java
Log: Fixed some style issues. Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java?view=diff&pathrev=19616&r1=19615&r2=19616 ============================================================================== --- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java (original) +++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreFactoryEUMLImpl.java 2011-07-23 00:35:13-0700 @@ -150,21 +150,23 @@ Association association = createAssociation(); Property property1 = buildAssociationEndInternal(association, null, (Type) type1, null, null, navigability1, null, - (AggregationKind) aggregationKind1, null, null, null); + (AggregationKind) aggregationKind1, null, null); Property property2 = buildAssociationEndInternal(association, null, (Type) type2, null, null, navigability2, null, - (AggregationKind) aggregationKind2, null, null, null); + (AggregationKind) aggregationKind2, null, null); if (associationName != null) { association.setName(associationName); } association.getOwnedEnds().add(property1); association.getOwnedEnds().add(property2); - // The code below will make navigable ends owned by the classifier - // at the opposite end, but let's just make them owned by the association - // for simplicity (don't assume everything will be like this though!) + // The code below will make navigable ends owned by + // the classifier at the opposite end, but let's just + // make them owned by the association for simplicity + // (don't assume everything will be like this though!) // Bob says - see page 42 and 43 of UML2.2 superstructure - // for info on property ownership. Default will be association ownership - // but we need a way for the user to change to classifier ownership at a + // for info on property ownership. Default will be + // association ownership but we need a way for the + // user to change to classifier ownership at a // later time. // if (UMLUtil.getOwnedAttributes((Type) type2) == null) { // association.getOwnedEnds().add(property1); @@ -196,7 +198,8 @@ Object aggregationKind2, Boolean unidirectional) { if (unidirectional != null) { return buildAssociation( - fromClassifier, !unidirectional, aggregationKind1, toClassifier, + fromClassifier, !unidirectional, + aggregationKind1, toClassifier, true, aggregationKind2, null); } else { return buildAssociation( @@ -296,7 +299,7 @@ "The visibility of the property must" + //$NON-NLS-1$ " be instance of VisibilityKind."); //$NON-NLS-1$ } - if (multi != null && !(multi instanceof MultiplicityElement)) { + if (!(multi instanceof MultiplicityElement)) { throw new IllegalArgumentException( "The multilicity of the property must" + //$NON-NLS-1$ " be instance of MultiplicityElement."); //$NON-NLS-1$ @@ -320,9 +323,9 @@ (Association) assoc, name, (Type) type, new Integer[] {lower, upper}, (Stereotype) stereo, navigable, (Boolean) order, - (AggregationKind) aggregation,(Boolean) scope, + (AggregationKind) aggregation, (Boolean) changeable, (VisibilityKind) visibility); - getParams().add(property); + getParams().add(property); } }; modelImpl.getModelEventPump().getRootContainer().setHoldEvents(true); @@ -350,7 +353,7 @@ final String name, final Type type, final Integer[] multi, final Stereotype stereo, final Boolean navigable, final Boolean order, - final AggregationKind aggregation, final Object scope, + final AggregationKind aggregation, // final Object scope, final Object changeable, final VisibilityKind visibility) { // The attribute 'targetScope' of an AssociationEnd in UML1.x is no // longer supported in UML2.x @@ -409,7 +412,7 @@ Object visibility) { return buildAssociationEndInternal((Association) assoc, name, (Type) type, multi, (Stereotype) stereo, (Boolean) navigable, - (Boolean) order, (AggregationKind) aggregation, scope, + (Boolean) order, (AggregationKind) aggregation, changeable, (VisibilityKind) visibility); } @@ -960,8 +963,8 @@ Parameter param = createParameter(); param.setType((Type) type); // TODO: Remove? Can't be localized - param.setName("arg" + - ((BehavioralFeature) o).getOwnedParameters().size()); + param.setName("arg" + + ((BehavioralFeature) o).getOwnedParameters().size()); ((BehavioralFeature) o).getOwnedParameters().add(param); getParams().add(param); } @@ -1191,6 +1194,7 @@ throw new NotImplementedException(); } + @Deprecated public Generalization createGeneralization() { return createGeneralization(null); } Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java?view=diff&pathrev=19616&r1=19615&r2=19616 ============================================================================== --- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java (original) +++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/UmlHelperEUMLImpl.java 2011-07-23 00:35:13-0700 @@ -1,5 +1,5 @@ // $Id$ -/******************************************************************************* +/*************************************************************************** * Copyright (c) 2007,2010 Tom Morris and other contributors * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -8,7 +8,7 @@ * * Contributors: * Tom Morris - initial implementation - *******************************************************************************/ + ***************************************************************************/ package org.argouml.model.euml; import java.util.ArrayList; @@ -83,7 +83,8 @@ } else if (relationship instanceof ActivityEdge) { return ((ActivityEdge) relationship).getSource(); } else if (relationship instanceof Property) { - // TODO: We expect an association end here - check more carefully? - tfm + // TODO: We expect an association end here - + // check more carefully? - tfm return modelImpl.getCoreHelper().getSource(relationship); } else if (relationship instanceof Message) { return modelImpl.getFacade().getSender(relationship); @@ -107,7 +108,8 @@ return modelImpl.getStateMachinesHelper(). getDestination(relationship); } else if (relationship instanceof Property) { - // TODO: We expect an association end here - check more carefully? - tfm + // TODO: We expect an association end here - + // check more carefully? - tfm return modelImpl.getCoreHelper().getDestination(relationship); } else if (relationship instanceof Message) { return modelImpl.getFacade().getReceiver(relationship); @@ -121,8 +123,8 @@ * @see org.argouml.model.UmlHelper#move(java.lang.Object, org.argouml.model.UmlHelper.Direction) */ public void move(Object parent, Object element, Direction direction) { - if (false) { - //TODO: More work require - code below is from MDR implementation + //TODO: More work require - code below is from MDR implementation +// if (false) { // if (element instanceof Argument) { // final Argument arg = (Argument) element; // final Action action = arg.getAction(); @@ -147,7 +149,8 @@ // final int newIndex = newPosition(oldIndex, f.size(), direction); // f.remove(assEnd); // f.add(newIndex, assEnd); -// } else if (element instanceof Property && parent instanceof AssociationEnd) { +// } else if (element instanceof Property +// && parent instanceof AssociationEnd) { // final Attribute attr = (Attribute) element; // final AssociationEnd assocEnd = attr.getAssociationEnd(); // final List<Attribute> f = assocEnd.getQualifier(); @@ -155,7 +158,8 @@ // final int newIndex = newPosition(oldIndex, f.size(), direction); // f.remove(attr); // f.add(newIndex, attr); - } else if (element instanceof Feature) { +// } else + if (element instanceof Feature) { final Feature att = (Feature) element; final Element cls = att.getOwner(); final List f = Model.getFacade().getFeatures(cls); @@ -172,7 +176,8 @@ final int newIndex = newPosition(oldIndex, f.size(), direction); f.remove(param); f.add(newIndex, param); - } else if (element instanceof Parameter && parent instanceof ParameterSet) { + } else if (element instanceof Parameter + && parent instanceof ParameterSet) { final Parameter param = (Parameter) element; final ParameterSet set = (ParameterSet) parent; final List<Parameter> f = set.getParameters(); @@ -205,7 +210,8 @@ final int newIndex = newPosition(oldIndex, f.size(), direction); f.remove(lit); f.add(newIndex, lit); - } else if (element instanceof ExtensionPoint && parent instanceof Extend) { + } else if (element instanceof ExtensionPoint + && parent instanceof Extend) { final ExtensionPoint ep = (ExtensionPoint) element; final Extend extend = (Extend) parent; final List<ExtensionPoint> f = extend.getExtensionLocations(); @@ -216,16 +222,19 @@ // } else if (element instanceof LinkEnd) { // final LinkEnd le = (LinkEnd) element; // final Link link = le.getLink(); -// final List f = new ArrayList(Model.getFacade().getConnections(link)); +// final List f = +// new ArrayList(Model.getFacade().getConnections(link)); // final int oldIndex = f.indexOf(le); // final int newIndex = newPosition(oldIndex, f.size(), direction); // f.remove(le); // f.add(newIndex, le); // Model.getCoreHelper().setConnections(link, f); - } else if (element instanceof ExtensionPoint && parent instanceof UseCase) { + } else if (element instanceof ExtensionPoint + && parent instanceof UseCase) { final ExtensionPoint ep = (ExtensionPoint) element; final UseCase extend = ep.getUseCase(); - final List f = new ArrayList(Model.getFacade().getExtensionPoints(extend)); + final List f = + new ArrayList(Model.getFacade().getExtensionPoints(extend)); final int oldIndex = f.indexOf(ep); final int newIndex = newPosition(oldIndex, f.size(), direction); f.remove(ep); ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2801491 To unsubscribe from this discussion, e-mail: [[email protected]].
