Community
Participate
Working Groups
When building a maven module which uses xtext-maven-plugin for code generation the created *java._trace files contains a String like "Jenkins/workspace/emulator%20nightly%20build/emulator.topology/src/main/java/com/.." When building it in eclipse the same *java._trace contains "com/.." I have no idea how this trace thing works, but it seems to be the cause of my problem, that in some cases the F3 (Open Declaration) does not work. When I debug into org.eclipse.xtext.xbase.ui.editor.XbaseResourceForEditorInputFactory.createResource(IClassFile classFile) I get an uri "C:/../maven/../emulator.topology-0.0.10-SNAPSHOT-sources.jar!/Jenkins/workspace/emulator%20nightly%20build/emulator.topology/src/main/java/com/.." which does not exists. see: https://www.eclipse.org/forums/index.php/t/623973/
I've answered in the forum: I was wondering whether the source of the problem is the use of an absolute path, e.g., <outputDirectory>${basedir}/src-gen</outputDirectory> could you please check that?
see also https://www.eclipse.org/forums/index.php/t/1111185/
see also https://www.eclipse.org/forums/index.php/t/1111185/ the problem is xtend does https://github.com/eclipse/xtext-xtend/blob/c4c606b4e822a4a78fb859f9552dd4a70c6c5029/org.eclipse.xtend.core/src/org/eclipse/xtend/core/compiler/batch/XtendBatchCompiler.java#L418 the xtext-maven-plugin uses StandaloneBuild which does not create a specific project config so that https://github.com/eclipse/xtext-core/blob/0a6606ee5091c48a716f74932bb6dd693cbee227/org.eclipse.xtext/src/org/eclipse/xtext/generator/trace/DefaultTraceURIConverter.java will run into fallback code paths
And there's no way to specify any project configuration when executing xtext-maven-plugin, is there?
Finally fixed in https://github.com/eclipse/xtext/pull/3044