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.
import org.netbeans.modules.java.hints.infrastructure.ErrorHintsProvider;
import org.openide.util.NbBundle;
import static org.netbeans.modules.java.hints.errors.Utilities.isEnhancedForLoopIdentifier;
import org.netbeans.spi.editor.hints.EnhancedFix;
/**
*
* @author Jan Lahoda
*/
public class AddParameterOrLocalFix implements Fix {
public class AddParameterOrLocalFix implements EnhancedFix {
private FileObject file;
private TypeMirrorHandle type;
return hash;
}
@Override
public CharSequence getSortText() {
//see usage at org.netbeans.modules.editor.hints.FixData.getSortText(org.netbeans.spi.editor.hints.Fix):java.lang.CharSequence
//creates ordering top to bottom: create local variable>create field>create parameter
//see org.netbeans.modules.java.hints.errors.CreateFieldFix.getSortText():java.lang.CharSequence
if (parameter) {
return "Create 7000 " + getText();
} else {
return "Create 5000 " + getText();
import org.netbeans.api.java.source.WorkingCopy;
import org.netbeans.spi.editor.hints.ChangeInfo;
import org.netbeans.spi.editor.hints.Fix;
import org.openide.filesystems.FileObject;
public final class CreateFieldFix implements Fix {
public final class CreateFieldFix implements EnhancedFix {
private FileObject targetFile;
private ElementHandle<TypeElement> target;
//see org.netbeans.modules.java.hints.errors.AddParameterOrLocalFix.getSortText():java.lang.CharSequence
return "Create 6000 " + getText();