Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ResourcesPlugin.getWorkspace(); always returns null.
ResourcesPlugin.getWorkspace(); always returns null. [message #205912] Fri, 23 December 2005 02:48 Go to next message
Eclipse UserFriend
Originally posted by: hyoracle.126.com

have the following code:

IWorkspace workspace = ResourcesPlugin.getWorkspace();

ResourcesPlugin.getWorkspace(); always returns null. The javadoc says that
a null is returned when the Resources plugin is shutdown. So I tried

Resources.getPlugin().startup(),
but Resources.getPlugin() also returns a null.

If the plugin is indeed shut down, how should I start it (preferably
programatically)

Any help is greatly appreciated
Re: ResourcesPlugin.getWorkspace(); always returns null. [message #206027 is a reply to message #205912] Fri, 23 December 2005 20:34 Go to previous messageGo to next message
Felix L J Mayer is currently offline Felix L J MayerFriend
Messages: 202
Registered: July 2009
Senior Member
Firstly, you are in the wrong forum for this question. Try eclipse.platform.

Secondly, I use the same code and have no problem with it. Did you check
your .log file?

"hyEclipse" <hyoracle@126.com> wrote in message
news:cc00c96041240be623c00b642062cd0d$1@www.eclipse.org...
> have the following code:
> IWorkspace workspace = ResourcesPlugin.getWorkspace();
> ResourcesPlugin.getWorkspace(); always returns null. The javadoc says that
> a null is returned when the Resources plugin is shutdown. So I tried
> Resources.getPlugin().startup(), but Resources.getPlugin() also returns a
> null.
> If the plugin is indeed shut down, how should I start it (preferably
> programatically)
> Any help is greatly appreciated
>
Re: ResourcesPlugin.getWorkspace(); always returns null. [message #206082 is a reply to message #206027] Sat, 24 December 2005 10:03 Go to previous message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

For anyone else reading in the GEF forum; he cross posted to a few newsgroups. Secondly, what he doesn't mention (here) is that the program was:

public class Test {
public static void main(String args[]) {
ResourcesPlugin.getWorkspace(); // alwasy returns null
}
}

and, despite posting the bleeding obvious that you can't run it from a main method like that, he still asks the question repeatedly ...

Alex.
Previous Topic:Clipping problem
Next Topic:Redbook: Developing GEF with EMF resources
Goto Forum:
  


Current Time: Thu Jul 25 16:30:05 GMT 2024

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

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

Back to the top