Examples of Bundle


Examples of org.osgi.framework.Bundle

      Plugin.getDefault().logError("Unable to open editor for labelfile '" + labelFile.getLocation() + "'.", e);
    }
  }

  public void bundleChanged(BundleEvent event) {
    Bundle bundle = event.getBundle();
   
    if (!bundle.equals(getBundle())) {
      return;
    }
   
    int type = event.getType();
    if (type == BundleEvent.STARTED) {
View Full Code Here

Examples of org.osgi.framework.Bundle

   
    try {
      plugin = this;
     
      // #00000046 - try to init library sets as early as possible
      Bundle bundle = Platform.getBundle(PLUGIN_ID);      
      IPath path = new Path("resources/librarySets");
      URL librarySetURL = FileLocator.find(bundle, path, null);      
      File librarySetsDir = new File(FileLocator.toFileURL(librarySetURL).getPath());
 
      DirectoryLibrarySet j2ee13 = new DirectoryLibrarySet(LIBRARY_SET_J2EE_1_3);
View Full Code Here

Examples of org.osgi.framework.Bundle

      if(!settings.exists()){
        settings.mkdir();
      }     
      _wgaRemoteServerStore = new BeanListStore<WGARemoteServer>(settings,STORAGE_KEY_WGA_REMOTESERVERS, WGARemoteServer.class.getClassLoader());

      Bundle bundle = Platform.getBundle(PLUGIN_ID);      
      Path path = new Path("resources/tomcat");
      URL tomcatURL = FileLocator.find(bundle, path, null);      
      File catalinaHome = new File(FileLocator.toFileURL(tomcatURL).getPath());
      TomcatUtils.getInstance().init(catalinaHome, new File(catalinaHome, "conf"));
     
View Full Code Here

Examples of org.osgi.framework.Bundle

  public Map<String, LibrarySet> getLibrarySets() {   
    return _librarySets;
  }

  public void bundleChanged(BundleEvent event) {
    Bundle bundle = event.getBundle();
   
    if (!bundle.equals(getBundle())) {
      return;
    }
   
    int type = event.getType();
    if (type == BundleEvent.STARTED) {
View Full Code Here

Examples of org.osgi.framework.Bundle

  }

  boolean exists(String bundleName) {
    for (int i = 0; i < eventList.size(); i++) {
      BundleEvent fe = (BundleEvent) eventList.get(i);
      Bundle b = fe.getBundle();
      System.out.println("===["+b+"]");
      if (bundleName.equals(b.getSymbolicName())) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.osgi.framework.Bundle

      }
    });
  }

  private IProxyService loadProxyService() {
    Bundle bundle = Platform.getBundle(CORE_NET_BUNDLE);
    if (bundle != null) {
      ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
      if (ref != null)
        return (IProxyService) bundle.getBundleContext().getService(ref);
    }

    if (fProxyService == null)
      logError("Proxy service could not be found.", null); //$NON-NLS-1$
View Full Code Here

Examples of org.osgi.framework.Bundle

    //      }
    //    });
  }

  private IProxyService loadProxyService() {
    Bundle bundle = Platform.getBundle(CORE_NET_BUNDLE); //$NON-NLS-1$
    if (bundle != null) {
      ServiceReference ref = bundle.getBundleContext().getServiceReference(IProxyService.class.getName());
      if (ref != null)
        return (IProxyService) bundle.getBundleContext().getService(ref);
    }

    if (fProxyService == null)
      logError("Proxy service could not be found.", null);
View Full Code Here

Examples of org.osgi.framework.Bundle

     * @return Path location of plug-in "ch.ethz.prose"
     * @throws CoreException If the path couldn't be determined
     */
    public String getProsePath() throws CoreException {
        try {
            Bundle bundle = Platform.getBundle("ch.ethz.prose"); //$NON-NLS-1$
            URL url = bundle.getEntry("/");
            return Platform.asLocalURL(url).getPath();
        } catch (IOException e) {
            IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK,
                    "Could not determine path", e); //$NON-NLS-1$
            throw new CoreException(status);
View Full Code Here

Examples of org.osgi.framework.Bundle

        addTagHandler(th);
        IConfigurationElement[] calendarExtensions = Platform.getExtensionRegistry().getConfigurationElementsFor(GPCalendar.EXTENSION_POINT_ID);
//        myCalendarFiles = path.listFiles(new Filter(".calendar"));
        myCalendarLabels = new String[calendarExtensions.length];
        for (int i = 0; i < calendarExtensions.length; i++) {
            Bundle nextBundle = Platform.getBundle(calendarExtensions[i].getDeclaringExtension().getNamespace());
            URL calendarUrl = nextBundle.getResource(calendarExtensions[i].getAttribute("resource-url"));
            if (calendarUrl!=null) {
                load(calendarUrl.openStream());
                myCalendarLabels[i] = th.getName();
                myCalendarResources.add(calendarUrl);
            }
View Full Code Here

Examples of org.osgi.framework.Bundle

      if(bundles.size() == 0) {
        return true;
      }

      for(Iterator it = bundles.iterator(); it.hasNext();) {
        Bundle b = (Bundle)it.next();
        if((e.getBundle() != null) &&
           (b.getBundleId() == e.getBundle().getBundleId())) {
          return true;
        }
      }

      return 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.