This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Attribute multiplicity is not propagated to Model when it was added to source | ||
---|---|---|---|
Product: | uml | Reporter: | Craig Conover <conover> |
Component: | Synchronization | Assignee: | Craig Conover <conover> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | ||
Priority: | P1 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Craig Conover
2006-07-12 03:04:39 UTC
Appears that it doesn't see the difference between int and int[], but it works if you change the type from int to String[]. So somehow it is not considering the brackets in some comparison. Has the same problem going from int[] back to int as well. As I suspected, the new and old types are being compared without the brackets being considered, so int and int[] resolve to be the same type and no event is fired telling the getter and setter to change their types. This comparison is peformed in the method setType(IClassifier newClassifier) of TypedElement in package org.netbeans.modules.uml.core.metamodel.infrastructure.coreinfrastructure. But the fix may be to make sure the type with the brackets is passed in with the brackets rather than changing TypeElement's code. We shall see. multiplicityChanged was not being invoked in JavaAttributeChangeHandler, because there was no "mirror" method in JavaAttributeChangeFacility (the class that MemberInfo has a reference to for calling typeChanged). So I added this method and invoke it when there is an attribute type change event. There is no way of knowing if just the multiplicty has changed because JavaModel and MDR do not provide that information. Calling it when the type change event occurs has no ill side effect if there indeed wasn't any change in multiplicity. (Thanks Trey for the tip). This also address another scenario: "Attribute type renaming through java source property is not propagated to model" Files affected: uml/core/src/org/netbeans/modules/uml/core/roundtripframework/requestprocessors/javarpcomponent/JavaAttributeChangeFacility.java uml/ideintegration/src/org/netbeans/modules/uml/integration/netbeans/listeners/JMIInfoUtils.java uml/core/src/org/netbeans/modules/uml/core/roundtripframework/AttributeChangeFacility.java uml/ideintegration/src/org/netbeans/modules/uml/integration/ide/events/MemberInfo.java *** Issue 80601 has been marked as a duplicate of this issue. *** verified in nb55 beta milestone17 |