It's all about the answers!

Ask a question

Java API extending - how to get workspace root

Peter Moraza (481824) | asked Aug 20 '14, 4:02 p.m.
edited Aug 20 '14, 7:10 p.m.

Using RTC 4.0.3 Java API I am trying to load an existing workspace to download content from the stream. I am basing my code on the sample here:

My code fails at the following line with an IllegalStateException "Workspace is closed".

File workspaceRoot = ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();

I don't see documentation available for the ResourcesPlugin class. Is there a way to get a File workspace root object from a IWorkspaceConnection object?

A different build of the source from the Forum link above indicates that the DojoObject class is required. Can anyone point me to where I might be able to dowload the .jar for


One answer

permanent link
Tim Mok (6.6k38) | answered Aug 21 '14, 10:38 a.m.
That code is Eclipse API and is out of scope for RTC API.

However, the Javadoc for ResourcesPlugin#getWorkspace() says the workspace is not accessible after the resources plug-in has shutdown.

Your answer

Register or to post your answer.