Examples of IExtension


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

Examples of org.eclipse.core.runtime.IExtension

        {
            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

Examples of org.eclipse.core.runtime.IExtension

            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

Examples of org.eclipse.core.runtime.IExtension

   */
  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 IApplication)
View Full Code Here

Examples of org.eclipse.core.runtime.IExtension

            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

Examples of org.eclipse.core.runtime.IExtension

   */
  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 IApplication)
View Full Code Here

Examples of org.eclipse.core.runtime.IExtension

            return null;
        }
       
        try{
            XMLMemento memento = XMLMemento.createReadRoot(new StringReader(mementoString));
            IExtension extension = Platform.getExtensionRegistry().getExtension(PrintingModelPlugin.BOX_PRINTER_EXTENSION_ID, extensionID);
            if( extension==null ){
                PrintingModelPlugin.log("The method "+className+"#getExtensionID() returned: "+extensionID+ //$NON-NLS-1$ //$NON-NLS-2$
                        " this is not the correct extension id.  Check the extension id.  \nHint: Read the " + //$NON-NLS-1$
                        "javadocs for the method", null); //$NON-NLS-1$
                return null;
            }
            IConfigurationElement[] elements = extension.getConfigurationElements();
            IConfigurationElement current=null;
            for( int i = 0; current==null && i < elements.length; i++ ) {
                current=elements[i];
                if( current.getName().equals("editActionGroup") ){ //$NON-NLS-1$
                    current=null;
View Full Code Here

Examples of org.eclipse.core.runtime.IExtension

                // this is a "real" object that cannot be shared between runs
            }
        } catch (Exception e) {
            String msg = "Error persisting content: " + value.getClass(); //$NON-NLS-1$
            if (persister != null) {
                IExtension ext = persister.getExtension();
                IStatus status = new Status(IStatus.WARNING, ext.getNamespaceIdentifier(), 0, msg,
                        e);
                ProjectPlugin.getPlugin().getLog().log(status);
            } else {
                ProjectPlugin.log("error loading persister", e); //$NON-NLS-1$
            }
View Full Code Here

Examples of org.eclipse.core.runtime.IExtension

     */
    private void processTools() {
        List<IConfigurationElement> extensionList = ExtensionPointList
                .getExtensionPointList(Tool.EXTENSION_ID);
        for( IConfigurationElement element : extensionList ) {
            IExtension extension = element.getDeclaringExtension();
            String type = element.getName();

            if (type.equals("backgroundTool")) { //$NON-NLS-1$

                ToolProxy proxy = new ToolProxy(extension, element, this);
View Full Code Here

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) {
      return null;
    }
   
    // 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) {
        return runs[0].createExecutableExtension("class"); //$NON-NLS-1$
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.