Author: mvw
Date: 2011-04-20 00:54:38-0700
New Revision: 19263
Modified:
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsFactoryMDRImpl.java
Log:
Allow the creation of tagged values without value.
This used to give an exception:
Enter the following notation for an attribute: name{tv}
Modified:
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsFactoryMDRImpl.java
Url:
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsFactoryMDRImpl.java?view=diff&pathrev=19263&r1=19262&r2=19263
==============================================================================
---
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsFactoryMDRImpl.java
(original)
+++
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/ExtensionMechanismsFactoryMDRImpl.java
2011-04-20 00:54:38-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009,2010 Contributors - see below
+ * Copyright (c) 2009-2011 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:
* Tom Morris
+ * Michiel van der Wulp
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -49,7 +50,6 @@
import org.omg.uml.foundation.core.Stereotype;
import org.omg.uml.foundation.core.TagDefinition;
import org.omg.uml.foundation.core.TaggedValue;
-import org.omg.uml.foundation.datatypes.Multiplicity;
/**
* Factory to create UML classes for the UML ExtensionMechanisms
@@ -230,7 +230,9 @@
@Deprecated
public TaggedValue buildTaggedValue(String tag, String value) {
TaggedValue tv = buildTaggedValue(getTagDefinition(tag));
- tv.getDataValue().add(value);
+ if (value != null) {
+ tv.getDataValue().add(value);
+ }
return tv;
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2721688
To unsubscribe from this discussion, e-mail:
[[email protected]].