Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtension


        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


    }

    // try the id of the extension element itself
    if (config.getParent() != null
        && config.getParent() instanceof IExtension) {
      IExtension extensionDefinition = (IExtension) config.getParent();
      return extensionDefinition.getSimpleIdentifier();
    }

    return null;
  }
View Full Code Here

    @Override
    public void loadCodepathExtensions() {
        final IExtensionPoint exPnt = BackendUtils.getCodepathExtension();
        final IExtension[] extensions = exPnt.getExtensions();
        for (int e = 0; e < extensions.length; e++) {
            final IExtension extension = extensions[e];
            if (!extension.isValid()) {
                continue;
            }
            addCodeBundle(extension);
        }
    }
View Full Code Here

     *
     * @param element
     * @param text
     */
    protected void logError( IConfigurationElement element, String text ) {
        IExtension extension = element.getDeclaringExtension();
        StringBuffer buf = new StringBuffer();
        buf.append(extension.getLabel() + " "+extension.getNamespaceIdentifier()+", extension " + extension.getExtensionPointUniqueIdentifier());//$NON-NLS-2$//$NON-NLS-1$
        buf.append("\n" + text);//$NON-NLS-1$
        String message = buf.toString();

        this.pluginLog.log(newStatus(IStatus.ERROR, message, null));
        System.err.println(message);
View Full Code Here

            return;
        IExtension[] extensions = extensionPoint.getExtensions();

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

            // For each member of the extension ...
            for( int j = 0; j < elements.length; j++ ) {
                IConfigurationElement element = elements[j];
                try {
View Full Code Here

        }
        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();

            // For each member of the extension ...
            for( int j = 0; j < elements.length; j++ ) {
                IConfigurationElement element = elements[j];
                try {
                    Object obj = itemCreator.createItem(extension, element);
                    if (obj == null)
                        continue; // warning?

                    list.add(obj);
                } catch (Throwable exception) {
                    CorePlugin
                            .getDefault()
                            .getLog()
                            .log(
                                    new Status(
                                            IStatus.WARNING,
                                            extension.getNamespaceIdentifier(),
                                            0,
                                            MessageFormat
                                                    .format(
                                                            "Error processing extension {0}", new Object[]{exception}), exception)); //$NON-NLS-1$
                }
View Full Code Here

        this.description = actionElement
                .getAttribute(IWorkbenchRegistryConstants.TAG_DESCRIPTION);

        String iconName = actionElement.getAttribute(IWorkbenchRegistryConstants.ATT_ICON);
        if (iconName != null) {
            IExtension extension = actionElement.getDeclaringExtension();
            this.image = AbstractUIPlugin.imageDescriptorFromPlugin(extension
                    .getNamespace(), iconName);
        }
    }
View Full Code Here

      }

      private IConfigurationElement findElement(
          String desiredHelpSystemId, IExtension[] extensions) {
        for (int i = 0; i < extensions.length; i++) {
          IExtension extension = extensions[i];
          if (desiredHelpSystemId.equals(extension.getUniqueIdentifier())) {
            IConfigurationElement[] elements = extensions[0]
                .getConfigurationElements();
            if (elements.length == 0) {
              // help UI present but mangled - act like there was
              // no help
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

   */
  private Object getApplication(String[] args) throws CoreException {
    // Find the name of the application as specified by the PDE JUnit launcher.
    // If no application is specified, the 3.0 default workbench application
    // is returned.
    IExtension extension =
      Platform.getExtensionRegistry().getExtension(
          Platform.PI_RUNTIME,
          Platform.PT_APPLICATIONS,
          getApplicationToRun(args));

    Assert.isNotNull(extension);

    // If the extension does not have the correct grammar, return null.
    // Otherwise, return the application object.
    IConfigurationElement[] elements = extension.getConfigurationElements();
    if (elements.length > 0) {
      IConfigurationElement[] runs = elements[0].getChildren("run"); //$NON-NLS-1$
      if (runs.length > 0) {
        Object runnable = runs[0].createExecutableExtension("class"); //$NON-NLS-1$
        if ((runnable instanceof IPlatformRunnable) || (runnable instanceof IApplication))
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.