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

Summary: Convert to static import do not convert all occurences
Product: java Reporter: Chiana
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: fommil
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:

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.