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 195438 - Convert to static import do not convert all occurences
Summary: Convert to static import do not convert all occurences
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-14 08:06 UTC by Chiana
Modified: 2013-09-02 14:25 UTC (History)
1 user (show)

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 Chiana 2011-02-14 08:06:05 UTC
[ BUILD # : beta-2 ]
[ JDK VERSION : 1.6.23 ]

When using "Convert to static import" only the current statement is converted,
other usages of the same static method is not converted event if they are
tagged with the same hint.
Example;

import Output.println;
private void doSomeThing() {
  Output.println("This goes to output");
  Output.println("This too...");
}

Using one of the hints gives the following result;

import static Output.println;
import Output.println;
private void doSomeThing() {
  println("This goes to output.");
  Output.println("This too...");
}
Comment 1 Jan Lahoda 2011-02-23 09:34:58 UTC
Not a defect, IMO.