Package org.eclipse.osgi.service.resolver

Examples of org.eclipse.osgi.service.resolver.BundleDescription


    public Set<ResolverError> getAllErrors() {
        BundleDescription[] bundles = state.getBundles();
        Set<ResolverError> errors = new LinkedHashSet<ResolverError>();
        for (int i = 0; i < bundles.length; i++) {
            BundleDescription bundle = bundles[i];
            ResolverError[] bundleErrors = state.getResolverErrors(bundle);
            if (bundleErrors != null) {
                errors.addAll(Arrays.asList(bundleErrors));
            }
        }
View Full Code Here


        Set<Long> bundleIds = new LinkedHashSet<Long>();
        addBundleAndDependencies(desc, bundleIds, true);
        List<BundleDescription> dependencies = new ArrayList<BundleDescription>();
        for (long bundleId : bundleIds) {
            if (desc.getBundleId() != bundleId) {
                BundleDescription dependency = state.getBundle(bundleId);
                BundleDescription supplier = dependency.getSupplier().getSupplier();
                HostSpecification host = supplier.getHost();
                if (host == null || !desc.equals(host.getSupplier())) {
                    dependencies.add(dependency);
                }
            }
        }
View Full Code Here

    final ArrayList list = new ArrayList();
    final State state = TargetPlatformHelper.getState();
    final IProductPlugin[] plugins = prod.getPlugins();
    for (int i = 0; i < plugins.length; i++)
    {
      final BundleDescription bundle = state.getBundle(plugins[i].getId(), null);
      if (bundle != null)
        list.add(bundle);
    }
    // implicitly add the new launcher plug-in/fragment if we are to use the
    // new launching story and the launcher plug-in/fragment are not already included in the .product file
    final IPluginModelBase launcherPlugin = PluginRegistry.findModel("org.eclipse.equinox.launcher"); //$NON-NLS-1$
    if (launcherPlugin != null)
    {
      final BundleDescription bundle = launcherPlugin.getBundleDescription();
      if (bundle != null && !list.contains(bundle))
      {
        list.add(bundle);
        final BundleDescription[] fragments = bundle.getFragments();
        for (int i = 0; i < fragments.length; i++)
        {
          if (!list.contains(fragments[i]))
          {
            list.add(fragments[i]);
View Full Code Here

        .getState(false);
    for (int i = 0; i < wabActArray.length;) {
      int lastMatched = i;
      for (int j = i + 1; j < wabActArray.length; j++) {
        boolean isBd1DependentBd2 = false;
        BundleDescription bundleDes1 = state.getBundle(wabActArray[i]
            .getBundle().getBundleId());
        BundleSpecification[] requiredBundleDeses = bundleDes1
            .getRequiredBundles();
        for (BundleSpecification bundleSpec : requiredBundleDeses) {
          BaseDescription supplier = bundleSpec.getSupplier();
          if (supplier instanceof BundleDescription
              && ((BundleDescription) supplier).getBundleId() == wabActArray[j]
View Full Code Here

  public static Collection<BundleDescription> getRequiredBoudles(
      Bundle bundle, boolean includeOptional, boolean onlyReexported,
      boolean onlyDirectRequired) {
    // Need resolver.
    State platformState = getPlatformAdmin().getState(false);
    BundleDescription bundleDes = platformState.getBundle(bundle
        .getBundleId());
    return getResolvedRequiredBundles(bundleDes, includeOptional,
        onlyReexported, onlyDirectRequired);
  }
View Full Code Here

      if (onlyReexported && !bds.isExported())
        continue;

      if (bds.isResolved()
          && bds.getSupplier() instanceof BundleDescription) {
        BundleDescription bd = (BundleDescription) bds.getSupplier();
        result.add(bd);
        if (!onlyDirectRequired || bds.isExported())
          result.addAll(getResolvedRequiredBundles(bd,
              includeOptional, onlyDirectRequired,
              onlyDirectRequired));
View Full Code Here

    private final Object monitor = new Object();

    public boolean containsPlugin(IPluginModelBase plugin) {
        final String symbolicName = plugin.getBundleDescription().getSymbolicName();

        final BundleDescription desc = getState().getBundle(symbolicName, null);

        return desc != null;
    }
View Full Code Here

    protected void populateStartupStateModel() {
        final File rootBundleDir = getParent().getPluginRootDirectory().toFile();
        for (Object o : getProperties().keySet()) {
            final File bundleLocation = new File(rootBundleDir, (String) o);

            final BundleDescription desc = getParent().getState().getBundleByLocation(
                            bundleLocation.getAbsolutePath());

            if (desc == null) {
                KarafCorePluginActivator.getLogger().error(
                                "Unable to locate bundle description for: "
                                                + bundleLocation.getAbsolutePath());
            } else {
                final BundleStartEntry se = new BundleStartEntry(desc, (String) getProperties()
                                .get(o));
                startupStateModel.put(desc.getSymbolicName(), se);

            }
        }
    }
View Full Code Here

    private final static boolean IS_WEAVING = IsWovenTester.isWeavingActive();

   
    public String getWeaverVersionInfo() {
        BundleDescription weaver =
            Platform.getPlatformAdmin().getState(false).
            getBundle("org.aspectj.weaver", null);
       
        if (weaver != null) {
            if (MIN_WEAVER_VERSION.compareTo(weaver.getVersion()) <= 0) {
                return "";
//                return "AspectJ weaver version " + weaver.getVersion().toString() + " OK!";
            } else {
                return "No compatible version of org.aspectj.weaver found.  " +
                "JDT Weaving requires 1.6.1 or higher.  Found version " +
                weaver.getVersion();
            }
        } else {
            return "org.aspectj.weaver not installed.  JDT Weaving requires 1.6.3 or higher.";
        }
    }
View Full Code Here

            State state = Platform.getPlatformAdmin().getState(false);
            if (becomeEnabled) {
                allEABundles[0].start();
                for (int i = 1; i < allEABundles.length; i++) {
                    allEABundles[i].stop();
                    BundleDescription desc = state.getBundle(allEABundles[i].getBundleId());
                    DisabledInfo info = new DisabledInfo(
                            "org.eclipse.contribution.weaving.jdt", //$NON-NLS-1$
                            "Disabled older version of Equinox Aspects", desc); //$NON-NLS-1$
                    try {
                        Platform.getPlatformAdmin().addDisabledInfo(info);
View Full Code Here

TOP

Related Classes of org.eclipse.osgi.service.resolver.BundleDescription

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.