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 82269 - Refactoring does not work in some cases after Code Generation
Summary: Refactoring does not work in some cases after Code Generation
Status: RESOLVED WONTFIX
Alias: None
Product: uml
Classification: Unclassified
Component: Synchronization (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@uml
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-09 13:35 UTC by Alexandr Scherbatiy
Modified: 2007-01-19 07:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE snapshot with error message (126.21 KB, image/png)
2006-08-09 13:38 UTC, Alexandr Scherbatiy
Details
Java and UML test projects ready to go. (68.16 KB, application/octet-stream)
2006-08-10 23:02 UTC, Craig Conover
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2006-08-09 13:35:33 UTC
Steps to reproduce:

- Create a UML 'Java-Platform Model' project, 
  uncheck 'Source-Model Synchronization' check box
- Create a Class diagram
- Put Package element on the diagram and name it 'pack1'
- Put Class element on 'pack1' Package element and name it 'MyClass'

- Put Package element on the diagram and name it 'pack2'
- Put Interface element on 'pack2' Package element and name it 'MyInterface'
- Insert 'public void run()' operation into 
  'MyInterface' Interface element

- Draw 'Implementation' link from 'MyClass' to 'MyInterface'
  See attached snapshot


- Create an empty  Java project
- Go to the UML project properties
- Check 'Source-Model Synchronization' check box
- Select the Java project from the Java Project
  drop-down list
- Press OK button

- Select the UML project and invoke 'Generate Code'
- Go to the source of 'MyClass' Interface element

   Select 'MyInterface' interface name after 'implements' word
   and invoke 'Refactor|Rename' from popup menu
  
  See attached snapshot
 
  The dialog with errors pops up:
  The original element being refactored is not available. It was deleted
  or significantly changed. Usages  cannot be collected.
Comment 1 Alexandr Scherbatiy 2006-08-09 13:38:31 UTC
Created attachment 32703 [details]
IDE snapshot with error message
Comment 2 Craig Conover 2006-08-10 01:20:54 UTC
Seems to be working now. Please attempt to reproduce.
Comment 3 Alexandr Scherbatiy 2006-08-10 09:03:49 UTC
The isssue is reproduced if you do not edit the java source file 
before refactoring. 
Comment 4 Craig Conover 2006-08-10 23:02:19 UTC
Created attachment 32783 [details]
Java and UML test projects ready to go.
Comment 5 Craig Conover 2006-08-10 23:02:56 UTC
OK, got it. I was able to reproduce this time. Not sure what I did different
last time.
Comment 6 Peter Lam 2007-01-19 07:23:24 UTC
live round-trip feature issue.