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 26966
Collapse All | Expand All

(-)editor/libsrc/org/netbeans/editor/ext/java/JavaFastImport.java (+11 lines)
Lines 70-75 Link Here
70
        exp = Utilities.getSelectionOrIdentifier(target);
70
        exp = Utilities.getSelectionOrIdentifier(target);
71
        block = Utilities.getSelectionOrIdentifierBlock (target);
71
        block = Utilities.getSelectionOrIdentifierBlock (target);
72
        packageImport = getPackageImportSetting();
72
        packageImport = getPackageImportSetting();
73
        
74
        // Bugfix for #26966
75
        // Eliminating extra spaces
76
        String untrimmedExp = exp;
77
        exp = exp.trim();
78
        
79
        // Recalculating block beginning and ending
80
        int nLeadingSpaces = untrimmedExp.indexOf(exp);
81
        int nTrailingSpaces = untrimmedExp.length() - exp.length() - nLeadingSpaces;
82
        block[0] += nLeadingSpaces;
83
        block[1] -= nTrailingSpaces;
73
    }
84
    }
74
    
85
    
75
    private boolean getPackageImportSetting(){
86
    private boolean getPackageImportSetting(){

Return to bug 26966