Author: mvw
Date: 2008-07-10 12:27:07-0700
New Revision: 15234
Modified:
trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java
Log:
Fix for issue 5229: Attribute types newly created by Notation subsystem not placed in any namespace.
Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java?view=diff&rev=15234&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java&r1=15233&r2=15234
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java (original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/AttributeNotationUml.java 2008-07-10 12:27:07-0700
@@ -47,7 +47,7 @@
/**
* The notation for an attribute for UML.
*
- * @author [email protected]
+ * @author Michiel
*/
public class AttributeNotationUml extends AttributeNotation {
@@ -97,7 +97,7 @@
/**
* Parse a string representing one ore more ';' separated attributes. The
* case that a String or char contains a ';' (e.g. in an initializer) is
- * handled, but not other occurences of ';'.
+ * handled, but not other occurrences of ';'.
*
* @param classifier Classifier The classifier the attribute(s) belong to
* @param attribute Attribute The attribute on which the editing happened
@@ -146,6 +146,15 @@
Model.getCoreHelper().setType(newAttribute, attrType);
if (newAttribute != null) {
+ /* We need to set the namespace/owner
+ * of the new attribute before parsing: */
+ if (i != -1) {
+ Model.getCoreHelper().addFeature(
+ classifier, ++i, newAttribute);
+ } else {
+ Model.getCoreHelper().addFeature(
+ classifier, newAttribute);
+ }
try {
parseAttribute(s, newAttribute);
/* If the 1st attribute is static,
@@ -153,13 +162,6 @@
Model.getCoreHelper().setStatic(
newAttribute,
Model.getFacade().isStatic(attribute));
- if (i != -1) {
- Model.getCoreHelper().addFeature(
- classifier, ++i, newAttribute);
- } else {
- Model.getCoreHelper().addFeature(
- classifier, newAttribute);
- }
} catch (ParseException ex) {
if (pex == null) {
pex = ex;
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.