Author: tfmorris
Date: 2007-09-26 11:16:17-0700
New Revision: 13597
Modified:
trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java
trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java
trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java
Log:
Add support for tagType other than String on TagDefinitions as requested by Sérgio Adriano Fernandes Lopes on the dev list
Modified: trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java?view=diff&rev=13597&p1=trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java&p2=trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java&r1=13596&r2=13597
==============================================================================
--- trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java (original)
+++ trunk/src/model/src/org/argouml/model/AbstractExtensionMechanismsHelperDecorator.java 2007-09-26 11:16:17-0700
@@ -130,6 +130,10 @@
impl.setTag(handle, tag);
}
+ public void setTagType(Object handle, String tagType) {
+ impl.setType(handle, tagType);
+ }
+
public void setType(Object handle, Object type) {
impl.setType(handle, type);
}
Modified: trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java?view=diff&rev=13597&p1=trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java&p2=trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java&r1=13596&r2=13597
==============================================================================
--- trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java (original)
+++ trunk/src/model/src/org/argouml/model/ExtensionMechanismsFactory.java 2007-09-26 11:16:17-0700
@@ -118,15 +118,44 @@
Object copyStereotype(Object source, Object ns);
/**
- * Build an initialized instance of a TagDefinition.
- * @param name is the name of the TagDefinition
- * @param stereotype is the optional stereotype owning the TagDefinition
- * @param ns is the namespace to put the TagDefinition.
+ * Build an initialized instance of a TagDefinition with the default tagType
+ * of "String". Only one of the two parameters <code>stereotype</code> and
+ * <code>namespace</code> may be specified.
+ *
+ * @param name
+ * is the name of the TagDefinition
+ * @param stereotype
+ * is the optional stereotype owning the TagDefinition
+ * @param namespace
+ * is the namespace to put the TagDefinition.
* @return a newly created TagDefinition.
*/
- Object buildTagDefinition(String name, Object stereotype, Object ns);
+ Object buildTagDefinition(String name, Object stereotype,
+ Object namespace);
/**
+ * Build an initialized instance of a TagDefinition. Only one of the two
+ * parameters <code>stereotype</code> and <code>namespace</code> may be
+ * specified.
+ *
+ * @param name
+ * is the name of the TagDefinition
+ * @param stereotype
+ * is the optional stereotype owning the TagDefinition
+ * @param namespace
+ * is the namespace to put the TagDefinition.
+ * @param tagType
+ * a string containing the name of the type for values that
+ * may be assigned to this tag. This can either be the name
+ * of a datatype (e.g. "String", "Integer" or "Boolean") or
+ * the name of a metaclass for more complex types of tagged
+ * values.
+ * @return a newly created TagDefinition.
+ */
+ Object buildTagDefinition(String name, Object stereotype, Object namespace,
+ String tagType);
+
+ /**
* Create a TagDefinition.
*
* @return a TagDefinition
Modified: trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java?view=diff&rev=13597&p1=trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java&p2=trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java&r1=13596&r2=13597
==============================================================================
--- trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java (original)
+++ trunk/src/model/src/org/argouml/model/ExtensionMechanismsHelper.java 2007-09-26 11:16:17-0700
@@ -198,6 +198,19 @@
*/
@Deprecated
void setTag(Object handle, Object tag);
+
+ /**
+ * Set the tagType of a TaggedDefinition. This controls the range of legal
+ * values for the associated TaggedValues.
+ *
+ * @param handle the taggedValue
+ * @param tagType A string containing the name of the type for values that
+ * may be assigned to this tag. This can either be the name
+ * of a datatype (e.g. "String", "Integer" or "Boolean") or
+ * the name of a metaclass for more complex types of tagged
+ * values.
+ */
+ void setTagType(Object handle, String tagType);
/**
* Set the type of a taggedvalue.
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.