We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=503309
The text was updated successfully, but these errors were encountered:
Here we install a project config on the resource set https://github.com/eclipse/xtext/blob/main/org.eclipse.xtend.core/src/org/eclipse/xtend/core/compiler/batch/XtendBatchCompiler.java#L412
That project config has enough information to provide source folders and the like - which allows to create a project relative path to the source file.
In the maven plugin, we should probably configure a proper project configuration provider that exposes the source folders etc to the languages, too.
https://github.com/eclipse/xtext/blob/main/org.eclipse.xtext.maven.plugin/src/main/java/org/eclipse/xtext/maven/AbstractXtextGeneratorMojo.java#L187
Sorry, something went wrong.
further hint: see what the org.eclipse.xtext.xbase.testing.CompilationTestHelper.resourceSet(Pair<String, ? extends CharSequence>...) does:
org.eclipse.xtext.xbase.testing.CompilationTestHelper.resourceSet(Pair<String, ? extends CharSequence>...)
public ResourceSet resourceSet(@SuppressWarnings("unchecked") Pair<String,? extends CharSequence> ...resources ) throws IOException { XtextResourceSet result = newResourceSetWithUTF8Encoding(); FileProjectConfig projectConfig = new FileProjectConfig(new File(workspaceRoot,PROJECT_NAME), PROJECT_NAME); projectConfig.addSourceFolder("src"); ProjectConfigAdapter.install(result, projectConfig); for (Pair<String, ? extends CharSequence> entry : resources) { URI uri = copyToWorkspace(getSourceFolderPath()+"/"+entry.getKey(), entry.getValue()); Resource resource = result.createResource(uri); if (resource == null) throw new IllegalStateException("Couldn't create resource for URI "+uri+". Resource.Factory not registered?"); resource.load(result.getLoadOptions()); } return result; }
@szarnekow Do you think this could be done/addressed directly in the StandaloneBuilder when we pass the sources?
StandaloneBuilder
Successfully merging a pull request may close this issue.
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=503309
The text was updated successfully, but these errors were encountered: