Package org.eclipse.pde.core.plugin

Examples of org.eclipse.pde.core.plugin.IPluginModelBase


        final List<BundleEntry> workspaceBundles = FelixLaunchHelper.getBundles(workspace);
        final List<BundleEntry> targetBundles = FelixLaunchHelper.getBundles(target);

        fModels = new HashMap<IPluginModelBase, String>();
        for(BundleEntry e : workspaceBundles) {
            final IPluginModelBase model = FelixLaunchHelper.resolveWorkspaceBundleEntry(e);
            if(model == null) {
                continue;
            }

            fModels.put(model, e.getAutostart() + ":" + e.getStartLevel()); //$NON-NLS-1$
        }

        if (configuration.getAttribute(IPDELauncherConstants.AUTOMATIC_ADD, true)) {
            automaticallyAddWorkspaceBundles(configuration);
        }

        for(BundleEntry e : targetBundles) {
            final IPluginModelBase model = FelixLaunchHelper.resolveTargetBundleEntry(e);
            if(model == null) {
                continue;
            }

            fModels.put(model, e.getAutostart() + ":" + e.getStartLevel()); //$NON-NLS-1$
        }

        fAllBundles = new HashMap<String, IPluginModelBase>(fModels.size());

        final Iterator<IPluginModelBase> iter = fModels.keySet().iterator();
        while (iter.hasNext()) {
            final IPluginModelBase model = iter.next();
            fAllBundles.put(model.getPluginBase().getId(), model);
        }

        super.preLaunchCheck(configuration, launch, monitor);
    }
View Full Code Here


        final String deselected = configuration.getAttribute(IPDELauncherConstants.DESELECTED_WORKSPACE_PLUGINS, ""); //$NON-NLS-1$
        final List<BundleEntry> deselectedBundles = FelixLaunchHelper.getBundles(deselected);

        final Set<IPluginModelBase> deselectedPlugins = new HashSet<IPluginModelBase>();
        for(BundleEntry e : deselectedBundles) {
            final IPluginModelBase base = FelixLaunchHelper.resolveWorkspaceBundleEntry(e);
            if(base == null) {
                continue;
            }

            deselectedPlugins.add(base);
View Full Code Here

  }

  private String getTestPluginId(ILaunchConfiguration configuration)
  throws CoreException {
    IJavaProject javaProject = getJavaProject(configuration);
    IPluginModelBase model =
      PluginRegistry.findModel(javaProject.getProject());
    if (model == null)
      abort(NLS.bind(PDEUIMessages.JUnitLaunchConfiguration_error_notaplugin,
          javaProject.getProject().getName()),
          null, IStatus.OK);
    if (model instanceof IFragmentModel)
      return ((IFragmentModel)model).getFragment().getPluginId();

    return model.getPluginBase().getId();
  }
View Full Code Here

  private String getApplication(ILaunchConfiguration configuration) {
    return Activator.APPLICATION_ID;
  }

  private IPluginModelBase findPlugin(String id) throws CoreException {
    IPluginModelBase model = PluginRegistry.findModel(id);
    if (model == null)
      model = PDECore.getDefault().findPluginInHost(id);
    if (model == null)
      abort(
          NLS.bind(PDEUIMessages.JUnitLaunchConfiguration_error_missingPlugin, id),
View Full Code Here

    Map<IProject, Set<IResource>> projects = groupResourcesByProject(affectedResources);

    // For each IProject the PDE model and schedule the update job
    for (Map.Entry<IProject, Set<IResource>> project : projects.entrySet()) {
      IPluginModelBase model = PDECore.getDefault().getModelManager()
          .findModel(project.getKey());
      BundleDescription description = model.getBundleDescription();
      String symbolicName = description.getSymbolicName();

      // Schedule the job
      OsgiUpdateJob.schedule(symbolicName, Command.REFRESH);
    }
View Full Code Here

    // update
    if (resource instanceof IFile   
        && SpringCoreUtils.hasNature(resource, PDE.PLUGIN_NATURE)
        && JdtUtils.isJavaProject(resource)) {

      IPluginModelBase model = PDECore.getDefault().getModelManager()
          .findModel(resource.getProject());

      Set<IResource> resources = new HashSet<IResource>();
      if (model != null) {
        resources.add(resource);
View Full Code Here

      }

      iter = sortedMap.values().iterator();
      while (iter.hasNext()) {
        BundleDescription bundle = iter.next();
        IPluginModelBase model = PluginRegistry.findModel(bundle);
        if (model != null && model.isEnabled())
          addDependencyViaImportPackage(model.getBundleDescription(), added, map, entries);
      }

      if (fBuild != null)
        addExtraClasspathEntries(added, entries);
View Full Code Here

      }
    }
  }

  private boolean addPlugin(BundleDescription desc, boolean useInclusions, Map<BundleDescription, ArrayList<Rule>> map, ArrayList<IClasspathEntry> entries) throws CoreException {
    IPluginModelBase model = PluginRegistry.findModel(desc);
    if (model == null || !model.isEnabled())
      return false;

    IResource resource = model.getUnderlyingResource();
    Rule[] rules = useInclusions ? getInclusions(map, model) : null;

    BundleDescription hostBundle = fModel.getBundleDescription();
    if (desc == null)
      return false;
View Full Code Here

      }
    }
  }

  private boolean hasExtensibleAPI(BundleDescription desc) {
    IPluginModelBase model = PluginRegistry.findModel(desc);
    return model != null ? ClasspathUtilCore.hasExtensibleAPI(model) : false;
  }
View Full Code Here

        int count = path.getDevice() == null ? 4 : 3;
        if (path.segmentCount() >= count) {
          String pluginID = path.segment(count - 2);
          if (added.contains(pluginID))
            continue;
          IPluginModelBase model = PluginRegistry.findModel(pluginID);
          if (model != null && model.isEnabled()) {
            path = path.setDevice(null);
            path = path.removeFirstSegments(count - 1);
            if (model.getUnderlyingResource() == null) {
              File file = new File(model.getInstallLocation(), path.toOSString());
              if (file.exists()) {
                addExtraLibrary(new Path(file.getAbsolutePath()), model, entries);
              }
            } else {
              IProject project = model.getUnderlyingResource().getProject();
              IFile file = project.getFile(path);
              if (file.exists()) {
                addExtraLibrary(file.getFullPath(), model, entries);
              }
            }
View Full Code Here

TOP

Related Classes of org.eclipse.pde.core.plugin.IPluginModelBase

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.