|
|
Re: Debugging a DSL with spaces in its path [message #1820749 is a reply to message #1820725] |
Tue, 28 January 2020 11:10 |
Steve Pearson Messages: 12 Registered: May 2014 |
Junior Member |
|
|
Xtext generates the traceRegion for this example in org.eclipse.xtext.builder.updateTraceInformation:
line 423: AbstractTraceRegion traceRegion = ((ITraceRegionProvider) contents).getTraceRegion()
CompletableTraceRegion [myOffset=0, myLength=4385, useForDebugging=false] associations={
LocationData [TextRegionWithLineInformation [0:51][lineNumber=0, endLineNumber=4]][path=aa%20bb/test2.proc]
} nestedRegions={
CompletableTraceRegion [myOffset=3631, myLength=215, useForDebugging=true] associations={
LocationData [TextRegionWithLineInformation [21:27][lineNumber=1, endLineNumber=3]][path=aa%20bb/test2.proc]
} nestedRegions={
CompletableTraceRegion [myOffset=3704, myLength=39, useForDebugging=true] associations={
LocationData [TextRegionWithLineInformation [33:11][lineNumber=2, endLineNumber=2]][path=aa%20bb/test2.proc]
}
}
}
There is a '%20' in the relative path to the DSL instead of a space: [path=aa%20bb/test2.proc].
This comes from a call to the DefaultTraceURIConverter org.eclipse.xtext.generator.trace.getURIForTrace which returns aa%20bb/test2.proc.
I overrode this method and the problem went away. So we have a workaround (albeit with Discouraged access).
In my version of org.eclipse.xtext.generator.trace.DefaultTraceURIConverter::getURIForTrace(IProjectConfig projectConfig, AbsoluteURI absoluteURI).
I pre-process your absoluteURI using EMF's URI.decode
AbsoluteURI decodedAbsoluteURI = new AbsoluteURI(URI.createURI(URI.decode(absoluteURI.getURI().toString())))
Is this a bug or is there a configuration I have missed?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.92999 seconds