Author: mvw
Date: 2010-08-25 13:38:46-0700
New Revision: 18683
Modified:
trunk/src/argouml-app/src/org/argouml/notation/providers/java/OperationNotationJava.java
trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java
trunk/src/argouml-core-model/src/org/argouml/model/AbstractCoreHelperDecorator.java
trunk/src/argouml-core-model/src/org/argouml/model/CoreHelper.java
Log:
Fix for issue 6133: Support Java notation for a Reception. Do not show concurrency for Receptions.
Extended the model interface function CoreHelper.getReturnParameters() to take any BehavioralFeature as parameter, instead of only an Operation.
Please check if the EUML implementation is correct - I could not test this.
Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/java/OperationNotationJava.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/java/OperationNotationJava.java?view=diff&pathrev=18683&r1=18682&r2=18683
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/java/OperationNotationJava.java (original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/java/OperationNotationJava.java 2010-08-25 13:38:46-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -52,7 +52,7 @@
import org.argouml.notation.providers.OperationNotation;
/**
- * The notation for an operation.
+ * The notation for an operation or reception.
*
* @author michiel
*/
@@ -117,8 +117,12 @@
} else {
nameStr = Model.getFacade().getName(modelElement);
}
+
+ boolean isReception = Model.getFacade().isAReception(modelElement);
- sb.append(generateConcurrency(modelElement));
+ if (! isReception) {
+ sb.append(generateConcurrency(modelElement));
+ }
sb.append(generateAbstractness(modelElement));
sb.append(NotationUtilityJava.generateChangeability(modelElement));
sb.append(NotationUtilityJava.generateScope(modelElement));
Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java?view=diff&pathrev=18683&r1=18682&r2=18683
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java (original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java 2010-08-25 13:38:46-0700
@@ -10,6 +10,7 @@
* Tom Morris - initial framework & prototype implementation
* Bogdan Pistol - initial implementation
* Thomas Neustupny
+ * Michiel van der Wulp
*****************************************************************************/
package org.argouml.model.euml;
@@ -908,13 +909,13 @@
return result;
}
- public List<Parameter> getReturnParameters(Object operation) {
- if (!(operation instanceof Operation)) {
+ public List<Parameter> getReturnParameters(Object bf) {
+ if (!(bf instanceof BehavioralFeature)) {
throw new IllegalArgumentException(
- "'operation' must be instance of Operation"); //$NON-NLS-1$
+ "'bf' must be instance of BehavioralFeature"); //$NON-NLS-1$
}
List<Parameter> result = new ArrayList<Parameter>();
- for (Parameter p : ((Operation) operation).getOwnedParameters()) {
+ for (Parameter p : ((Operation) bf).getOwnedParameters()) {
if (p.getDirection() == ParameterDirectionKind.RETURN_LITERAL) {
result.add(p);
}
Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java?view=diff&pathrev=18683&r1=18682&r2=18683
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java (original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/CoreHelperMDRImpl.java 2010-08-25 13:38:46-0700
@@ -8,7 +8,7 @@
*
* Contributors:
* Thomas Neustupny
- * mvw
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -492,10 +492,10 @@
return name;
}
- public List<Parameter> getReturnParameters(Object operation) {
+ public List<Parameter> getReturnParameters(Object bf) {
List<Parameter> returnParams = new ArrayList<Parameter>();
try {
- for (Parameter parameter : ((Operation) operation).getParameter()) {
+ for (Parameter parameter : ((BehavioralFeature) bf).getParameter()) {
if (ParameterDirectionKindEnum.PDK_RETURN.equals(parameter
.getKind())) {
returnParams.add(parameter);
Modified: trunk/src/argouml-core-model/src/org/argouml/model/AbstractCoreHelperDecorator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/AbstractCoreHelperDecorator.java?view=diff&pathrev=18683&r1=18682&r2=18683
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/AbstractCoreHelperDecorator.java (original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/AbstractCoreHelperDecorator.java 2010-08-25 13:38:46-0700
@@ -1,6 +1,6 @@
/* $Id$
*******************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,6 +9,7 @@
* Contributors:
* tfmorris
* Thomas Neustupny
+ * Michiel van der Wulp
*******************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -130,8 +131,8 @@
return impl.getParents(generalizableElement);
}
- public List getReturnParameters(Object operation) {
- return impl.getReturnParameters(operation);
+ public List getReturnParameters(Object bf) {
+ return impl.getReturnParameters(bf);
}
public Object getSpecification(Object object) {
Modified: trunk/src/argouml-core-model/src/org/argouml/model/CoreHelper.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model/src/org/argouml/model/CoreHelper.java?view=diff&pathrev=18683&r1=18682&r2=18683
==============================================================================
--- trunk/src/argouml-core-model/src/org/argouml/model/CoreHelper.java (original)
+++ trunk/src/argouml-core-model/src/org/argouml/model/CoreHelper.java 2010-08-25 13:38:46-0700
@@ -1,6 +1,6 @@
/* $Id$
*******************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
*
* Contributors:
* Thomas Neustupny
+ * Michiel van der Wulp
*******************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -163,12 +164,13 @@
Collection getParents(Object generalizableElement);
/**
- * Return all return parameters for an Operation.
+ * Return all return parameters for a BehavioralFeature
+ * (Operation, Reception,...).
*
- * @param operation is the operation.
+ * @param bf is the behavioral feature.
* @return List of parameters of with direction kind of Return.
*/
- List getReturnParameters(Object operation);
+ List getReturnParameters(Object bf);
/**
* Return the Operation which is the specification for a Method.<p>
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2651397
To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.