Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 138221 - Propose auto-modify of access modifier in quickfix
Propose auto-modify of access modifier in quickfix
Status: NEW
Product: java
Classification: Unclassified
Component: Editor
All All
: P3 with 2 votes (vote)
Assigned To: Dusan Balek
Depends on:
  Show dependency treegraph
Reported: 2008-06-25 14:00 UTC by locked
Modified: 2013-09-02 14:22 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description locked 2008-06-25 14:00:52 UTC
When trying to access a class's field or method that is not yet visible to the caller, a lightbulb appears at the side
of the editor saying: "cannot find symbol" (well - exactly).

The proposed quickfix is "Create Constructor .... in [classname]" (constructor in my case right now).

It'd be helpful if another quickfix like "change access modifier to public/protected" would be proposed, if the
field/method already exists - but is not yet visible (Eclipse btw. has such a feature which I regard as quite helpful).

Very useful if you usually keep lots of methods (package)private and later realize, that you need access to some methods.
Comment 1 softwarevisualization 2009-10-30 17:17:56 UTC
I think the following is related to this same RFE:


class Class1 extends Class2

where Class2 is well formed but not public and in a package different from Class1.

So, technically, Class1 can't extend Class2, since Class2 isn't public i.e. it won't compile.

If I try to goto (CTRL + LeftClick) Class2 (for the purpose of making it public) NB tells me it can't goto Class2.

Essentially, my reaction to this failure is- look NB, if you know Class2 isn't public then you know damn well what class
I am asking you to go to, so go to it....NOW.

In this case, I feel like NB is working against me and not with me to help me get my work done as it ought to.

"Other" IDEs goto the class under these circumstances and NB should also.
Comment 2 locked 2011-05-30 15:02:22 UTC
Exactly, you'er describing the same issue on class level while I was just on the method level.

Should the version dropdown be set to 7 as it still is an issue?

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo