3

I'm trying to find a list of all the functions which have no usage withing a JavaFX application on Netbeans (8.0.2). You can find usages by right clicking any function and selecting the option "Find Usages" or by using the shortcut Alt + F7.

Is there an alternate function which will search through a whole project, or even just one class, to find the usages of the functions within (preferably those not called). Simple reasoning behind this is to save a bit of time. Thanks.

  • 1
    Do you mean 'Find all the usages of a particular class's methods'? You can use the same 'Find Usages' functionality on the class (right-click on the name of the class). – bradimus Mar 23 '16 at 14:30
  • No the methods within a class - for example, I implemented some decrementSomeValue() type methods which haven't been used. It would be nice to be able to find all of these at once. –  Mar 23 '16 at 14:36
  • Save a bit of time compared to what? What makes you think an altternative even exists, let alone that it would be faster? How many times do you really think developers implement the same feature? A slow way and a secret fast way? Please. – user207421 Mar 28 '16 at 10:15

1 Answers1

2

There are two ways: 1) As you said "Find Usage" it should list all usages within class and whole project, if it is not listing any usage it means it is not used in the given project.

2) You can use general search to check if a function is called/not called. Just right click on the project and click find then enter the method to search whole project, it will search whole project including your non java text files.

Nadeem Shukoor
  • 323
  • 2
  • 4
  • 15