Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtension


    /**
     * Logs the error in the workbench log using the provided
     * text and the information in the configuration element.
     */
    protected static void logError(IConfigurationElement element, String text) {
        IExtension extension = element.getDeclaringExtension();
        StringBuffer buf = new StringBuffer();
        buf
                .append("Plugin " + extension.getNamespace() + ", extension " + extension.getExtensionPointUniqueIdentifier());//$NON-NLS-2$//$NON-NLS-1$
        buf.append("\n" + text);//$NON-NLS-1$
        WorkbenchPlugin.log(buf.toString());
    }
View Full Code Here


        for ( int m = 0; m < members.length; m++ )
        {
            EntryEditorExtension bean = new EntryEditorExtension();

            IConfigurationElement member = members[m];
            IExtension extension = member.getDeclaringExtension();
            String extendingPluginId = extension.getNamespaceIdentifier();

            bean.setId( member.getAttribute( ID_ATTR ) );
            bean.setName( member.getAttribute( NAME_ATTR ) );
            bean.setDescription( member.getAttribute( DESCRIPTION_ATTR ) );
            String iconPath = member.getAttribute( ICON_ATTR );
View Full Code Here

        {
            ValueEditorExtension proxy = new ValueEditorExtension();
            valueEditorExtensions.add( proxy );

            IConfigurationElement member = members[m];
            IExtension extension = member.getDeclaringExtension();
            String extendingPluginId = extension.getNamespaceIdentifier();

            proxy.member = member;
            proxy.name = member.getAttribute( NAME );
            String iconPath = member.getAttribute( ICON );
            proxy.icon = AbstractUIPlugin.imageDescriptorFromPlugin( extendingPluginId, iconPath );
View Full Code Here

        for ( int m = 0; m < members.length; m++ )
        {
            EntryEditorExtension bean = new EntryEditorExtension();

            IConfigurationElement member = members[m];
            IExtension extension = member.getDeclaringExtension();
            String extendingPluginId = extension.getNamespaceIdentifier();

            bean.setId( member.getAttribute( ID_ATTR ) );
            bean.setName( member.getAttribute( NAME_ATTR ) );
            bean.setDescription( member.getAttribute( DESCRIPTION_ATTR ) );
            String iconPath = member.getAttribute( ICON_ATTR );
View Full Code Here

    for (int i = 0; i < extensions.length; i++) {
      List<Vertex> readableFormats = new ArrayList<Vertex>();
      List<Vertex> writeableFormats = new ArrayList<Vertex>();
      IConversionExtension conversionExtension = null;
     
      IExtension extension = extensions[i];
      IConfigurationElement[] configurations = extension.getConfigurationElements();
      for (int j = 0; j < configurations.length; j++) {
        IConfigurationElement element = configurations[j];
       
        String fileExtension = element.getAttribute("fileExtension");
        String isLossless = element.getAttribute("isLossless");
        if (isLossless == null) {
          isLossless = Boolean.FALSE.toString();
        }

        if (fileExtension != null) {
          Vertex fileFormat = new Vertex(fileExtension,
              isLossless.equals(Boolean.TRUE.toString()));
          if (element.getName().equals("writeableFormat")) {
           
            writeableFormats.add(fileFormat);
          }
          else if (element.getName().equals("readableFormat")) {
            readableFormats.add(fileFormat);
          }
        }
        if (element.getName().equals("implementingClass")){
          try {
            conversionExtension = (IConversionExtension) element.createExecutableExtension("className");
          } catch (CoreException e) {
            // Extension could not be created
            Logger.logError("Error instantiating extension " +extension.getUniqueIdentifier(), this.getClass());
            break;
          }
        }
      }
     
View Full Code Here

        final List<Object> list = Lists.newArrayList();
        final IExtension[] extensions = getExtensions(type);
        // For each extension ...
        for (int i = 0; i < extensions.length; i++) {
            final IExtension extension = extensions[i];
            final IConfigurationElement[] elements = extension.getConfigurationElements();
            // For each member of the extension ...
            for (int j = 0; j < elements.length; j++) {
                final IConfigurationElement element = elements[j];

                try {
View Full Code Here

      return null;
    }

    String extensionPluginId = "";
    if(configElement != null) {
      IExtension extension = configElement.getDeclaringExtension();
      extensionPluginId = extension.getContributor().getName();
    } else {
      // assumes that the icon comes from this plugin
      extensionPluginId = Activator.PLUGIN_ID;
    }
View Full Code Here

      // load elements
      IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(pointId);
      if (extensionPoint != null) {
        IExtension[] extensions = extensionPoint.getExtensions();
        for (int i = 0; i < extensions.length; i++) {
          IExtension extension = extensions[i];
          IConfigurationElement[] configurationElements = extension.getConfigurationElements();
          for (int j = 0; j < configurationElements.length; j++) {
            IConfigurationElement element = configurationElements[j];
            if (elementName.equals(element.getName())) {
              elements.add(element);
            }
View Full Code Here

  ////////////////////////////////////////////////////////////////////////////
  /**
   * @return the {@link org.osgi.framework.Bundle} that defines given {@link IConfigurationElement}.
   */
  public static org.osgi.framework.Bundle getExtensionBundle(IConfigurationElement element) {
    IExtension extension = element.getDeclaringExtension();
    return getExtensionBundle(extension);
  }
View Full Code Here

    private String getNamespace(IConfigurationElement configurationElement) {
        String namespace = null;

        if (configurationElement != null) {
            IExtension extension = configurationElement.getDeclaringExtension();

            if (extension != null) {
        namespace = extension.getNamespace();
      }
        }

        return namespace;
    }
View Full Code Here

TOP

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

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.