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.

Bug 102658 - Collection type specification case-by-case
Summary: Collection type specification case-by-case
Status: NEW
Alias: None
Product: uml
Classification: Unclassified
Component: Code Generation (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-26 18:13 UTC by nicholeuf
Modified: 2007-04-27 21:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nicholeuf 2007-04-26 18:13:33 UTC
Currently if a user creates a class diagram using a navigable aggregation
between two classes with the aggregation multiplicity set to *, the resulting
generated code will use the collection type specified in the Tools | Options |
Advanced Options | UML | Code Engineering | Java Platform | Collection Override
Default property.  

It would be more user friendly if the user could set the resulting collection
type on a case-by-case basis (by changing a property on the aggregation itself)
rather than on a project-wide basis (by changing a property in the netbeans
options).  It would be desirable to perform the same operation for a navigable
composition.

Steps to reproduce:
(1) Create a new Java-Platform Model UML Project
(2) Create a new Class Diagram
(3) Place a new Class A and Class B on the class diagram
(4) Place a new Navigable Aggregation between A and B
(5) Set the multiplicity on the A-side of the Navigable Association to '1'
(6) Set the multiplicity on the A-side of the Navigable Association to '*'
(7) Create a new Java Application Project
(8) Right click on Class A and select 'Generate Code...', selecting the project
created in step 7.
(9) Navigate to the source of Class A and notice the aggregation has been
generated to ArrayList<B> mB, which is the default type specified in the Tools |
Options | Advanced Options | UML | Code Engineering | Java Platform | Collection
Override Default property.
Comment 1 nicholeuf 2007-04-26 18:15:41 UTC
Step 6 should state:
(6) Set the multiplicity on the B-side of the Navigable Association to '*'
Comment 2 nicholeuf 2007-04-26 18:25:15 UTC
Steps 5 & 6 should state:

(5) Set the multiplicity on the A-side of the Navigable Aggregation to '1'
(6) Set the multiplicity on the B-side of the Navigable Aggregation to '*'
Comment 3 Sergey Petrov 2007-04-27 21:28:46 UTC
it's implemented in nb6.0 and may be will go to uml update for nb55 too,
And I believe it's a duplicate of resolved issue but I can't find issue right now