Examples of FrameworkLogEntry


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

    try {
      Field frameworkLogField = NLS.class.getDeclaredField("frameworkLog"); //$NON-NLS-1$
      frameworkLogField.setAccessible(true);
      frameworkLogField.set(null, adaptor.getFrameworkLog());
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.ERROR, 0, e.getMessage(), 0, e, null));
    }
  }
View Full Code Here

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

      }
      contextFinder = new ContextFinder(parent);
      current.setContextClassLoader(contextFinder);
      return;
    } catch (Exception e) {
      FrameworkLogEntry entry = new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.INFO, 0, NLS.bind(Msg.CANNOT_SET_CONTEXTFINDER, null), 0, e, null);
      adaptor.getFrameworkLog().log(entry);
    }

  }
View Full Code Here

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

        Object prop = serviceReferences[i].getProperty(URLConstants.URL_HANDLER_PROTOCOL);
        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_HANDLER_PROTOCOL, URLSTREAMHANDLERCLASS, serviceReferences[i].getBundle()});
          adaptor.getFrameworkLog().log(new FrameworkLogEntry(FrameworkAdaptor.FRAMEWORK_SYMBOLICNAME, FrameworkLogEntry.WARNING, 0, message, 0, null, null));
          continue;
        }
        String[] protocols = (String[]) prop;
        for (int j = 0; j < protocols.length; j++)
          if (protocols[j].equals(protocol)) {
View Full Code Here

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

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

    try {
      Method createInternalURLStreamHandlerMethod = factory.getClass().getMethod("createInternalURLStreamHandler", new Class[] {String.class}); //$NON-NLS-1$
      return (URLStreamHandler) createInternalURLStreamHandlerMethod.invoke(factory, new Object[] {protocol});
    } catch (Exception e) {
      adaptor.getFrameworkLog().log(new FrameworkLogEntry(StreamHandlerFactory.class.getName(), "findAuthorizedURLStreamHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

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

  }

  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

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

  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

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

        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

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

    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(), "findAuthorizedContentHandler-loop", FrameworkLogEntry.ERROR, e, null)); //$NON-NLS-1$
      throw new RuntimeException(e.getMessage(), e);
    }
  }
View Full Code Here

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

        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);
        return null;
      }
    if (manifest == null) {
      Headers empty = new Headers(0);
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.