How to get Argument from IApplication [message #332315] |
Fri, 17 October 2008 16:57 |
Eclipse User |
|
|
|
I've created a new file extention adn trying to launch the application
through the file on desktop. I tried to do it with eclipse adding the
variable ${fileprompt} in my program arguments and select the file there
directly when I launch my eclipse plugin. This works when I tried to do
the following public class Application implements IApplication {
public Object start(IApplicationContext context) throws Exception {
Display display = PlatformUI.createDisplay();
Map args = context.getArguments();
String[] value =
(String[])args.get(context.APPLICATION_ARGS);
System.out.println("value " + value[0]);
return IApplication.EXIT_OK;
}
public void stop() {
// nothing to do
}
}
The value[0] will return the absolute path that I select from the file
picker.
However, when I tried to select teh file I wanted to open in my Desktop,
right click, Open with, select the application I wanted to launch with,
the applciation argument doesn't return me the absolute path.
I got the value of "-showLocation" instead. Any one run into this issue
before? Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.02962 seconds