Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtensionPoint


     * @param targetPluginId
     * @param extensionPoint
     */
    public void readRegistry( IExtensionRegistry registry, String targetPluginId,
            String extensionPoint ) {
        IExtensionPoint point = registry.getExtensionPoint(targetPluginId, extensionPoint);
        if (point == null)
            return;
        IExtension[] extensions = point.getExtensions();
        extensions = orderExtensions(extensions);
        for( int i = 0; i < extensions.length; i++ )
            readExtension(extensions[i]);
    }
View Full Code Here


    /**
     * Construct <code>ExtensionPointIterator</code>.
     */
    private ExtensionPointList( String xpid ) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null)
            return;

        // For each extension ...
        for( IExtension extension : extensionPoint.getExtensions() ) {
            try {
                addAll(Arrays.asList(extension.getConfigurationElements()));
            } catch (Exception e) {
                Bundle bundle = Platform.getBundle(extensionPoint.getNamespaceIdentifier());
                if (bundle == null) {
                    if (CorePlugin.getDefault().isDebugging()) {
                        System.out
                                .println("Could not locate bundle for " + extensionPoint.getUniqueIdentifier()); //$NON-NLS-1$
                    }
                    bundle = CorePlugin.getDefault().getBundle();
                }
                ILog log = Platform.getLog(bundle);
                log.log(new Status(Status.ERROR, extension.getNamespaceIdentifier(), 0,
                        extensionPoint.getUniqueIdentifier() + Messages.ExtensionPointList_problem
                                + e, e));
            }
        }
    }
View Full Code Here

     * @param xpid The id of the ExtensionPoint for which the extensions are to be processed
     * @param processor The object that wishes to process the extension for the ExtensionPoint
     */
    public static void process( Plugin plugin, String xpid, ExtensionPointProcessor processor ) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null)
            return;
        IExtension[] extensions = extensionPoint.getExtensions();

        // For each extension ...
        for( int i = 0; i < extensions.length; i++ ) {
            IExtension extension = extensions[i];
            IConfigurationElement[] elements = extension.getConfigurationElements();
View Full Code Here

     * @param itemCreator Used to process extention points into items for a list
     * @return List
     */
    public static List list( String xpid, ExtensionPointItemCreator itemCreator ) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null) {
            return Collections.EMPTY_LIST;
        }
        IExtension[] extensions = extensionPoint.getExtensions();
        List<Object> list = new ArrayList<Object>();
        // For each extension ...
        for( int i = 0; i < extensions.length; i++ ) {
            IExtension extension = extensions[i];
            IConfigurationElement[] elements = extension.getConfigurationElements();
View Full Code Here

  public static Class getListenerAdapter(Class list) {
    return listenerAdapters.get(list);
  }

  private static void parseListenerAdapterExtensions() {
    IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(LISTENER_ADAPTER_EXTENSION);
    if (extensionPoint != null) {
      IExtension[] extensions = extensionPoint.getExtensions();
      if (extensions != null && extensions.length > 0) {
        for (int i = 0; i < extensions.length; i++) {
          parseListenerAdapterExtension(extensions[i]);
        }
      }
View Full Code Here

    fieldParsers = new ArrayList<IFieldParser>();
    parseFieldParsers();
  }

  private void parseFieldParsers() {
    IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(FIELD_PARSER_EXTENSION_ID);
    if (extensionPoint != null) {
      IExtension[] extensions = extensionPoint.getExtensions();
      if (extensions != null && extensions.length > 0) {
        for (int i = 0; i < extensions.length; i++) {
          parseFieldParser(extensions[i]);
        }
      }
View Full Code Here

   
    public void remove() {
    }
  }
  private void parseListenerModels() {
    IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(EVENT_LISTENER_MODEL_EXTENSION_ID);
    if (extensionPoint != null) {
      IExtension[] extensions = extensionPoint.getExtensions();
      if (extensions != null && extensions.length > 0) {
        for (int i = 0; i < extensions.length; i++) {
          parseListenerModel(extensions[i]);
        }
      }
View Full Code Here

    protected static IDropActionDelegate getPluginAdapter(
            PluginTransferData data) throws CoreException {

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        String adapterName = data.getExtensionId();
        IExtensionPoint xpt = registry.getExtensionPoint(PlatformUI.PLUGIN_ID,
                IWorkbenchRegistryConstants.PL_DROP_ACTIONS);
        IExtension[] extensions = xpt.getExtensions();
        for (int i = 0; i < extensions.length; i++) {
            IConfigurationElement[] configs = extensions[i]
                    .getConfigurationElements();
            if (configs != null && configs.length > 0) {
                String id = configs[0].getAttribute("id");//$NON-NLS-1$
View Full Code Here

   */
  public static AbstractSplashHandler findSplashHandlerFor(IProduct product) {
    if (product == null)
      return null;

    IExtensionPoint point = Platform.getExtensionRegistry()
        .getExtensionPoint(PlatformUI.PLUGIN_ID,
            IWorkbenchRegistryConstants.PL_SPLASH_HANDLERS);

    if (point == null)
      return null;

    IExtension[] extensions = point.getExtensions();
    Map idToSplash = new HashMap(); // String->ConfigurationElement
    String[] targetId = new String[1];
    for (int i = 0; i < extensions.length; i++) {
      IConfigurationElement[] children = extensions[i]
          .getConfigurationElements();
View Full Code Here

     * @return IElementFactory
     */
    public IElementFactory getElementFactory(String targetID) {

        // Get the extension point registry.
        IExtensionPoint extensionPoint;
        extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
                PI_WORKBENCH, IWorkbenchRegistryConstants.PL_ELEMENT_FACTORY);

        if (extensionPoint == null) {
            WorkbenchPlugin
                    .log("Unable to find element factory. Extension point: " + IWorkbenchRegistryConstants.PL_ELEMENT_FACTORY + " not found"); //$NON-NLS-2$ //$NON-NLS-1$
            return null;
        }

        // Loop through the config elements.
        IConfigurationElement targetElement = null;
        IConfigurationElement[] configElements = extensionPoint
                .getConfigurationElements();
        for (int j = 0; j < configElements.length; j++) {
            String strID = configElements[j].getAttribute("id"); //$NON-NLS-1$
            if (targetID.equals(strID)) {
                targetElement = configElements[j];
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IExtensionPoint

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.