Package org.eclipse.osgi.framework.log

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


    if (name.equals("")) //$NON-NLS-1$
      msg = NLS.bind(EclipseAdaptorMsg.parse_error, ex.getMessage());
    else
      msg = NLS.bind(EclipseAdaptorMsg.parse_errorNameLineColumn, new String[] {name, Integer.toString(ex.getLineNumber()), Integer.toString(ex.getColumnNumber()), ex.getMessage()});

    FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, msg, 0, ex, null);
    adaptor.getFrameworkLog().log(entry);
  }
View Full Code Here


  }

  synchronized public PluginInfo parsePlugin(InputStream in) throws Exception {
    SAXParserFactory factory = acquireXMLParsing(context);
    if (factory == null) {
      FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, EclipseAdaptorMsg.ECLIPSE_CONVERTER_NO_SAX_FACTORY, 0, null, null);
      adaptor.getFrameworkLog().log(entry);
      return null;
    }

    factory.setNamespaceAware(true);
View Full Code Here

  public void warning(SAXParseException ex) {
    logStatus(ex);
  }

  private void internalError(String elementName) {
    FrameworkLogEntry error;
    String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CONVERTER_PARSE_UNKNOWNTOP_ELEMENT, elementName);
    error = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, (manifestInfo.pluginId == null ? message : "Plug-in : " + manifestInfo.pluginId + ", " + message), 0, null, null); //$NON-NLS-1$ //$NON-NLS-2$
    adaptor.getFrameworkLog().log(error);
  }
View Full Code Here

        Object prop = serviceReferences[i].getProperty(URLConstants.URL_CONTENT_MIMETYPE);
        if (prop instanceof String)
          prop = new String[] {(String) prop}; // TODO should this be a warning?
        if (!(prop instanceof String[])) {
          String message = NLS.bind(Msg.URL_HANDLER_INCORRECT_TYPE, new Object[] {URLConstants.URL_CONTENT_MIMETYPE, contentHandlerClazz, serviceReferences[i].getBundle()});
          adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.WARNING, 0, message, 0, null, null));
          continue;
        }
        String[] contentHandler = (String[]) prop;
        for (int j = 0; j < contentHandler.length; j++) {
          if (contentHandler[j].equals(contentType)) {
View Full Code Here

    try {
      Method createInternalContentHandlerMethod = factory.getClass().getMethod("createInternalContentHandler", new Class[] {String.class}); //$NON-NLS-1$
      return (ContentHandler) createInternalContentHandlerMethod.invoke(factory, new Object[] {contentType});
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(ContentHandlerFactory.class.getName(), FrameworkLogEntry.ERROR, 0, "findAuthorizedContentHandler-loop", 0, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

        if (DEBUG)
          System.out.println("Reading manifest for: " + storageHook.getBaseData()); //$NON-NLS-1$
        manifest = storageHook.createCachedManifest(true);
      } catch (BundleException e) {
        final String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_CACHEDMANIFEST_UNEXPECTED_EXCEPTION, storageHook.getBaseData().getLocation());
        FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, e, null);
        storageHook.getAdaptor().getFrameworkLog().log(entry);
      }
    if (manifest == null) {
      Headers<String, String> empty = new Headers<String, String>(0);
      empty.setReadOnly();
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

      if (Debug.DEBUG_GENERAL) {
        Debug.println("Error reading framework metadata: " + ex.getMessage()); //$NON-NLS-1$
        Debug.printStackTrace(ex);
      }
      String message = NLS.bind(EclipseAdaptorMsg.ECLIPSE_STARTUP_FILEMANAGER_OPEN_ERROR, ex.getMessage());
      FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, message, 0, ex, null);
      adaptor.getFrameworkLog().log(logEntry);
      FrameworkProperties.setProperty(EclipseStarter.PROP_EXITCODE, "15"); //$NON-NLS-1$
      String errorDialog = "<title>" + AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_TITLE + "</title>" + NLS.bind(AdaptorMsg.ADAPTOR_STORAGE_INIT_FAILED_MSG, baseDir) + "\n" + ex.getMessage(); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
      FrameworkProperties.setProperty(EclipseStarter.PROP_EXITDATA, errorDialog);
      throw ex;
View Full Code Here

    try {
      return readBundleDatas();
    } catch (Throwable t) {
      // be safe here and throw out the results and start over
      // otherwise this would result in a failed launch
      FrameworkLogEntry logEntry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, "Error loading bundle datas.  Recalculating cache.", 0, t, null); //$NON-NLS-1$
      adaptor.getFrameworkLog().log(logEntry);
      return null;
    }
  }
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.