Package org.jampa.utils

Examples of org.jampa.utils.CommandLineParser


   
    /*
     * User Home setting. This block must stay first, and no call to Log.getInstance() should
     * be made before the end of this block, as it will set the wrong path for Jampa's log file.
     */
    CommandLineParser parser = new CommandLineParser();
    parser.parse(Platform.getApplicationArgs());
   
    String userHome;
    if (parser.hasCustomDirectory()) {
      userHome = parser.getCustomDirectory();
    } else {
      userHome = System.getProperty("user.home"); //$NON-NLS-1$
    }
    setUserHome(userHome);
    /*
     * End of User Home setting.
     */
   
    if (parser.getCustomDirectoryErrorMessage() != null) {
      Log.getInstance(Application.class).warn(parser.getCustomDirectoryErrorMessage()); //$NON-NLS-1$
    }
   
    Log.getInstance(Application.class).info(Platform.getBundle(ID).getHeaders().get("Bundle-Name") + " version " + Platform.getBundle(ID).getHeaders().get("Bundle-Version") + " started."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
    Log.getInstance(Application.class).info("Platform informations: " + Platform.getOSArch() + ", " + Platform.getOS() + ", " + Platform.getNL());     //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$     
   
    PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false);
    PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.DOCK_PERSPECTIVE_BAR, IWorkbenchPreferenceConstants.TOP_RIGHT);   
    PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.KEY_CONFIGURATION_ID, "Jampa.keySheme"); //$NON-NLS-1$
   
    Log.getInstance(Application.class).info("fileSeparator = " + SystemUtils.fileSeparator); //$NON-NLS-1$
    Log.getInstance(Application.class).info("userHome = " + SystemUtils.userHome); //$NON-NLS-1$
    Log.getInstance(Application.class).info("applicationDirectory = " + SystemUtils.applicationDirectory); //$NON-NLS-1$
    Log.getInstance(Application.class).info("playlistDirectory = " + SystemUtils.playlistDirectory); //$NON-NLS-1$
    Log.getInstance(Application.class).info("podcastDirectory = " + SystemUtils.podcastDirectory); //$NON-NLS-1$
    Log.getInstance(Application.class).info("currentDirectory = " + SystemUtils.currentDir); //$NON-NLS-1$
       
    if (parser.isPurgeDemanded()) {
      SystemUtils.purgeConfiguration();
    }
   
    SystemUtils.createConfiguration();   
   
View Full Code Here

TOP

Related Classes of org.jampa.utils.CommandLineParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.