Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtension


    public ProducerDescriptor(IConfigurationElement config) {
      this.config = config;
    }

    public boolean matches(String refId) {
      IExtension ex = config.getDeclaringExtension();
      String id = ex.getUniqueIdentifier();
      return id != null && id.equals(refId);
    }
View Full Code Here


        }
      }
      if (addNew) {
        IExtensionRegistry reg = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = reg.getExtensionPoint("org.cfeclipse.cfeclipsecall.core.openhandler");
        IExtension extensions[] = extensionPoint.getExtensions();
        for (int i = 0; i < extensions.length; i++) {
          IExtension ext = extensions[i];
          IConfigurationElement[] elements = ext.getConfigurationElements();
          for (int j = 0; j < elements.length; j++) {
            IConfigurationElement el = elements[j];
            String clz = el.getAttribute("handlerClass");
            if (clz != null) {
              try {
View Full Code Here

      }
      if (addNew) {
        CFECallPlugin.log(IStatus.INFO, "initializing extensions.");
        IExtensionRegistry reg = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = reg.getExtensionPoint("org.cfeclipse.cfeclipsecall.core.openhandler");
        IExtension extensions[] = extensionPoint.getExtensions();
        for (int i = 0; i < extensions.length; i++) {
          IExtension ext = extensions[i];
          IConfigurationElement[] elements = ext.getConfigurationElements();
          for (int j = 0; j < elements.length; j++) {
            IConfigurationElement el = elements[j];
            String clz = el.getAttribute("handlerClass");
            if (clz != null) {
              try {
View Full Code Here

  private static Map<String, Object> collectAttributes(final IConfigurationElement config) {
    final Map<String, Object> map = new HashMap<String, Object>();

    try {
      final IExtension extension = config.getDeclaringExtension();

      // use @ to avoid conflicting with attributes in the XML
      safePut(map, "@id", extension.getUniqueIdentifier());
      safePut(map, "@label", extension.getLabel());
      safePut(map, "@contributor", config.getContributor());
      safePut(map, "@namespace", config.getNamespaceIdentifier());
      safePut(map, "@point", extension.getExtensionPointUniqueIdentifier());

      // similarly use () to avoid conflicts
      safePut(map, "name()", config.getName());
      safePut(map, "text()", config.getValue());
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.
    String applicationToRun = getApplicationToRun(args);
    IExtension extension = Platform.getExtensionRegistry().getExtension(Platform.PI_RUNTIME, Platform.PT_APPLICATIONS,
        applicationToRun);

    Assert.isNotNull(extension, "Could not find IExtension for application: " + applicationToRun);

    // 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

    // 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.
    String applicationToRun = getApplicationToRun(args);
   
    IExtension extension = Platform.getExtensionRegistry().getExtension(Platform.PI_RUNTIME, Platform.PT_APPLICATIONS,
        applicationToRun);

    Assert.isNotNull(extension, "Could not find IExtension for application: " + applicationToRun);

    // 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

    // 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.
    String applicationToRun = getApplicationToRun(args);

    IExtension extension = Platform.getExtensionRegistry().getExtension(Platform.PI_RUNTIME, Platform.PT_APPLICATIONS,
        applicationToRun);

    Assert.isNotNull(extension, "Could not find IExtension for application: " + applicationToRun);

    // 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

            IExtension[] extensions = ExtensionHelper.getExtensions("org.eclipse.core.expressions.propertyTesters");
            // For each extension ...
            propertyTester = new ArrayList<PropertyTester>();
            propertyTesters.put(name, propertyTester);
            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];
                    //Any property tester that's declared in "org.python.pydev.customizations"
                    //is considered to be an object that provides the objectState for an IActionFilter.
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" ) )
                        {
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.