ResourcesPlugin.getWorkspace(); always returns null. [message #205912] |
Fri, 23 December 2005 02:48 |
Eclipse User |
|
|
|
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 #206082 is a reply to message #206027] |
Sat, 24 December 2005 10:03 |
Eclipse User |
|
|
|
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.
|
|
|
Powered by
FUDForum. Page generated in 0.05145 seconds