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 226447 - Pasting code into comments adds imports
Summary: Pasting code into comments adds imports
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Windows 7 x64
: P3 normal with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 226822 230490 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-21 09:55 UTC by unai
Modified: 2013-05-30 07:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unai 2013-02-21 09:55:02 UTC
Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_13
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

When pasting a class name into a comment, it asks the user to import it (despite it being just a comment): hitting Yes on the confirmation dialog actually adds the import (which is then highlighted as a warning since it's not used anywhere).

I'd say that such auto-importing feature shouldn't be triggered at all when pasting into a comment.
Comment 1 Jan Lahoda 2013-02-25 14:08:05 UTC
http://hg.netbeans.org/jet-main/rev/6ecf845c42ac
Comment 2 Quality Engineering 2013-02-26 05:23:26 UTC
Integrated into 'main-golden', will be available in build *201302252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6ecf845c42ac
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #226447: do not resolve imports when pasting into comments.
Comment 3 Jiri Prox 2013-03-01 13:41:50 UTC
*** Bug 226822 has been marked as a duplicate of this bug. ***
Comment 4 Jan Lahoda 2013-05-30 07:35:35 UTC
*** Bug 230490 has been marked as a duplicate of this bug. ***