Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » ResourcesPlugin.getWorkspace() returning wrong location
ResourcesPlugin.getWorkspace() returning wrong location [message #926129] Fri, 28 September 2012 10:27 Go to next message
Ronan Crowley is currently offline Ronan CrowleyFriend
Messages: 10
Registered: June 2012
Junior Member
Hi All,

During application debugging, I have code that executes looking up project resources.

This is reporting an error because of the relative path of .

My current folder is detected as: C:\apps\Studio_180131_846\studio\studio

This is correct as eclipse.exe is here: C:\apps\Studio_180131_846\studio\studio\eclipse.exe

However, when I try to get the project location to read the resource that's where the problems start.

ResourcesPlugin.getWorkspace().getRoot().getLocation(); returns C:/Users/ronan.crowley/workspace
But, No such folder exists!

My real workspace is: C:\apps\Studio_180131_846\workspace\

Any suggestions?

Cheers,
Ronan
Re: ResourcesPlugin.getWorkspace() returning wrong location [message #926136 is a reply to message #926129] Fri, 28 September 2012 10:34 Go to previous messageGo to next message
Ronan Crowley is currently offline Ronan CrowleyFriend
Messages: 10
Registered: June 2012
Junior Member
Update to say, that when I launch the debugger the folder C:/Users/ronan.crowley/workspace is being created for some reason
Re: ResourcesPlugin.getWorkspace() returning wrong location [message #926189 is a reply to message #926136] Fri, 28 September 2012 11:47 Go to previous message
Ronan Crowley is currently offline Ronan CrowleyFriend
Messages: 10
Registered: June 2012
Junior Member
Looks like my issue was specific to the way my debugger launched.

I am launching a BIRT report debugger, which seems to behave a little differently than expected.

Anyway, there is a BIRT specific System property set

System.getProperty( "use.resource.folder" ) which returns the exact location I am interested in:
C:\apps\Studio_180131_846\workspace\DebuggerTestProject

Previous Topic:Why I need to add some .jar to the Java Build Path ?
Next Topic:Start editing Property in property view
Goto Forum:
  


Current Time: Thu Apr 25 08:41:45 GMT 2024

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

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

Back to the top