Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » OSGi application with a workspace
OSGi application with a workspace [message #123358] Fri, 19 December 2008 23:06 Go to next message
Scott Cowan is currently offline Scott CowanFriend
Messages: 12
Registered: July 2009
Junior Member
Does anyone have any experience creating an OSGi framework application
that requires a workspace? Is it possible? Can anyone list the pros/cons?

In my first attempt, my OSGi framework launch configuration includes
org.eclipse.core.resources and all of its dependencies, so the bundles
validate with no problems. It also specifies the "-ws" program argument
with the value of a qualified path to a workspace (since the ${target.ws}
variable is unavailable).

When my bundle finally gets to access the workspace I find that,

ResourcesPlugin.getWorkspace().getRoot().getProjects() returns an empty
IProject[0] array.

I also tried setting the "auto-start" to true for
org.eclipse.core.resources, but at this point I've run out of ideas and
I'm guessing. I'm developing in Eclipse 3.4, but my target platform is
Eclipse 3.4.1.

Thanks in advance,
Scott
Re: OSGi application with a workspace [message #123425 is a reply to message #123358] Mon, 22 December 2008 18:19 Go to previous messageGo to next message
Gunnar Wagenknecht is currently offline Gunnar WagenknechtFriend
Messages: 486
Registered: July 2009
Location: San Francisco ✈ Germany
Senior Member

Scott Cowan schrieb:
> [...] It also specifies the "-ws" program argument

The "-ws" argument is used for setting the windowing system technology
(eg. win32/gtk,etc.). You probably mean the "-data" argument. Check the
Eclipse help. There is a page which explains all the possible options.

> When my bundle finally gets to access the workspace I find that,
>
> ResourcesPlugin.getWorkspace().getRoot().getProjects() returns an empty
> IProject[0] array.

It probably points to an empty folder. You might want to test a little
bit more, create projects and use #getLocation to unveil the real file
system location.

-Gunnar


--
Gunnar Wagenknecht
gunnar@wagenknecht.org
http://wagenknecht.org/
Re: OSGi application with a workspace [message #123462 is a reply to message #123425] Wed, 24 December 2008 15:13 Go to previous message
Scott Cowan is currently offline Scott CowanFriend
Messages: 12
Registered: July 2009
Junior Member
Thanks Gunnar,

Inspecting ResourcesPlugin.getWorkspace().getRoot().getLocation() revealed
the workspace location as you suggeted and I found out I can change it in
the OSGi launch configuration on the "Arguments" tab. I set the working
directory to "Other" and specified its location. It is then looks there
for the "workspace" directory.

Scott
Previous Topic:Where can I get p2 director for 64 bit linux, 32 bit linux, mac osx, win32 32 bit and 64 bit?
Next Topic:Problem with the dropins directory and the DynamicImport-Package directive
Goto Forum:
  


Current Time: Tue Mar 19 13:59:29 GMT 2024

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

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

Back to the top