Package org.osgi.framework

Examples of org.osgi.framework.Bundle


  };

  @Override
  public void createPartControl(Composite parent) {
    _browser = new Browser(parent, SWT.NONE);
    Bundle plugin = WGADesignerPlugin.getDefault().getBundle();
    IPath relativePagePath = new Path("resources/html/gettingStarted/step1.1.html");
    URL fileInPlugin = FileLocator.find(plugin, relativePagePath, null);
    if (fileInPlugin != null) {
      try {
        URL pageUrl = FileLocator.toFileURL(fileInPlugin);
View Full Code Here


                }           
            }
        }
       
        // retrieve J2EE libs
        Bundle bundle = Platform.getBundle("de.innovationgate.eclipse.plugins.Core");
        if (bundle != null && wgaVersion != null) {           
            IPath path = new Path("resources").append("librarySets");
            if (wgaVersion.isAtLeast(5, 0)) {
                path = path.append("j2ee14");
            } else {
View Full Code Here

      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

   
    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

      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

  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

  }

  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

      }
    });
  }

  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

    //      }
    //    });
  }

  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

     * @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

TOP

Related Classes of org.osgi.framework.Bundle

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.