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.

View | Details | Raw Unified | Return to bug 231133
Collapse All | Expand All

(-)java.hints/src/org/netbeans/modules/java/hints/errors/AddParameterOrLocalFix.java (-1 / +14 lines)
Lines 84-96 Link Here
84
import org.netbeans.modules.java.hints.infrastructure.ErrorHintsProvider;
84
import org.netbeans.modules.java.hints.infrastructure.ErrorHintsProvider;
85
import org.openide.util.NbBundle;
85
import org.openide.util.NbBundle;
86
import static org.netbeans.modules.java.hints.errors.Utilities.isEnhancedForLoopIdentifier;
86
import static org.netbeans.modules.java.hints.errors.Utilities.isEnhancedForLoopIdentifier;
87
import org.netbeans.spi.editor.hints.EnhancedFix;
87
88
88
89
89
/**
90
/**
90
 *
91
 *
91
 * @author Jan Lahoda
92
 * @author Jan Lahoda
92
 */
93
 */
93
public class AddParameterOrLocalFix implements Fix {
94
public class AddParameterOrLocalFix implements EnhancedFix {
94
    
95
    
95
    private FileObject file;
96
    private FileObject file;
96
    private TypeMirrorHandle type;
97
    private TypeMirrorHandle type;
Lines 487-491 Link Here
487
        return hash;
488
        return hash;
488
    }
489
    }
489
    
490
    
491
    @Override
492
    public CharSequence getSortText() {
493
        //see usage at org.netbeans.modules.editor.hints.FixData.getSortText(org.netbeans.spi.editor.hints.Fix):java.lang.CharSequence
490
    
494
    
495
        //creates ordering top to bottom: create local variable>create field>create parameter
496
        //see org.netbeans.modules.java.hints.errors.CreateFieldFix.getSortText():java.lang.CharSequence
497
        if (parameter) {
498
            return "Create 7000 " + getText();
499
        } else {
500
            return "Create 5000 " + getText();
491
}
501
}
502
    }
503
    
504
}
(-)java.hints/src/org/netbeans/modules/java/hints/errors/CreateFieldFix.java (-1 / +9 lines)
Lines 52-57 Link Here
52
import org.netbeans.api.java.source.WorkingCopy;
52
import org.netbeans.api.java.source.WorkingCopy;
53
import org.netbeans.modules.java.hints.infrastructure.ErrorHintsProvider;
53
import org.netbeans.modules.java.hints.infrastructure.ErrorHintsProvider;
54
import org.netbeans.spi.editor.hints.ChangeInfo;
54
import org.netbeans.spi.editor.hints.ChangeInfo;
55
import org.netbeans.spi.editor.hints.EnhancedFix;
55
import org.netbeans.spi.editor.hints.Fix;
56
import org.netbeans.spi.editor.hints.Fix;
56
import org.openide.filesystems.FileObject;
57
import org.openide.filesystems.FileObject;
57
import org.openide.util.NbBundle;
58
import org.openide.util.NbBundle;
Lines 60-66 Link Here
60
 *
61
 *
61
 * @author Jan Lahoda
62
 * @author Jan Lahoda
62
 */
63
 */
63
public final class CreateFieldFix implements Fix {
64
public final class CreateFieldFix implements EnhancedFix {
64
    
65
    
65
    private FileObject targetFile;
66
    private FileObject targetFile;
66
    private ElementHandle<TypeElement> target;
67
    private ElementHandle<TypeElement> target;
Lines 169-173 Link Here
169
        return hash;
170
        return hash;
170
    }
171
    }
171
    
172
    
173
    @Override
174
    public CharSequence getSortText() {
175
        //see usage at org.netbeans.modules.editor.hints.FixData.getSortText(org.netbeans.spi.editor.hints.Fix):java.lang.CharSequence
172
    
176
    
177
        //creates ordering top to bottom: create local variable>create field>create parameter
178
        //see org.netbeans.modules.java.hints.errors.AddParameterOrLocalFix.getSortText():java.lang.CharSequence
179
        return "Create 6000 " + getText();
173
}
180
}
181
}

Return to bug 231133