You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Mitch Claborn <in...@hatcherymanager.com> on 2025/03/12 21:14:41 UTC

Find unused private methods in a class

Does NB have any way to easily find unused private methods?

Mitch Claborn
HatcheryManager.com - Complete Hatchery Management System
info@hatcherymanager.com
hatcherymanager.com
schedule a meeting <https://calendar.app.google/Eozsu4Uv1xpBY31c7>

Re: Find unused private methods in a class

Posted by Mitch Claborn <in...@hatcherymanager.com>.
Perfect. Thanks Ernie.

Mitch



On Thu, Mar 13, 2025 at 10:26 AM Ernie Rael <er...@raelity.com> wrote:

> On 25/03/13 6:24 AM, Mitch Claborn wrote:
>
> I do see the highlighted methods (wavy underline of the method name). I'm
> not seeing any light bulb in the gutter.
> I was hoping for something that would show a list of the unused methods in
> a given class, package or project. Maybe something in Source > Inspect.
>
> Doing "Source > Inspect > SingleInspection > Browse" and in "Search" enter
> "unused" then "Unused Element" is listed under "Probable Bugs". This should
> correspond to the hint you mention.
>
> You can also get to it with Source > Inspect > Configuration > Default >
> Manage... > NetBeans Java Hints"
>
> -ernie
>
>
>
> Mitch
>
>
> On Wed, Mar 12, 2025 at 11:23 PM Scott Palmer <sw...@gmail.com> wrote:
>
>> They are automatically highlighted.  You should see a lightbulb in the
>> gutter too.
>>
>> Scott
>>
>> On Mar 12, 2025, at 5:15 PM, Mitch Claborn <in...@hatcherymanager.com>
>> wrote:
>>
>> 
>> Does NB have any way to easily find unused private methods?
>>
>> Mitch Claborn
>> HatcheryManager.com - Complete Hatchery Management System
>> info@hatcherymanager.com
>> hatcherymanager.com
>> schedule a meeting <https://calendar.app.google/Eozsu4Uv1xpBY31c7>
>>
>>
>

Re: Find unused private methods in a class

Posted by Ernie Rael <er...@raelity.com>.
On 25/03/13 6:24 AM, Mitch Claborn wrote:
> I do see the highlighted methods (wavy underline of the method name). 
> I'm not seeing any light bulb in the gutter.
> I was hoping for something that would show a list of the unused 
> methods in a given class, package or project. Maybe something in 
> Source > Inspect.

Doing "Source > Inspect > SingleInspection > Browse" and in "Search" 
enter "unused" then "Unused Element" is listed under "Probable Bugs". 
This should correspond to the hint you mention.

You can also get to it with Source > Inspect > Configuration > Default > 
Manage... > NetBeans Java Hints"

-ernie


>
> Mitch
>
>
> On Wed, Mar 12, 2025 at 11:23 PM Scott Palmer <sw...@gmail.com> wrote:
>
>     They are automatically highlighted.  You should see a lightbulb in
>     the gutter too.
>
>     Scott
>
>>     On Mar 12, 2025, at 5:15 PM, Mitch Claborn
>>     <in...@hatcherymanager.com> wrote:
>>
>>     
>>     Does NB have any way to easily find unused private methods?
>>
>>     Mitch Claborn
>>     HatcheryManager.com - Complete Hatchery Management System
>>     info@hatcherymanager.com
>>     hatcherymanager.com <https://hatcherymanager.com/>
>>     schedule a meeting <https://calendar.app.google/Eozsu4Uv1xpBY31c7>
>

Re: Find unused private methods in a class

Posted by Mitch Claborn <in...@hatcherymanager.com>.
I do see the highlighted methods (wavy underline of the method name). I'm
not seeing any light bulb in the gutter.
I was hoping for something that would show a list of the unused methods in
a given class, package or project. Maybe something in Source > Inspect.

Mitch


On Wed, Mar 12, 2025 at 11:23 PM Scott Palmer <sw...@gmail.com> wrote:

> They are automatically highlighted.  You should see a lightbulb in the
> gutter too.
>
> Scott
>
> On Mar 12, 2025, at 5:15 PM, Mitch Claborn <in...@hatcherymanager.com>
> wrote:
>
> 
> Does NB have any way to easily find unused private methods?
>
> Mitch Claborn
> HatcheryManager.com - Complete Hatchery Management System
> info@hatcherymanager.com
> hatcherymanager.com
> schedule a meeting <https://calendar.app.google/Eozsu4Uv1xpBY31c7>
>
>