Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Reading Command Line Parameters in RCP App
Reading Command Line Parameters in RCP App [message #637240] Thu, 04 November 2010 12:58 Go to next message
Eclipse UserFriend
I tried searching the forum, but most of the command line topics were on starting eclipse.

I have an RCP app that works well. One of my views needs to access the command line parameters given to the RCP application when it is started.

In this particular case, I need to turn some logging on or off based on a command line parameter.

How can a view in my RCP app access the command line parameters that are provided when the app is launched?

Thanks,
Herb Miller

Re: Reading Command Line Parameters in RCP App [message #637266 is a reply to message #637240] Thu, 04 November 2010 14:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
inside your RCP app, you should simply get your commandine and
applications args with:
Platform.getApplicationArgs()
and
Platform.getCommandLineArgs()

Greetings

Heiko


Am 04.11.2010 17:58, schrieb Herb Miller:
> I tried searching the forum, but most of the command line topics were on
> starting eclipse.
>
> I have an RCP app that works well. One of my views needs to access the
> command line parameters given to the RCP application when it is started.
>
> In this particular case, I need to turn some logging on or off based on
> a command line parameter.
>
> How can a view in my RCP app access the command line parameters that are
> provided when the app is launched?
>
> Thanks,
> Herb Miller
>
>
Re: Reading Command Line Parameters in RCP App [message #637402 is a reply to message #637240] Fri, 05 November 2010 07:50 Go to previous messageGo to next message
Eclipse UserFriend
In addition, they're available in your application start(*) method:

args = (String[]) applicationContext.getArguments().get(
IApplicationContext.APPLICATION_ARGS);

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
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
Re: Reading Command Line Parameters in RCP App [message #637463 is a reply to message #637402] Fri, 05 November 2010 12:00 Go to previous message
Eclipse UserFriend
Thanks for both answers. I will give them a try.
Herb
Previous Topic:Anyone know how to get icons for common file types?
Next Topic:export of RCP app stops before completion
Goto Forum:
  


Current Time: Wed Jul 23 10:54:48 EDT 2025

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

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

Back to the top