Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtension


  private Object getApplication(String[] args) throws CoreException {
    // Assume we are in 3.0 mode.
    // 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));
   
    // If no 3.0 extension can be found, search the registry
    // for the pre-3.0 default workbench application, i.e. org.eclipse ui.workbench
    // Set the deprecated flag to true
    if (extension == null) {
      extension = Platform.getExtensionRegistry().getExtension(
          Platform.PI_RUNTIME,
          Platform.PT_APPLICATIONS,
          DEFAULT_APP_PRE_3_0);
      fInDeprecatedMode = true;
    }
   
    Assert.assertNotNull(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)
View Full Code Here


        {
            ValueEditorExtension proxy = new ValueEditorExtension();
            valueEditorProxies.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

            IExtension[] extensions = extensionPoint.getExtensions();
            if ( extensions != null )
            {
                for ( int i = 0; i < extensions.length; i++ )
                {
                    IExtension extension = extensions[i];
                    IConfigurationElement[] elements = extension.getConfigurationElements();
                    for ( int j = 0; j < elements.length; j++ )
                    {
                        IConfigurationElement element = elements[j];
                        if ( element.getName().equals( "perspective" ) ) //$NON-NLS-1$
                        {
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

  private Object getApplication(String[] args) throws CoreException {
    // Assume we are in 3.0 mode.
    // 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));

    // If no 3.0 extension can be found, search the registry
    // for the pre-3.0 default workbench application, i.e. org.eclipse ui.workbench
    // Set the deprecated flag to true
    if (extension == null) {
      extension = Platform.getExtensionRegistry().getExtension(
          Platform.PI_RUNTIME,
          Platform.PT_APPLICATIONS,
          DEFAULT_APP_PRE_3_0);
      fInDeprecatedMode = true;
    }

    Assert.assertNotNull(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)
View Full Code Here

            IExtension[] extensions = extensionPoint.getExtensions();
            if ( extensions != null )
            {
                for ( int i = 0; i < extensions.length; i++ )
                {
                    IExtension extension = extensions[i];
                    IConfigurationElement[] elements = extension.getConfigurationElements();
                    for ( int j = 0; j < elements.length; j++ )
                    {
                        IConfigurationElement element = elements[j];
                        if ( element.getName().equals( "perspective" ) )
                        {
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

            IExtension[] extensions = extensionPoint.getExtensions();
            if ( extensions != null )
            {
                for ( int i = 0; i < extensions.length; i++ )
                {
                    IExtension extension = extensions[i];
                    IConfigurationElement[] elements = extension.getConfigurationElements();
                    for ( int j = 0; j < elements.length; j++ )
                    {
                        IConfigurationElement element = elements[j];
                        if ( element.getName().equals( "perspective" ) )
                        {
View Full Code Here

   * @param extensionId must not be null
   */
  public IExtensionDelta getExtensionDelta(String extensionPointId, String extensionId) {
    for (Iterator extDeltasIter = extensionDeltas.iterator(); extDeltasIter.hasNext();) {
      IExtensionDelta extensionDelta = (IExtensionDelta) extDeltasIter.next();
      IExtension extension = extensionDelta.getExtension();
      if (extension.getExtensionPointUniqueIdentifier().equals(extensionPointId) && extension.getUniqueIdentifier() != null && extension.getUniqueIdentifier().equals(extensionId))
        return extensionDelta;
    }
    return null;
  }
View Full Code Here

      }

      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 {
            processElement(extension, element);
          } catch (Throwable e) { // we must catch Throwable instead of Exception since we often have NoClassDefFoundErrors (during first start or when server's class configuration changes)
            // Only log the error and continue
            log.error("Error processing extension element. The element is located in an extension in bundle: " + extension.getNamespaceIdentifier(), e); //$NON-NLS-1$
          }
        }
      }

    }
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.