if (decls.isEmpty()) {
return;
}
PackageEntry currPackage= null;
ImportDeclaration curr= (ImportDeclaration) decls.get(0);
int currOffset= curr.getStartPosition();
int currLength= curr.getLength();
int currEndLine= root.getLineNumber(currOffset + currLength);
for (int i= 1; i < decls.size(); i++) {
boolean isStatic= curr.isStatic();
String name= getFullName(curr);
String packName= getQualifier(curr);
if (currPackage == null || currPackage.compareTo(packName, isStatic) != 0) {
currPackage= new PackageEntry(packName, null, isStatic);
this.packageEntries.add(currPackage);
}
ImportDeclaration next= (ImportDeclaration) decls.get(i);
int nextOffset= next.getStartPosition();
int nextLength= next.getLength();
int nextOffsetLine= root.getLineNumber(nextOffset);
int extendedStart = root.getExtendedStartPosition(curr);
int extendedLength = root.getExtendedLength(curr);
if (extendedStart < this.replaceRange.getOffset()) {