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 126902 - Rename method in Abstract class doesn't rename method in its descendant (subclasses)
Summary: Rename method in Abstract class doesn't rename method in its descendant (subc...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker with 1 vote (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-07 12:15 UTC by tprochazka
Modified: 2009-04-23 08:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (52.61 KB, text/plain)
2008-03-07 17:52 UTC, tprochazka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tprochazka 2008-02-07 12:15:14 UTC
I have abstract class AbstractFormElement which contain abstract method evalFormHtmlCode() and many classes which 
extend this class and implement this method. When I use rename on method in abstract class Netbeas write warning: 
"There are methods in subclasses/implementors of AbstractForm that override or implement this metod. The will be also 
renamed." But when I run refactoring Netbeans rename only method in AbstractFormElement class. No in subclasses :-(

I tested in in latest Build 20080207101729 (netbeans-hudson-trunk-272.zip)
Comment 1 Daniel Prusa 2008-02-07 15:15:59 UTC
I cannot reproduce the described problem. When you push "Preview" button in the refactoring dialog, does the preview
display all methods overriding the method to be renamed or just the method itself? It would help if you could attach
some sources for reproduction.
Comment 2 tprochazka 2008-02-08 06:20:19 UTC
I can reproduce it:
http://atom.mamto.cz/projekty/bugs/Netbeans/rename_abstract_class/

But when I create similar project, or only copy the same project to another location and open it, or when I delete 
Netbeanc config directory a open the same project, all is working. I tried delete dev\var\cache\ so. This has no 
effect, I can still reproduce the problem.
Comment 3 tprochazka 2008-02-26 10:26:34 UTC
Now, in netbeans-hudson-trunk-681.zip build I have problem also with normal method renaming, Netbeans rename method 
only in one file and doesn't scan for usage of selected method.
Comment 4 Daniel Prusa 2008-02-26 10:33:55 UTC
Can you perform the method rename refactoring that fails and to attach your dev\var\log\messages.log file after that,
please?
Comment 5 tprochazka 2008-03-07 17:52:24 UTC
Created attachment 57990 [details]
messages.log
Comment 6 tprochazka 2008-03-07 17:53:36 UTC
I also can send example project, but it has 2MB. I can send it to yours email if you can.
Comment 7 Jiri Prox 2008-12-08 16:58:08 UTC
Sorry for the late response, but it is still reproducible?
Comment 8 tprochazka 2008-12-19 07:19:40 UTC
This was problem only in concrete project at concrete development phase, now is project rewritten and I can't reproduce 
it. And I can't found archive with older affected version. If I found working test case again, I will send it to you.
Comment 9 Marian Mirilovic 2009-04-23 08:54:34 UTC
@tprochazka: I was not able to reproduce this problem in NB 6.7 Beta build, please reopen this issue when you'll face
same issue again. Thanks in advance.