[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: Refactoring question..
|
I agree this would be nice. If we have a way to flag unused imports and
unused arguments there ought to be a way to flag or identify unused methods
(and variables). You should file a feature request so your idea doesn't get
lost and others can comment on it.
Bob
"Kevin" <kduffey@xxxxxxxxxxxxx> wrote in message
news:avhtd5$3hn$1@xxxxxxxxxxxxxxxx
> Ok, so then, I think this would be a great feature to add! Definitely a
> large time saver, and should go under refactoring. It would be kewl if you
> could set up a feature to add various parts of refactoring and code
> formatting. For example, I'd love to run a "global" refactor/reformatter
> that would take out any unused methods, add/remove/clean up imports,
> reformat any code using Jalopy, etc. Sort of like a batch process that you
> can add various "macros" or commands to. Definitely would be a powerful
> addition to Eclipse, one that I don't think other tools even have. Yeah,
> sure, I could write a plugin, only I have no clue how to do such a thing
at
> this point, and little time to do so. I'd love to consider doing a plugin
> like this, just can't do it now, so throwing out the suggestion/idea if
> anyone else might want to pick up on it.
>
>
> "Adam Kiezun" <adam_kiezun@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:avhqmg$1hs$1@xxxxxxxxxxxxxxxx
> > > Is there any support to search a project for any methods never being
> > > called/used and generate some report or a list in the Task window that
> shows
> > > methods never being called?
> >
> > no, you have to select the method you want and perform a search manually
> >
> > > I have some "old" methods that no longer get
> > > called, but forgot to remove for one reason or another. It isn't
exactly
> > > easy to figure this out by looking through source. Two features that
> would
> > > be very helpful: 1) a "find/mark/remove" feature that you can
> right-click on
> > > any folder in Navigator or Package, that can search recursively in
every
> > > file and sub-folder to figure out if any methods are not being used.
> > > 2) A
> > > feature to allow you to select a method (either from the Package
window
> (or
> > > anywhere else) that you can expand a class and see its methods, or by
> > > highlighting a method name in an editor window) that can then scan the
> > > entire project to see if it is every called.
> >
> > select your method, search for references in the project
> >
> > a.
> >
> >
>
>