Package org.eclipse.pde.core.plugin

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


  }

  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

            protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
                monitor.beginTask("", 2500);
                project.create(description, monitor);
                project.open(monitor);
               
                IPluginModelBase model = new BundlePluginModelBase(){
                    private static final long serialVersionUID = 1L;

                    public IPluginBase createPluginBase() {
                        return new BundlePluginBase();
                    }
View Full Code Here

            protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
                monitor.beginTask("", 2500);
                project.create(description, monitor);
                project.open(monitor);
               
                IPluginModelBase model = new BundlePluginModelBase(){
                    private static final long serialVersionUID = 1L;

                    public IPluginBase createPluginBase() {
                        return new BundlePluginBase();
                    }
View Full Code Here

                     InterruptedException {
                monitor.beginTask("", 2500);
                project.create(description, monitor);
                project.open(monitor);
               
                IPluginModelBase model = new BundlePluginModelBase(){
                    private static final long serialVersionUID = 1L;

                    public IPluginBase createPluginBase() {
                        return new BundlePluginBase();
                    }
View Full Code Here

        return path != null && path.segmentCount() > 1 && path.toFile().exists();
    }

    private static String[] createPluginClassPath(IJavaProject javaProject) throws CoreException {
        String[] javaClassPath = createJavaClasspath(javaProject);
        IPluginModelBase model = PluginRegistry.findModel(javaProject.getProject());
        if (model == null || model.getPluginBase().getId() == null) {
            return javaClassPath;
        }
        List<String> pdeClassPath = new ArrayList<String>();
        pdeClassPath.addAll(Arrays.asList(javaClassPath));

        BundleDescription target = model.getBundleDescription();

        Set<BundleDescription> bundles = new HashSet<BundleDescription>();
        // target is null if plugin uses non OSGI format
        if (target != null) {
            addDependentBundles(target, bundles);
View Full Code Here

        }
        return pdeClassPath.toArray(new String[pdeClassPath.size()]);
    }

    private static void appendBundleToClasspath(BundleDescription bd, List<String> pdeClassPath, IPath defaultOutputLocation) {
        IPluginModelBase model = PluginRegistry.findModel(bd);
        if(model == null) {
            return;
        }
        ArrayList<IClasspathEntry> classpathEntries = new ArrayList<IClasspathEntry>();
        ClasspathUtilCore.addLibraries(model, classpathEntries);
View Full Code Here

  }

  private ArrayList<BundlePluginModelBase> getModleList() {
    for (Iterator it = this.selection.iterator(); it.hasNext();) {
      IProject project = (IProject) it.next();
      IPluginModelBase model = PluginRegistry.findModel(project);
      if (model instanceof BundlePluginModelBase) {
        BundlePluginModelBase pluginModel = (BundlePluginModelBase) model;
        this.pluginModelList.add(pluginModel);
      }
    }
View Full Code Here

  {
    final IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
    final ArrayList models = new ArrayList();
    for (int i = 0; i < projects.length; i++)
    {
      final IPluginModelBase model = PluginRegistry.findModel(projects[i].getName());
      if (model != null)
        models.add(model);
    }
    SysOutProgressMonitor.out.print("Exporting Plugins: ");
    for (int i = 0; i < models.size(); i++)
View Full Code Here

      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++)
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.