Package org.eclipse.osgi.framework.log

Examples of org.eclipse.osgi.framework.log.FrameworkLogEntry


    ZipFile file = null;
    try {
      file = new ZipFile(jarFile);
    } catch (IOException e) {
      String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_PLUGIN_LIBRARY_IGNORED, jarFile, pluginInfo.getUniqueId());
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null));
      return names;
    }
    //Run through the entries
    for (Enumeration entriesEnum = file.entries(); entriesEnum.hasMoreElements();) {
      ZipEntry entry = (ZipEntry) entriesEnum.nextElement();
View Full Code Here


      registrations.add(bc.registerService(DOMFACTORYNAME, new ParsingService(false), null));
    } catch (ClassNotFoundException e) {
      noXML = true;
      if (Debug.DEBUG && Debug.DEBUG_ENABLED) {
        String message = EclipseAdaptorMsg.ECLIPSE_ADAPTOR_ERROR_XML_SERVICE;
        adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null));
      }
    }
  }
View Full Code Here

      // check the prop each time this happens (should NEVER happen!)
      exitOnError = Boolean.valueOf(FrameworkProperties.getProperty(EclipseErrorHandler.PROP_EXITONERROR, "true")).booleanValue(); //$NON-NLS-1$
      String message = EclipseAdaptorMsg.ECLIPSE_ADAPTOR_RUNTIME_ERROR;
      if (exitOnError && isFatalException(error))
        message += ' ' + EclipseAdaptorMsg.ECLIPSE_ADAPTOR_EXITING;
      FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, error, null);
      adaptor.getFrameworkLog().log(logEntry);
    } catch (Throwable t) {
      // we may be in a currupted state and must be able to handle any
      // errors (ie OutOfMemoryError)
      // that may occur when handling the first error; this is REALLY the
View Full Code Here

    try {
      allElements = ManifestElement.parseHeader(Constants.ECLIPSE_LAZYSTART, headerValue);
    } catch (BundleException e) {
      // just use the default settings (no auto activation)
      String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CLASSLOADER_CANNOT_GET_HEADERS, storageHook.bundledata.getLocation());
      bundledata.getAdaptor().getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null));
    }
    //Eclipse-AutoStart not found...
    if (allElements == null)
      return;
    // the single value for this element should be true|false
View Full Code Here

    try {
      allElements = ManifestElement.parseHeader(Constants.BUNDLE_ACTIVATIONPOLICY, headerValue);
    } catch (BundleException e) {
      // just use the default settings (no auto activation)
      String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CLASSLOADER_CANNOT_GET_HEADERS, storageHook.bundledata.getLocation());
      bundledata.getAdaptor().getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null));
    }
    //Bundle-ActivationPolicy not found.
    if (allElements == null)
      return;
    // the single value for this type is lazy
View Full Code Here

        result = runApplication(defaultContext);
      } catch (Exception e) {
        if (!relaunch || (context.getBundle().getState() & Bundle.ACTIVE) == 0)
          throw e;
        if (log != null)
          log.log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, EclipseAdaptorMsg.ECLIPSE_STARTUP_APP_ERROR, 1, e, null));
      }
      doRelaunch = (relaunch && (context.getBundle().getState() & Bundle.ACTIVE) != 0) || FrameworkProperties.getProperty(Constants.PROP_OSGI_RELAUNCH) != null;
    } while (doRelaunch);
    return result;
  }
View Full Code Here

      }
    }

    FrameworkLogEntry[] children = (FrameworkLogEntry[]) (childlist.size() == 0 ? null : childlist.toArray(new FrameworkLogEntry[childlist.size()]));

    return new FrameworkLogEntry(status.getPlugin(), status.getSeverity(), status.getCode(), status.getMessage(), stackCode, t, children);
  }
View Full Code Here

        }
        return false;
    }
   
    public FrameworkLogEntry createFrameworkLogEntry(int level, String message, Throwable th) {
        return new FrameworkLogEntry(myPluginID, level, 0, message, 0, th, null);
    }
View Full Code Here

      registrations.add(bc.registerService(DOMFACTORYNAME, new ParsingService(false), null));
    } catch (ClassNotFoundException e) {
      noXML = true;
      if (Debug.DEBUG_ENABLED) {
        String message = EclipseAdaptorMsg.ECLIPSE_ADAPTOR_ERROR_XML_SERVICE;
        adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null));
      }
    }
  }
View Full Code Here

      // check the prop each time this happens (should NEVER happen!)
      exitOnError = Boolean.valueOf(FrameworkProperties.getProperty(EclipseErrorHandler.PROP_EXITONERROR, "true")).booleanValue(); //$NON-NLS-1$
      String message = EclipseAdaptorMsg.ECLIPSE_ADAPTOR_RUNTIME_ERROR;
      if (exitOnError && isFatalException(error))
        message += ' ' + EclipseAdaptorMsg.ECLIPSE_ADAPTOR_EXITING;
      FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, error, null);
      adaptor.getFrameworkLog().log(logEntry);
    } catch (Throwable t) {
      // we may be in a currupted state and must be able to handle any
      // errors (ie OutOfMemoryError)
      // that may occur when handling the first error; this is REALLY the
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.framework.log.FrameworkLogEntry

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.