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 199106

Summary: CopyFinder functionality needed in Java Refactoring module.
Product: java Reporter: Jan Becicka <jbecicka>
Component: SourceAssignee: apireviews <apireviews>
Status: RESOLVED FIXED    
Severity: normal CC: jlahoda, ralphbenjamin
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 176217    
Attachments: SourceUtils.computeDuplicates
2nd version with fixed class loaders
added apichanges

Description Jan Becicka 2011-06-02 11:00:42 UTC
Make CopyFinder somehow accessible as utility method.
Comment 1 Jan Becicka 2011-08-25 09:56:56 UTC
Created attachment 110200 [details]
SourceUtils.computeDuplicates
Comment 2 Jan Becicka 2011-08-25 10:04:56 UTC
I created utility method in SourceUtils. I'd like to ask Ralph to test it, if this is what he want.
I did not create any special test for it, but I changed all occurrences of this method in IntroduceHint to use this new method and all IntroduceTests (142) passed, so I suppose it works. 
And and like to ask jlahoda to review the impl...
Comment 3 Jan Becicka 2011-08-25 13:09:22 UTC
Created attachment 110207 [details]
2nd version with fixed class loaders
Comment 4 Jan Lahoda 2011-08-26 07:58:23 UTC
The method signature seems fine to me. The implementation is of course a terrible hack, but better than any alternative that I can imagine, so I am fine with that too. Might be good to add a comment to the CopyFinderService with a warning that it is used from SourceUtils.

Thanks.
Comment 5 Ralph Ruijs 2011-08-26 08:58:09 UTC
Thanks, this is what is needed for the Introduce Parameter Refactoring.
Comment 6 Jan Becicka 2011-08-26 09:50:56 UTC
Created attachment 110236 [details]
added apichanges
Comment 7 Jan Becicka 2011-08-26 09:53:20 UTC
Please review SourceUtils.computeDuplicates
We know, that impl. is hack, but we can live with it for 7.1 I hope.
Comment 8 Jan Becicka 2011-08-29 12:56:44 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/fa9fde2aa465
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2011-08-29 13:50
Message:   
Issue #199106 - CopyFinder functionality needed in Java Refactoring module.
Comment 9 Jan Becicka 2011-08-29 12:56:49 UTC
Changeset: http://hg.netbeans.org/jet-main/rev/1b655b483c93
Author:    Jan Becicka <jbecicka@netbeans.org>
Date:      2011-08-29 14:23
Message:   
Issue #199106 - CopyFinder functionality needed in Java Refactoring module.
Comment 10 Quality Engineering 2011-09-01 14:21:24 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/fa9fde2aa465
User: Jan Becicka <jbecicka@netbeans.org>
Log: Issue #199106 - CopyFinder functionality needed in Java Refactoring module.