Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to deresolve a URI
How to deresolve a URI [message #1753775] Fri, 10 February 2017 05:14 Go to next message
chris yo is currently offline chris yoFriend
Messages: 146
Registered: February 2013
Senior Member
How can I deresolve (get the relative path) of the URI without the base URI?

I have the URI of resource and I want to display the relative instead of the full path. My base URI shall be where the tool is executed.

I don't want to create a dummy to file to determine the base URI, it is a dirty workaround. Is there a method I can call that will give me the location where the tool is currently running?
Re: How to deresolve a URI [message #1753780 is a reply to message #1753775] Fri, 10 February 2017 06:07 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 29355
Registered: July 2009
Senior Member
Your question is a bit confusing and ambiguous. Of course a relative URI is necessarily relative to some base URI. So you can't deresolve an absolute (and hierarchical) URI except against some other absolute (and hierarchical) base URI.

You ask about "where the tool is executed" but it's not clear what you mean by that. Perhaps you mean the process's current working directory, i.e., System.getProperty("user.dir"). Of course you can create a file URI from this location and use that as a base URI against which to resolve. Failing that, you'll need to clarify what you mean by "where the tool is currently running" because I can't think of another interpretation of that.
Previous Topic:Adding definition in global scope provider
Next Topic:Standalone executable with multiple DSLs
Goto Forum:

Current Time: Mon May 28 01:17:56 GMT 2018

Powered by FUDForum. Page generated in 0.01611 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top