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 109040 - Refactor to remove unused code, narrow code access, make static
Summary: Refactor to remove unused code, narrow code access, make static
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: Jan Becicka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-06 18:06 UTC by _ viendu
Modified: 2010-09-23 08:39 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 _ viendu 2007-07-06 18:06:38 UTC
I am not sure if this is a new idea, or it's been there already.

1) Provide a method to automatically comment out unused code with some user provided comment

2) Provide a method to change methods/variables to the most restricted access modifier (while running step 1 above 1st).

3) Provide a method to change all methods that can be made "static" into static method.  For example, method A only
depends on method B, and both are not static.  However, because B can be changed to be static, so A can also be changed
into static.

Item 1 should work on 1 file or selected files/projects
Item 2 should work on a single method, single class, selected files or project
Item 3 should work on selected method (which could cascade out to others), selected files (which could also cascade out)
or project.
Comment 1 _ wadechandler 2007-07-06 18:18:00 UTC
Vi, I would probably set each of these up as separate RFEs. Each one looks like it could get complicated. For instance,
the static method thing or #3...would have to make sure nothing inside used instance fields, methods, or classes etc.
Just an FYI to help split it up a bit for who ever might end up working on them. Maybe you can keep this as an overall
issue or something to track your refactoring ideas and break them down.