It's all about the answers!

Ask a question

Java API extending - how to get workspace root


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

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:

https://jazz.net/forum/questions/118483/rtc-v401-java-api-how-to-load-a-workspace-using-java-api

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 com.ibm.jdojo.lang.DojoObject?

Peter



One answer



permanent link
Tim Mok (6.6k38) | answered Aug 21 '14, 10:38 a.m.
JAZZ DEVELOPER
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.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.