try {
Location _location = iu.getLocation();
String _uri = _location.getUri();
java.net.URI _uRI = new java.net.URI(_uri);
NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
final IMetadataRepository metadataRepository = repositoryManager.loadRepository(_uRI, _nullProgressMonitor);
String _iD = iu.getID();
IQuery<IInstallableUnit> _createIUQuery = QueryUtil.createIUQuery(_iD);
NullProgressMonitor _nullProgressMonitor_1 = new NullProgressMonitor();
IQueryResult<IInstallableUnit> _query = metadataRepository.query(_createIUQuery, _nullProgressMonitor_1);
final Set<IInstallableUnit> idResults = _query.toUnmodifiableSet();
boolean _isEmpty = idResults.isEmpty();
if (_isEmpty) {
StringConcatenation _builder = new StringConcatenation();
_builder.append("No installable unit with ID \'");
String _iD_1 = iu.getID();
_builder.append(_iD_1, "");
_builder.append("\' can be found in \'");
Location _location_1 = iu.getLocation();
String _uri_1 = _location_1.getUri();
_builder.append(_uri_1, "");
_builder.append("\'.");
this.error(_builder.toString(), iu, TargetPlatformPackage.Literals.IU__ID, TargetPlatformValidator.CHECK__IU_IN_LOCATION);
} else {
boolean _and = false;
String _version = iu.getVersion();
boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(_version);
boolean _not = (!_isNullOrEmpty);
if (!_not) {
_and = false;
} else {
String _version_1 = iu.getVersion();
boolean _equals = "lazy".equals(_version_1);
boolean _not_1 = (!_equals);
_and = _not_1;
}
if (_and) {
String _iD_2 = iu.getID();
String _version_2 = iu.getVersion();
VersionRange _versionRange = new VersionRange(_version_2);
IQuery<IInstallableUnit> _createQuery = QueryUtil.createQuery("latest(x | x.id == $0 && x.version ~= $1)", _iD_2, _versionRange);
NullProgressMonitor _nullProgressMonitor_2 = new NullProgressMonitor();
final IQueryResult<IInstallableUnit> versionResult = metadataRepository.query(_createQuery, _nullProgressMonitor_2);
boolean _isEmpty_1 = versionResult.isEmpty();
if (_isEmpty_1) {
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("No installable unit with ID \'");
String _iD_3 = iu.getID();