Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Get co
Get co [message #532011] Thu, 06 May 2010 14:32 Go to next message
Eclipse UserFriend
My resource is show ( when I debug) like this:

F/mypackage/directory1/directory2/file.java

When I do recursive getParent() I finally end up with
F/

Is it possible to get the absolute path for this, F/ and make a resource out of it?

What is /F a representation of?

br,

//mike
Re: Get co [message #532020 is a reply to message #532011] Thu, 06 May 2010 15:05 Go to previous message
Eclipse UserFriend
It's usually L/my.project/folder/folder/file.java

The top, the directory that contains my.project, is call the workspace
root. ResourcePlugin.getWorkspace().getRoot() will return the
IWorkspaceRoot that points to the top level location.

Why do you want the absolute path to the root? You should never write
to this location. You can use the IResources API to create projects and
under them files and folders.

You can use OSGi org.eclipse.osgi.service.datalocation.Location or
org.eclipse.core.runtime.Plugin.getStateLocation() to get a
plugin-specific area you can write to using simple java I/O APIs

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm
Previous Topic:eclipse v3.4 API to Get List of Installed features
Next Topic:Handling Cut/Copy/Paste
Goto Forum:
  


Current Time: Tue Jul 22 20:47:49 EDT 2025

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

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

Back to the top