Examples of EnvironmentInfo


Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  private void processCommandLineArgs() {
    ServiceReference infoRef = context.getServiceReference(EnvironmentInfo.class.getName());
    if (infoRef == null)
      return;
    EnvironmentInfo envInfo = (EnvironmentInfo) context.getService(infoRef);
    if (envInfo == null)
      return;
    String[] args = envInfo.getNonFrameworkArgs();
    context.ungetService(infoRef);
    CommandLineArgs.processCommandLine(args);
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

   */
  public static String[] getCommandLine(BundleContext context, ServiceReference ref) {
    if (ref == null)
      return null;
    try {
      EnvironmentInfo environmentInfo = (EnvironmentInfo) context.getService(ref);
      return environmentInfo == null ? null : environmentInfo.getNonFrameworkArgs();
    } finally {
      context.ungetService(ref);
    }
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  private void processCommandLine(BundleContext context) {
    ServiceTracker environmentTracker = new ServiceTracker(context,
        EnvironmentInfo.class.getName(), null);
    environmentTracker.open();
    EnvironmentInfo environmentInfo = (EnvironmentInfo) environmentTracker
        .getService();
    environmentTracker.close();
    if (environmentInfo == null) {
      return;
    }
    String[] args = environmentInfo.getNonFrameworkArgs();
    if (args == null || args.length == 0) {
      return;
    }

    // go over the program args. search backwards since the program
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getCommandLineArgs()
   */
  public String[] getCommandLineArgs() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getCommandLineArgs()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getCommandLineArgs();
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getFrameworkArgs()
   */
  public String[] getFrameworkArgs() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getFrameworkArgs()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getFrameworkArgs();
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getNL()
   */
  public String getNL() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getNL()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getNL();
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getNonFrameworkArgs()
   */
  public String[] getNonFrameworkArgs() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getNonFrameworkArgs()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getNonFrameworkArgs();
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getOS()
   */
  public String getOS() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getOS()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getOS();
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getOSArch()
   */
  public String getOSArch() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getOSArch()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getOSArch();
  }
View Full Code Here

Examples of org.eclipse.osgi.service.environment.EnvironmentInfo

  /* (non-Javadoc)
   * @see org.eclipse.ecf.examples.remoteservices.common.IRemoteEnvironmentInfo#getWS()
   */
  public String getWS() {
    final EnvironmentInfo ei = getEnvironmentInfo();
    System.out.println("getWS()"); //$NON-NLS-1$
    return (ei == null) ? null : ei.getWS();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.