importURI with Xtext 2.14 and the new generator [message #1790023] |
Sun, 03 June 2018 06:59  |
Eclipse User |
|
|
|
Hello,
After migrating to Xtext 2.14 and the new generator, importURI is not working as expected anymore.
I have 2 Xtext languages a and b. Runtime environment is Eclipse. Within the same workspace file fileA.a in projectA imports a file fileB.b from projectB like
import "project://projectB/fileB.b";
Both projects are configured with "Xtext Nature", project A references project B.
I get the error "- Imported resource could not be found.". When I move fileB.b to projectA (and change the import accordingly), the import works.
In the grammar A.xtext I have:
Import:
'import' importURI=STRING ';';
In the workflow GenerateA.mwe I have these fragments (according to what I found here in the forum, the documentation, and elsewhere):
fragment = org.eclipse.xtext.generator.adapter.FragmentAdapter {
fragment = org.eclipse.xtext.generator.scoping.ImportURIScopingFragment {}
fragment = org.eclipse.xtext.generator.exporting.SimpleNamesFragment {}
}
// fragment = exporting.SimpleNamesFragment2 {}
fragment = grammarAccess.GrammarAccessFragment2 {}
fragment = ecore.EMFGeneratorFragment2 {}
fragment = serializer.SerializerFragment2 {
generateStub = false
}
fragment = resourceFactory.ResourceFactoryFragment2 {}
fragment = parser.antlr.XtextAntlrGeneratorFragment2 {}
fragment = validation.ValidatorFragment2 {
composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
// composedCheck = "org.bricks.gdl.validation.GdlValidator"
}
// fragment = scoping.ImportNamespacesScopingFragment2 {}
// fragment = exporting.QualifiedNamesFragment2 {}
fragment = builder.BuilderIntegrationFragment2 {}
fragment = generator.GeneratorFragment2 {}
fragment = formatting.Formatter2Fragment2 {}
fragment = ui.labeling.LabelProviderFragment2 {}
fragment = ui.outline.QuickOutlineFragment2 {}
fragment = ui.outline.OutlineTreeProviderFragment2 {}
fragment = ui.quickfix.QuickfixProviderFragment2 {}
fragment = ui.contentAssist.ContentAssistFragment2 {}
fragment = junit.JUnitFragment {
junitVersion = "5"
}
fragment = ui.refactoring.RefactorElementNameFragment2 {}
// fragment = types.TypesGeneratorFragment2 {}
// fragment = xbase.XtypeGeneratorFragment2 {}
// fragment = xbase.XbaseGeneratorFragment2 {}
fragment = ui.templates.CodetemplatesGeneratorFragment2 {}
fragment = ui.compare.CompareFragment2 {}
fragment = idea.parser.antlr.XtextAntlrIDEAGeneratorFragment {}
fragment = idea.IdeaPluginGenerator {}
fragment = web.WebIntegrationFragment {
framework = "Ace"
}
fragment = ui.projectWizard.TemplateProjectWizardFragment {}
fragment = ui.fileWizard.TemplateFileWizardFragment {}
There is no changes to scoping or linking implemented (as this was not needed before)
What am I missing to get the cross-project import work?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07743 seconds