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 147655 - Alt+Enter offers duplicate options when the class doesn't exist
Summary: Alt+Enter offers duplicate options when the class doesn't exist
Status: RESOLVED DUPLICATE of bug 140935
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-18 20:19 UTC by rdelaplante
Modified: 2008-09-19 09:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (54.79 KB, image/png)
2008-09-18 20:20 UTC, rdelaplante
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rdelaplante 2008-09-18 20:19:30 UTC
I have a Maven2 project in NB 6.5 200809140201.  I am creating a new junit test case.  I typed:

SettingsService service = new SettingsService();

That object doesn't exist yet.  I put my cursor over the second SettingsService (after new) and pressed alt enter.  Code
completion offered to create a class for this non-existent object twice.  When I tried both, they both did the same
thing. They created a new class in the same package in the unit test.  I was hoping that one of them would create the
class in my main project instead of in tests.
Comment 1 rdelaplante 2008-09-18 20:20:01 UTC
Created attachment 70119 [details]
screenshot
Comment 2 rdelaplante 2008-09-18 20:22:31 UTC
This might not be a bug.  Maybe it shows each item twice in code completion because I used that class that doesn't yet
exist twice on the line. 
Comment 3 Jiri Prox 2008-09-19 09:36:47 UTC
Actually the hints are not the same, one creates only the class and the second creates class with constructor. The hints
should be merged to one or named differently anyway.

*** This issue has been marked as a duplicate of 140935 ***