Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to get eclipse runtime application exact location?(How to get eclipse runtime application exact location?)
How to get eclipse runtime application exact location? [message #1731014] Mon, 02 May 2016 08:25 Go to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Hi,

I am using below code to get the run time eclipse application location


val File workspaceDirectory = workspace.getRoot().getLocation().toFile()
println("Work space directory ::::::::"+workspaceDirectory)

Output ::

E:\WORKSPACES\runtime-EclipseApplication

But how can I get exact location of runtime-EclipseApplication?

Something like this ::

E:\WORKSPACES\MyDSLEditor
Re: How to get eclipse runtime application exact location? [message #1731016 is a reply to message #1731014] Mon, 02 May 2016 08:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
still the same answer

IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(resource.getURI().toPlatformString(true)));
System.err.println(file.getRawLocation())


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How to get eclipse runtime application exact location? [message #1731021 is a reply to message #1731016] Mon, 02 May 2016 10:09 Go to previous messageGo to next message
Sachin Samaram is currently offline Sachin SamaramFriend
Messages: 271
Registered: April 2016
Senior Member
Yes I know this but I want path upto the workspace root directory not file location
Re: How to get eclipse runtime application exact location? [message #1731022 is a reply to message #1731021] Mon, 02 May 2016 10:22 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Sachin Samaram <forums-noreply@xxxxxxxx> wrote:
> Yes I know this but I want path upto the workspace root directory not file location
>
>

The same should work with the iworkspaceroot
As well (getting the rawlocation)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Incorporating Validations at Runtime
Next Topic:Showing error on run time application
Goto Forum:
  


Current Time: Fri Apr 19 19:24:16 GMT 2024

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

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

Back to the top