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 258853 - No nested annotations imports fixed with Import Classes refactoring
Summary: No nested annotations imports fixed with Import Classes refactoring
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-15 10:18 UTC by Maksim Khramov
Modified: 2016-07-19 01:43 UTC (History)
0 users

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 Maksim Khramov 2016-04-15 10:18:58 UTC
Product Version: NetBeans IDE Dev (Build 201604150001)
Java: 1.8.0_77; Java HotSpot(TM) 64-Bit Server VM 25.77-b03

Steps to reproduce:

Imagine we have one Tess Suite class annotated with @RunWith(Suite.class)
Class also have 2 imports 

import org.junit.runner.RunWith;
import org.junit.runners.Suite;

Now create new empty java class and copy and paste annotation from first one to new one.
The Import Classes dialog appeats but in contains only one unresolved import:
orj.junit.runner.RunWith

second import from original class is missed
Comment 1 Svata Dedic 2016-07-18 13:23:59 UTC
the annotation value= was skipped, since the assignment was marked as synthetic. Must check that the assigned expression is real and traverse it in that case.

Fixed in jet-main#009c4d18e0a0
Comment 2 Quality Engineering 2016-07-19 01:43:32 UTC
Integrated into 'main-silver', will be available in build *201607190002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/009c4d18e0a0
User: Svata Dedic <sdedic@netbeans.org>
Log: #258853: import classes from expression assinged to "value" annotation attribute