eclipse - How do I get the "session data" shown in an error? -


I'm adding some functionality to the current application to show debug information when checking an error from error log view while doing something The name of "session data" suggests, usually it looks like this:

  eclipse.buildId = M20090917-0800 java.version = 1.6.0_11 java.vendor = Sun Microsystems Inc BootLoader constant: OS = win32 , ARCH = x86, WS = win32, NL = sv_SE Framework logic: -product org.eclipse.epp.package.rcp.product command line argument: -and win32 -ws win32 -arch x86 - product org.eclipse.epp.package .rcp.product   

It is something that can be useful to know how do I get this information?

Some of these information from plugin org.eclipse.core.runtime.Platime.runtime Platform class, as shown:

  throws coreException (if "ARCH". Par (argument)) the public string solve value (IDynamicVariable variable, string argument) { // $ Non-NLS-1 $ return platform. TagsErch ();} and if ("ECLIPSE_HOME" .equals (argument)) {// $ non-NLS-1 $ url installURL = Platform.getInstall location (). GetURL (); IPathpeter = new path (installURL.getFile ()). Delete Trolleying from Operator (); Usage C Received Path (ppath.to Oshting ()); and if ("NL" .Ability) {// $ Non-NLS-1 $ return platform .getNL ();} and if ("OS". (Logic)) {// $ non-NLS-1 $ return platform. Tag ();} and if ("ws" .aab (logic)) {// $ non-nls-1 $ return platform .getWS () ;} Return tap;}  

Platform.getCommandLineArgs () should complete the performance for the Eclipse session (though not for your program).


For an RCP program, start using the

application (IApplicationContext Reference) Method:

  string [] args = (string []) context.getArguments (). Get (IApplicationContext.APPLICATION_ARGS);  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -