Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How to deresolve a URI
How to deresolve a URI [message #1753775] Fri, 10 February 2017 00:14 Go to next message
Eclipse UserFriend
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 01:07 Go to previous message
Eclipse UserFriend
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: Wed Jul 09 22:44:34 EDT 2025

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

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

Back to the top