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 253018 - class modifier when using create class from hints
Summary: class modifier when using create class from hints
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 10:00 UTC by busbus
Modified: 2016-11-25 04:04 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 busbus 2015-06-16 10:00:59 UTC
Hi,

I don't if it's a bug or implementation choice but, every I'm using "create class X in package aaa.bbb" the newly created class has no modifier, it is package visible. Is it possible to make the class public by default, or better, give user the choice ?

Example :

public interface A {
    B createB(); //B doesn't exist yet.
}

The IDE tells me that B doesn't exists. So I'm using alt+enter, and choose "create class B in package..." then the IDE "redirects" to B after its creation. This class is as follow :

package foo.bar;

class B {

}

I would like at least to see this :

[public] class B {

}
Comment 1 Svata Dedic 2016-07-28 09:53:37 UTC
OK, the result will be consistent with the (default) class template which also creates public classes.

Fixed in jet-main#d84abb819555
Comment 2 Quality Engineering 2016-08-11 01:56:40 UTC
Integrated into 'main-silver', will be available in build *201608110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/d84abb819555
User: Svata Dedic <sdedic@netbeans.org>
Log: #253018: modifiers of toplevel classes made consistent with default template
Comment 3 Quality Engineering 2016-11-25 04:04:57 UTC
Integrated into 'main-silver', will be available in build *201611250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/bf9295593921
User: Svata Dedic <sdedic@netbeans.org>
Log: #253018: corrected tests