use of org.eclipse.xtext.xtext.generator.MweIssues in project xtext-core by eclipse.
the class XtextGenerator method checkConfigurationInternal.
@Override
protected void checkConfigurationInternal(final Issues issues) {
this.initialize();
final MweIssues generatorIssues = new MweIssues(this, issues);
this.configuration.checkConfiguration(generatorIssues);
final HashMap<String, Grammar> uris = new HashMap<String, Grammar>();
for (final XtextGeneratorLanguage language : this.languageConfigs) {
{
language.checkConfiguration(generatorIssues);
Iterable<GeneratedMetamodel> _filter = Iterables.<GeneratedMetamodel>filter(language.getGrammar().getMetamodelDeclarations(), GeneratedMetamodel.class);
for (final GeneratedMetamodel generatedMetamodel : _filter) {
{
final String nsURI = generatedMetamodel.getEPackage().getNsURI();
boolean _containsKey = uris.containsKey(nsURI);
if (_containsKey) {
String _name = uris.get(nsURI).getName();
String _plus = ((("Duplicate generated grammar with nsURI \'" + nsURI) + "\' in ") + _name);
String _plus_1 = (_plus + " and ");
String _name_1 = language.getGrammar().getName();
String _plus_2 = (_plus_1 + _name_1);
generatorIssues.addError(_plus_2);
} else {
uris.put(nsURI, language.getGrammar());
}
}
}
}
}
}
Aggregations