Index: editor/libsrc/org/netbeans/editor/ext/java/JavaFastImport.java =================================================================== RCS file: /cvs/editor/libsrc/org/netbeans/editor/ext/java/JavaFastImport.java,v --- editor/libsrc/org/netbeans/editor/ext/java/JavaFastImport.java 24 Aug 2002 10:31:35 -0000 1.10 +++ editor/libsrc/org/netbeans/editor/ext/java/JavaFastImport.java 22 Nov 2002 04:05:27 -0000 @@ -70,6 +70,17 @@ exp = Utilities.getSelectionOrIdentifier(target); block = Utilities.getSelectionOrIdentifierBlock (target); packageImport = getPackageImportSetting(); + + // Bugfix for #26966 + // Eliminating extra spaces + String untrimmedExp = exp; + exp = exp.trim(); + + // Recalculating block beginning and ending + int nLeadingSpaces = untrimmedExp.indexOf(exp); + int nTrailingSpaces = untrimmedExp.length() - exp.length() - nLeadingSpaces; + block[0] += nLeadingSpaces; + block[1] -= nTrailingSpaces; } private boolean getPackageImportSetting(){