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 185724 - [69cat] Missing "Add package prefix"
Summary: [69cat] Missing "Add package prefix"
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2010-05-07 18:03 UTC by ulfzibis
Modified: 2014-05-14 12:29 UTC (History)
1 user (show)

See Also:
Exception Reporter:

Screen shot (16.50 KB, image/png)
2010-05-07 18:04 UTC, ulfzibis

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2010-05-07 18:03:01 UTC
[ BUILD # : 201005050200 ]
[ JDK VERSION : 1.6.* ]

See attachment ...

If I write in my code:
    ByteBuffer bb = ByteBuffer.allocate(cp);
code correction should offer to add the package prefix to have:
    java.nio.ByteBuffer bb = java.nio.ByteBuffer.allocate(cp);

Additionally the "Create class ByteBuffer in ..." is duplicated.
Comment 1 ulfzibis 2010-05-07 18:04:39 UTC
Created attachment 98652 [details]
Screen shot
Comment 2 Jan Lahoda 2010-05-10 12:58:03 UTC
I have fixed the duplicated fix:

Proposing fix with FQN is an enhancement, IMO. Not that Fast Import (Alt-Shift-I) allows to quickly add a fqn.
Comment 3 ulfzibis 2010-05-10 13:14:04 UTC
Because using a full class name is a very basic Java syntax,
much more reasonable/frequent, than "Create new class ...",
I'm still the opinion, the missing in the "error fix" suggestions, is a defect.
Comment 4 Quality Engineering 2010-05-12 04:14:25 UTC
Integrated into 'main-golden', will be available in build *201005112200* on (upload may still be in progress)