1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 403409. Organize Includes throws IllegalStateException

This commit is contained in:
Sergey Prigogin 2013-03-14 22:50:57 -07:00
parent 48c9cc0b73
commit 41522141d9

View file

@ -965,13 +965,15 @@ public class IncludeOrganizer {
break;
}
}
IPath header = fHeaderChooser.chooseHeader(request.getBinding().getName(), candidatePaths);
if (header == null)
throw new OperationCanceledException();
request.resolve(header);
if (!fContext.isAlreadyIncluded(header))
fContext.addHeaderToInclude(header);
if (!request.isResolved()) {
IPath header = fHeaderChooser.chooseHeader(request.getBinding().getName(), candidatePaths);
if (header == null)
throw new OperationCanceledException();
request.resolve(header);
if (!fContext.isAlreadyIncluded(header))
fContext.addHeaderToInclude(header);
}
}
}
}