Examples of FrameworkDebugOptions


Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

    state = newState;
    flush();
  }

  private void setDebugOptions() {
    FrameworkDebugOptions options = FrameworkDebugOptions.getDefault();
    // may be null if debugging is not enabled
    if (options == null)
      return;
    DEBUG = options.getBooleanOption(OPTION_DEBUG, false);
    DEBUG_WIRING = options.getBooleanOption(OPTION_WIRING, false);
    DEBUG_IMPORTS = options.getBooleanOption(OPTION_IMPORTS, false);
    DEBUG_REQUIRES = options.getBooleanOption(OPTION_REQUIRES, false);
    DEBUG_GENERICS = options.getBooleanOption(OPTION_GENERICS, false);
    DEBUG_USES = options.getBooleanOption(OPTION_USES, false);
    DEBUG_CYCLES = options.getBooleanOption(OPTION_CYCLES, false);
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

   * If profiling properties are updated, this method is called to update
   * the profile states.
   */
  public static void initProps() {
    String prop;
    FrameworkDebugOptions dbgOptions = null;

    // if osgi.debug is not available, don't force DebugOptions
    //  to init as this variable may be set later on where
    //  DebugOptions will succeed.
    if (FrameworkProperties.getProperty("osgi.debug") != null) { //$NON-NLS-1$
      dbgOptions = FrameworkDebugOptions.getDefault();
      if (dbgOptions != null) {
        STARTUP = dbgOptions.getBooleanOption(OPTION_STARTUP, false);
        BENCHMARK = dbgOptions.getBooleanOption(OPTION_BENCHMARK, false);
        DEBUG = dbgOptions.getBooleanOption(OPTION_DEBUG, false);
        if (profileLogger == null)
          profileLoggerClassName = dbgOptions.getOption(OPTION_IMPL);
      }
    }

    // System properties will always override anything in .options file
    if ((prop = FrameworkProperties.getProperty(PROP_STARTUP)) != null) {
      STARTUP = Boolean.valueOf(prop).booleanValue();
      if (dbgOptions != null)
        dbgOptions.setOption(OPTION_STARTUP, new Boolean(STARTUP).toString());
    }
    if ((prop = FrameworkProperties.getProperty(PROP_BENCHMARK)) != null) {
      BENCHMARK = Boolean.valueOf(prop).booleanValue();
      if (dbgOptions != null)
        dbgOptions.setOption(OPTION_BENCHMARK, new Boolean(BENCHMARK).toString());
    }
    if ((prop = FrameworkProperties.getProperty(PROP_DEBUG)) != null) {
      DEBUG = Boolean.valueOf(prop).booleanValue();
      if (dbgOptions != null)
        dbgOptions.setOption(OPTION_DEBUG, new Boolean(DEBUG).toString());
    }

    if (profileLogger == null) {
      if ((prop = FrameworkProperties.getProperty(PROP_IMPL)) != null) {
        profileLoggerClassName = prop;
        if (dbgOptions != null)
          dbgOptions.setOption(OPTION_IMPL, profileLoggerClassName);
      }
    } else {
      profileLogger.initProps();
    }
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

    return System.currentTimeMillis();
  }

  public void initProps() {
    String prop;
    FrameworkDebugOptions dbgOptions = null;
    // if osgi.debug is not available, don't force DebugOptions
    //  to init as this variable may be set later on where
    //  DebugOptions will succeed.
    if (FrameworkProperties.getProperty("osgi.debug") != null) { //$NON-NLS-1$
      dbgOptions = FrameworkDebugOptions.getDefault();
      if (dbgOptions != null) {
        logFileName = dbgOptions.getOption(OPTION_FILENAME);
        logSynchronously = dbgOptions.getBooleanOption(OPTION_LOGSYNCHRONOUSLY, false);
        int size = dbgOptions.getIntegerOption(OPTION_BUFFERSIZE, 0);
        if (size > 0)
          bufferSize = size;
      }
    }

    if ((prop = FrameworkProperties.getProperty(PROP_FILENAME)) != null) {
      logFileName = prop;
      if (dbgOptions != null)
        dbgOptions.setOption(OPTION_FILENAME, logFileName);
    }
    if ((prop = FrameworkProperties.getProperty(PROP_LOGSYNCHRONOUSLY)) != null) {
      logSynchronously = Boolean.valueOf(prop).booleanValue();
      if (dbgOptions != null)
        dbgOptions.setOption(OPTION_LOGSYNCHRONOUSLY, new Boolean(logSynchronously).toString());
    }
    if ((prop = FrameworkProperties.getProperty(PROP_BUFFERSIZE)) != null) {
      try {
        int value = Integer.parseInt(prop);
        if (value > 0) {
          bufferSize = value;
          if (dbgOptions != null)
            dbgOptions.setOption(OPTION_BUFFERSIZE, Integer.toString(bufferSize));
        }
      } catch (NumberFormatException e) {
        // do nothing
      }
    }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

    }
    return extcl;
  }

  private static void setDebugOptions() {
    FrameworkDebugOptions options = FrameworkDebugOptions.getDefault();
    // may be null if debugging is not enabled
    if (options == null)
      return;
    StateManager.DEBUG = options != null;
    StateManager.DEBUG_READER = options.getBooleanOption(OPTION_RESOLVER_READER, false);
    StateManager.MONITOR_PLATFORM_ADMIN = options.getBooleanOption(OPTION_MONITOR_PLATFORM_ADMIN, false);
    StateManager.DEBUG_PLATFORM_ADMIN = options.getBooleanOption(OPTION_PLATFORM_ADMIN, false);
    StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER = options.getBooleanOption(OPTION_PLATFORM_ADMIN_RESOLVER, false);
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

      packageAdmin = register(new String[] {Constants.OSGI_PACKAGEADMIN_NAME}, framework.packageAdmin, null);
    if (framework.securityAdmin != null)
      securityAdmin = register(new String[] {Constants.OSGI_PERMISSIONADMIN_NAME, ConditionalPermissionAdmin.class.getName()}, framework.securityAdmin, null);
    if (framework.startLevelManager != null)
      startLevel = register(new String[] {Constants.OSGI_STARTLEVEL_NAME}, framework.startLevelManager, null);
    FrameworkDebugOptions dbgOptions = null;
    if ((dbgOptions = FrameworkDebugOptions.getDefault()) != null) {
      dbgOptions.start(context);
      debugOptions = register(new String[] {org.eclipse.osgi.service.debug.DebugOptions.class.getName()}, dbgOptions, null);
    }
    ClassLoader tccl = framework.getContextFinder();
    if (tccl != null) {
      Hashtable props = new Hashtable(7);
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

    if (securityAdmin != null)
      securityAdmin.unregister();
    if (startLevel != null)
      startLevel.unregister();
    if (debugOptions != null) {
      FrameworkDebugOptions dbgOptions = FrameworkDebugOptions.getDefault();
      if (dbgOptions != null)
        dbgOptions.stop(context);
      debugOptions.unregister();
    }
    if (contextFinder != null)
      contextFinder.unregister();
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

      ((ServiceRegistration) iRegistrations.next()).unregister();
    registrations.clear();
  }

  private void printStats() {
    FrameworkDebugOptions debugOptions = FrameworkDebugOptions.getDefault();
    if (debugOptions == null)
      return;
    String registryParsing = debugOptions.getOption("org.eclipse.core.runtime/registry/parsing/timing/value"); //$NON-NLS-1$
    if (registryParsing != null)
      MessageHelper.debug("Time spent in registry parsing: " + registryParsing); //$NON-NLS-1$
    String packageAdminResolution = debugOptions.getOption("debug.packageadmin/timing/value"); //$NON-NLS-1$
    if (packageAdminResolution != null)
      System.out.println("Time spent in package admin resolve: " + packageAdminResolution); //$NON-NLS-1$     
    String constraintResolution = debugOptions.getOption("org.eclipse.core.runtime.adaptor/resolver/timing/value"); //$NON-NLS-1$
    if (constraintResolution != null)
      System.out.println("Time spent resolving the dependency system: " + constraintResolution); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

    EclipseEnvironmentInfo.getDefault();
    setDebugOptions();
  }

  private void setDebugOptions() {
    FrameworkDebugOptions options = FrameworkDebugOptions.getDefault();
    // may be null if debugging is not enabled
    if (options == null)
      return;
    PluginConverterImpl.DEBUG = options.getBooleanOption(OPTION_CONVERTER, false);
    BasicLocation.DEBUG = options.getBooleanOption(OPTION_LOCATION, false);
    CachedManifest.DEBUG = options.getBooleanOption(OPTION_CACHEDMANIFEST, false);
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

      registration.unregister();
    registrations.clear();
  }

  private void printStats() {
    FrameworkDebugOptions debugOptions = FrameworkDebugOptions.getDefault();
    if (debugOptions == null)
      return;
    String registryParsing = debugOptions.getOption("org.eclipse.core.runtime/registry/parsing/timing/value"); //$NON-NLS-1$
    if (registryParsing != null)
      MessageHelper.debug("Time spent in registry parsing: " + registryParsing); //$NON-NLS-1$
    String packageAdminResolution = debugOptions.getOption("debug.packageadmin/timing/value"); //$NON-NLS-1$
    if (packageAdminResolution != null)
      System.out.println("Time spent in package admin resolve: " + packageAdminResolution); //$NON-NLS-1$     
    String constraintResolution = debugOptions.getOption("org.eclipse.core.runtime.adaptor/resolver/timing/value"); //$NON-NLS-1$
    if (constraintResolution != null)
      System.out.println("Time spent resolving the dependency system: " + constraintResolution); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.eclipse.osgi.framework.debug.FrameworkDebugOptions

    EclipseEnvironmentInfo.getDefault();
    setDebugOptions();
  }

  private void setDebugOptions() {
    FrameworkDebugOptions options = FrameworkDebugOptions.getDefault();
    // may be null if debugging is not enabled
    if (options == null)
      return;
    PluginConverterImpl.DEBUG = options.getBooleanOption(OPTION_CONVERTER, false);
    BasicLocation.DEBUG = options.getBooleanOption(OPTION_LOCATION, false);
    CachedManifest.DEBUG = options.getBooleanOption(OPTION_CACHEDMANIFEST, false);
  }
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.