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 79768 - Class renaming is not propagated to attribute initialization
Summary: Class renaming is not propagated to attribute initialization
Status: REOPENED
Alias: None
Product: uml
Classification: Unclassified
Component: Diagram Class (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-05 13:24 UTC by Alexandr Scherbatiy
Modified: 2009-05-25 21:06 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Attribute initialization is not updated (103.46 KB, image/png)
2006-07-05 13:27 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2006-07-05 13:24:48 UTC
Steps to reproduce:

- Create a Java project
- Create a UML project associated with the Java project
- Create a Class diagram
- Add Class Element on the diagram and name it 'A'
- Add Class Element on the diagram and name it 'B'

- Go to source of 'B' class
- Add new 'private A a = new A()' attribute into the 'B' class
- Go to the Class Diagram
- Rename 'A' class element to 'C'
- Go to source of 'B' class
  'a' attribute initialization is not changed to 'new C()'.


Project is not compiled:

JavaApplication\src\pack\B.java:5: incompatible types
found   : pack.A
required: pack.C
    private C a = new A();
1 error
BUILD FAILED (total time: 0 seconds)
Comment 1 Alexandr Scherbatiy 2006-07-05 13:27:13 UTC
Created attachment 31651 [details]
Attribute initialization is not updated
Comment 2 Craig Conover 2006-10-12 01:11:21 UTC
This scenario is obsolete because of the Roundtrip Redisgn: issue 84855
Comment 3 Andrew Korostelev 2006-10-13 16:04:12 UTC
verified in all-nbms-griffin-061012_6 on nb55rc2

now this bug most likely belongs to class diagram (while mostly effects
code_generation).
But not sure requested functionality should be supported by class diagram.

steps:
- in java project create classes A and B.
- add new 'private A a = new A()' attribute into the 'B' class
- RE java project to uml project.
- CDFS class diagram from A and B. NAvigable aggregation will appear between them.
- on diagram rename A to C.
- open properties for aggregation link 
- find 'Part end' block of properies.
- look at 'Default' property value.
It is still 'new A()'.

Default value wasn't removed and will be generated as is into source code.
Comment 4 George Vasick 2007-05-17 18:47:44 UTC
Planned for drawing area upgrade after NB 6.0.
Comment 5 George Vasick 2007-05-18 00:41:04 UTC
Should not use resolved/later status.
Comment 6 George Vasick 2007-06-28 22:41:38 UTC
Targeted in drawing area redesign.
Comment 7 George Vasick 2007-07-04 00:53:44 UTC
Restoring original priority and using the standard NB waiver process.
Comment 8 George Vasick 2008-01-02 17:40:23 UTC
Diagram area bugs waived for 6.0 will also be waived for 6.1.
Comment 9 Sergey Petrov 2009-01-15 15:25:36 UTC
it's advanced re-factoring support request, when initial value is always just a literal in nb uml.