コード例 #1
0
 /**
  * checks if the -clearWorkspace programm argument is set and if so clears the workspace directory
  * of the application
  */
 protected void checkClearWorkspace() {
   String[] args = NLBasePlugin.getDefault().getApplication().getArguments();
   boolean doClearWorkspace = false;
   for (int i = 0; i < args.length; i++) {
     String arg = args[i];
     String val = i + 1 < args.length ? args[i + 1] : null;
     if ("--clearWorkspace".equals(arg)) // $NON-NLS-1$
     doClearWorkspace = Boolean.parseBoolean(val);
   }
   if (doClearWorkspace) {
     logger.info("************ clearing workspace! **************"); // $NON-NLS-1$
     RCPUtil.clearWorkspace(false);
   }
 }
コード例 #2
0
 /**
  * Initializes the application.
  *
  * <p>The default implementation returns {@link AbstractApplication#sharedInstance()} which should
  * be the application that is currently running.
  *
  * <p>Extendors might call <code>super.initApplication()</code> and then modify the result.
  */
 protected AbstractApplication initApplication() {
   return NLBasePlugin.getDefault().getApplication();
 }