_builder.append(_join, "");
_builder.append("\' in \'");
final Function1<Location, String> _function_5 = new Function1<Location, String>() {
public String apply(final Location it) {
Resource _eResource = it.eResource();
URI _uRI = _eResource.getURI();
return _uRI.toString();
}
};
Iterable<String> _map_2 = IterableExtensions.<Location, String>map(externalLocationsWithConflictualID, _function_5);
Set<String> _set = IterableExtensions.<String>toSet(_map_2);
String _join_1 = IterableExtensions.join(_set, "\', \'");
_builder.append(_join_1, "");
_builder.append("\'.");
final String msg = _builder.toString();
final Function1<Location, Iterable<IncludeDeclaration>> _function_6 = new Function1<Location, Iterable<IncludeDeclaration>>() {
public Iterable<IncludeDeclaration> apply(final Location location) {
EList<IncludeDeclaration> _includes = targetPlatform.getIncludes();
final Function1<IncludeDeclaration, Boolean> _function = new Function1<IncludeDeclaration, Boolean>() {
public Boolean apply(final IncludeDeclaration it) {
boolean _xblockexpression = false;
{
final TargetPlatform direct = TargetPlatformValidator.this.indexBuilder.getImportedTargetPlatform(resource, it);
boolean _or = false;
EList<Location> _locations = direct.getLocations();
boolean _contains = _locations.contains(location);
if (_contains) {
_or = true;
} else {
LinkedList<TargetPlatform> _importedTargetPlatforms = TargetPlatformValidator.this.indexBuilder.getImportedTargetPlatforms(direct);
final Function1<TargetPlatform, EList<Location>> _function = new Function1<TargetPlatform, EList<Location>>() {
public EList<Location> apply(final TargetPlatform it) {
return it.getLocations();
}
};
List<EList<Location>> _map = ListExtensions.<TargetPlatform, EList<Location>>map(_importedTargetPlatforms, _function);
Iterable<Location> _flatten = Iterables.<Location>concat(_map);
Set<Location> _set = IterableExtensions.<Location>toSet(_flatten);
boolean _contains_1 = _set.contains(location);
_or = _contains_1;
}
_xblockexpression = _or;
}
return Boolean.valueOf(_xblockexpression);
}
};
return IterableExtensions.<IncludeDeclaration>filter(_includes, _function);
}
};
Iterable<Iterable<IncludeDeclaration>> _map_3 = IterableExtensions.<Location, Iterable<IncludeDeclaration>>map(externalLocationsWithConflictualID, _function_6);
Iterable<IncludeDeclaration> _flatten = Iterables.<IncludeDeclaration>concat(_map_3);
final Set<IncludeDeclaration> conflictualInclude = IterableExtensions.<IncludeDeclaration>toSet(_flatten);
final Procedure1<IncludeDeclaration> _function_7 = new Procedure1<IncludeDeclaration>() {
public void apply(final IncludeDeclaration it) {
TargetPlatformValidator.this.error(msg, it,
TargetPlatformPackage.Literals.INCLUDE_DECLARATION__IMPORT_URI,
TargetPlatformValidator.CHECK__CONFLICTUAL_ID__BETWEEN_INCLUDED_LOCATION);
}
};
IterableExtensions.<IncludeDeclaration>forEach(conflictualInclude, _function_7);
}
int _size_1 = externalIDs.size();
boolean _equals = (_size_1 == 1);
if (_equals) {
final Sets.SetView<String> diff = Sets.<String>symmetricDifference(externalIDs, internalIDs);
boolean _isEmpty = diff.isEmpty();
boolean _not = (!_isEmpty);
if (_not) {
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("The ID for location \'");
_builder_1.append(locationURI, "");
_builder_1.append("\' must be unique across included target platforms and the current one. Found \'");
String _head = IterableExtensions.<String>head(externalIDs);
_builder_1.append(_head, "");
_builder_1.append("\' in \'");
final Function1<Location, String> _function_8 = new Function1<Location, String>() {
public String apply(final Location it) {
Resource _eResource = it.eResource();
URI _uRI = _eResource.getURI();
return _uRI.toString();
}
};
Iterable<String> _map_4 = IterableExtensions.<Location, String>map(externalLocations, _function_8);
Set<String> _set_1 = IterableExtensions.<String>toSet(_map_4);
String _join_2 = IterableExtensions.join(_set_1, "\', \'");