mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
Generated Code View is broken see https://bugs.eclipse.org/bugs/show_bug.cgi?id=399465
Change-Id: Id9b6b81b20a88f1cabd2801b092983a1107f294e
This commit is contained in:
parent
c08a03295a
commit
2e08706f69
2 changed files with 11 additions and 2 deletions
|
@ -19,8 +19,12 @@ public class DefaultTraceURIConverter implements ITraceURIConverter {
|
|||
|
||||
public URI getURIForTrace(XtextResource context) {
|
||||
URI uri = context.getURI();
|
||||
return getURIForTrace(uri);
|
||||
}
|
||||
|
||||
public URI getURIForTrace(URI uri) {
|
||||
if (uri.isPlatform()) {
|
||||
// create a URI that is relative to the contained project.
|
||||
// create a URI that is relative to the contained projects.
|
||||
List<String> segments = uri.segmentsList().subList(2, uri.segmentCount());
|
||||
return URI.createHierarchicalURI(segments.toArray(new String[segments.size()]), null, null);
|
||||
}
|
||||
|
@ -44,5 +48,4 @@ public class DefaultTraceURIConverter implements ITraceURIConverter {
|
|||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.google.inject.ImplementedBy;
|
|||
* environments outside of the JARs, such as project name and source folders.
|
||||
*
|
||||
* @author Moritz Eysholdt - Initial contribution and API
|
||||
* @author Holger Schill
|
||||
*/
|
||||
@ImplementedBy(DefaultTraceURIConverter.class)
|
||||
public interface ITraceURIConverter {
|
||||
|
@ -27,4 +28,9 @@ public interface ITraceURIConverter {
|
|||
*/
|
||||
URI getURIForTrace(XtextResource context);
|
||||
|
||||
/**
|
||||
* Converts an absolute URI into a format that can be persisted in a trace file.
|
||||
*/
|
||||
URI getURIForTrace(URI uri);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue