Package org.eclipse.pde.core.plugin

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


      createProductExtension();
  }

  private void createViewExtension() throws CoreException {
    IPluginBase plugin = model.getPluginBase();
    IPluginExtension extension = createExtension("org.eclipse.ui.views", true); //$NON-NLS-1$
    IPluginModelFactory factory = model.getPluginFactory();
   
    String fullClassName = getStringOption(KEY_PACKAGE_NAME) + "." + getStringOption(KEY_VIEW_PART_CLASS); //$NON-NLS-1$ //$NON-NLS-2$
    IPluginElement viewElement = factory.createElement(extension);
    viewElement.setName("view"); //$NON-NLS-1$
    viewElement.setAttribute("id", fullClassName); //$NON-NLS-1$
    viewElement.setAttribute("name", getStringOption(KEY_VIEW_NAME)); //$NON-NLS-1$ //$NON-NLS-2$
    viewElement.setAttribute("icon", "icons/sample.gif"); //$NON-NLS-1$ //$NON-NLS-2$
    viewElement.setAttribute("class", fullClassName); //$NON-NLS-1$
    extension.add(viewElement);
   
    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here


  }
 
  private void createApplicationExtension() throws CoreException {
    IPluginBase plugin = model.getPluginBase();

    IPluginExtension extension = createExtension("org.eclipse.core.runtime.applications", true); //$NON-NLS-1$
    extension.setId(VALUE_APPLICATION_ID);

    IPluginElement element = model.getPluginFactory().createElement(extension);
    element.setName("application"); //$NON-NLS-1$
    extension.add(element);

    IPluginElement run = model.getPluginFactory().createElement(element);
    run.setName("run"); //$NON-NLS-1$
    run.setAttribute("class", getStringOption(KEY_PACKAGE_NAME) + "." + getStringOption(KEY_APPLICATION_CLASS)); //$NON-NLS-1$ //$NON-NLS-2$
    element.add(run);

    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here

  }

  private void createPerspectiveExtension() throws CoreException {
    IPluginBase plugin = model.getPluginBase();

    IPluginExtension extension = createExtension("org.eclipse.ui.perspectives", true); //$NON-NLS-1$
    IPluginElement element = model.getPluginFactory().createElement(extension);
    element.setName("perspective"); //$NON-NLS-1$
    element.setAttribute("class", getStringOption(KEY_PACKAGE_NAME) + ".Perspective"); //$NON-NLS-1$ //$NON-NLS-2$
    element.setAttribute("name", VALUE_PERSPECTIVE_NAME); //$NON-NLS-1$
    element.setAttribute("id", plugin.getId() + ".perspective"); //$NON-NLS-1$ //$NON-NLS-2$
    extension.add(element);

    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here

      plugin.add(extension);
  }

  private void createProductExtension() throws CoreException {
    IPluginBase plugin = model.getPluginBase();
    IPluginExtension extension = createExtension("org.eclipse.core.runtime.products", true); //$NON-NLS-1$
    extension.setId(VALUE_PRODUCT_ID);

    IPluginElement element = model.getFactory().createElement(extension);
    element.setName("product"); //$NON-NLS-1$
    element.setAttribute("name", getStringOption(KEY_WINDOW_TITLE)); //$NON-NLS-1$ 
    element.setAttribute("application", plugin.getId() + "." + VALUE_APPLICATION_ID); //$NON-NLS-1$ //$NON-NLS-2$

    IPluginElement property = model.getFactory().createElement(element);

    property = model.getFactory().createElement(element);
    property.setName("property"); //$NON-NLS-1$
    property.setAttribute("name", "windowImages"); //$NON-NLS-1$ //$NON-NLS-2$
    property.setAttribute("value", "icons/alt_window_16.gif,icons/alt_window_32.gif"); //$NON-NLS-1$ //$NON-NLS-2$
    element.add(property);

    extension.add(element);

    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here

  @Override
  protected void updateModel(IProgressMonitor monitor) throws CoreException {
    Activator.getDefault().acquireService(IBundleProjectService.class);
   
    IPluginBase plugin = model.getPluginBase();
    IPluginExtension extension = createExtension("org.eclipse.ui.views", true); //$NON-NLS-1$
    IPluginModelFactory factory = model.getPluginFactory();
   
    String fullClassName = getStringOption(KEY_PACKAGE_NAME) + "." + getStringOption(KEY_VIEW_PART_CLASS); //$NON-NLS-1$ //$NON-NLS-2$
    IPluginElement viewElement = factory.createElement(extension);
    viewElement.setName("view"); //$NON-NLS-1$
    viewElement.setAttribute("id", fullClassName); //$NON-NLS-1$
    viewElement.setAttribute("name", getStringOption(KEY_VIEW_NAME)); //$NON-NLS-1$ //$NON-NLS-2$
    viewElement.setAttribute("icon", "icons/sample.gif"); //$NON-NLS-1$ //$NON-NLS-2$
    viewElement.setAttribute("class", fullClassName); //$NON-NLS-1$
    extension.add(viewElement);
   
    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here

  }

  private void createApplicationExtension() throws CoreException {
    IPluginBase plugin = model.getPluginBase();

    IPluginExtension extension = createExtension("org.eclipse.core.runtime.applications", true); //$NON-NLS-1$
    extension.setId(VALUE_APPLICATION_ID);

    IPluginElement element = model.getPluginFactory().createElement(extension);
    element.setName("application"); //$NON-NLS-1$
    extension.add(element);

    IPluginElement run = model.getPluginFactory().createElement(element);
    run.setName("run"); //$NON-NLS-1$
    run.setAttribute("class", getStringOption(KEY_PACKAGE_NAME) + "." + getStringOption(KEY_APPLICATION_CLASS)); //$NON-NLS-1$ //$NON-NLS-2$
    element.add(run);

    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here

      plugin.add(extension);
  }
 
  private void createProductExtension() throws CoreException {
    IPluginBase plugin = model.getPluginBase();
    IPluginExtension extension = createExtension("org.eclipse.core.runtime.products", true); //$NON-NLS-1$
    extension.setId(VALUE_PRODUCT_ID);

    IPluginElement element = model.getFactory().createElement(extension);
    element.setName("product"); //$NON-NLS-1$
    element.setAttribute("name", getStringOption(KEY_WINDOW_TITLE)); //$NON-NLS-1$ 
    element.setAttribute("application", plugin.getId() + "." + VALUE_APPLICATION_ID); //$NON-NLS-1$ //$NON-NLS-2$

    IPluginElement property = model.getFactory().createElement(element);

    property = model.getFactory().createElement(element);
    property.setName("property"); //$NON-NLS-1$
    property.setAttribute("name", "windowImages"); //$NON-NLS-1$ //$NON-NLS-2$
    property.setAttribute("value", "icons/alt_window_16.gif,icons/alt_window_32.gif"); //$NON-NLS-1$ //$NON-NLS-2$
    element.add(property);

    extension.add(element);

    if (!extension.isInTheModel())
      plugin.add(extension);
  }
View Full Code Here

TOP

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

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.