Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtensionRegistry


     */
    public static Collection<ValueEditorExtension> getValueEditorExtensions()
    {
        Collection<ValueEditorExtension> valueEditorExtensions = new ArrayList<ValueEditorExtension>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint( EXTENSION_POINT );
        IConfigurationElement[] members = extensionPoint.getConfigurationElements();

        // For each extension:
        for ( int m = 0; m < members.length; m++ )
        {
View Full Code Here


    {
        if ( jndiLoggers == null )
        {
            jndiLoggers = new ArrayList<IJndiLogger>();

            IExtensionRegistry registry = Platform.getExtensionRegistry();
            IExtensionPoint extensionPoint = registry.getExtensionPoint( getPluginProperties().getString(
                "ExtensionPoint_JndiLogger_id" ) ); //$NON-NLS-1$
            IConfigurationElement[] members = extensionPoint.getConfigurationElements();
            for ( IConfigurationElement member : members )
            {
                try
View Full Code Here

    {
        if ( connectionListeners == null )
        {
            connectionListeners = new ArrayList<IConnectionListener>();

            IExtensionRegistry registry = Platform.getExtensionRegistry();
            IExtensionPoint extensionPoint = registry.getExtensionPoint( getPluginProperties().getString(
                "ExtensionPoint_ConnectionListener_id" ) ); //$NON-NLS-1$
            IConfigurationElement[] members = extensionPoint.getConfigurationElements();
            for ( IConfigurationElement member : members )
            {
                try
View Full Code Here

     *
     * @return the connection parameter pages
     */
    public static ConnectionParameterPage[] getConnectionParameterPages()
    {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint( ConnectionUIPlugin.getDefault()
            .getPluginProperties().getString( "ExtensionPoint_ConnectionParameterPages_id" ) ); //$NON-NLS-1$
        IConfigurationElement[] members = extensionPoint.getConfigurationElements();
        final Map<String, ConnectionParameterPage> pageMap = new HashMap<String, ConnectionParameterPage>();

        // For each extension: instantiate the page
View Full Code Here

     */
    public List<AdapterFactory> getAdapterFactories() {
        if (adapterFactories == null) {
            adapterFactories = new ArrayList<AdapterFactory>();

            IExtensionRegistry registry = Platform.getExtensionRegistry();
            IExtensionPoint extensionPoint = registry.getExtensionPoint(ADAPTER_FACTORIES_ID);
            IExtension[] extensions = extensionPoint.getExtensions();

            for( int i = 0; i < extensions.length; i++ ) {
                IConfigurationElement[] elements = extensions[i].getConfigurationElements();

View Full Code Here

     */
    public synchronized static List<ExpressionViewerFactory> factoryList() {
        if (factoryList == null) {
            ArrayList<ExpressionViewerFactory> list = new ArrayList<ExpressionViewerFactory>();

            IExtensionRegistry registery = Platform.getExtensionRegistry();
            IExtensionPoint extensionPoint = registery.getExtensionPoint(FILTER_VIEWER_EXTENSION);

            IConfigurationElement[] configurationElements = extensionPoint
                    .getConfigurationElements();
            for (IConfigurationElement configuration : configurationElements) {
                if ("expressionViewer".equals(configuration.getName())) {
View Full Code Here

* @since 1.2.0
*/
public class PlatformExample {
    void processingExtensionPointByHand() {
        String xpid = "org.locationtech.udig.project.ui.tool";
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null) {
            throw new NullPointerException("Could not find extensionPoint:" + xpid);
        }
        for( IExtension extension : extensionPoint.getExtensions() ) {
            for( IConfigurationElement element : extension.getConfigurationElements() ) {
View Full Code Here

   
    private synchronized static List<FilterViewerFactory> filterViewerFactoryList() {
        if (filterViewerFactoryList == null) {
            ArrayList<FilterViewerFactory> list = new ArrayList<FilterViewerFactory>();
           
            IExtensionRegistry registery = Platform.getExtensionRegistry();
            IExtensionPoint extensionPoint = registery.getExtensionPoint(FILTER_VIEWER_EXTENSION);
           
            IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements();
            for (IConfigurationElement configuration : configurationElements) {
                if ("filterViewer".equals(configuration.getName())) {
                    try {
View Full Code Here

  public EclipsePlatformFactory() {
  }
 
  public Platform createPlatform() {
    // Look if someone implemented an extension point to retrive the platform
        IExtensionRegistry reg = org.eclipse.core.runtime.Platform.getExtensionRegistry();
        if (reg != null) {
            IConfigurationElement[] elt = reg.getConfigurationElementsFor("com.ibm.commons.PlatformFactory"); // $NON-NLS-1$
            for( int i=0; i<elt.length; i++ ) {
                if( "platformFactory".equalsIgnoreCase(elt[i].getName()) ) { // $NON-NLS-1$
                    try {
                        Object o = elt[i].createExecutableExtension("class"); // $NON-NLS-1$
                        IPlatformFactory factory = (IPlatformFactory)o;
View Full Code Here

   
    private static class EclipseProvider extends JavaServiceProvider {
        public void findInitializer(ClassLoader loader, List<Object> initializers, String serviceType) {
          // Load the global providers, from the platform
            try {
                IExtensionRegistry reg = org.eclipse.core.runtime.Platform.getExtensionRegistry();
                if (reg != null) {
                  // Services defined individually
                    // Look if someone implemented an extension point to retrieve the platform
                    IConfigurationElement[] elt = reg.getConfigurationElementsFor("com.ibm.commons.Extension"); // $NON-NLS-1$
                    for( int i=0; i<elt.length; i++ ) {
                        if( "service".equalsIgnoreCase(elt[i].getName()) ) { // $NON-NLS-1$
                            String type = elt[i].getAttribute("type"); //$NON-NLS-1$
                            if(StringUtil.equals(type, serviceType)) {
                                try {
                                    Object o = elt[i].createExecutableExtension("class"); // $NON-NLS-1$
                                    initializers.add(o);
                                } catch(Throwable ex) {
                                    logCouldNotCreateContribution(ex, elt[i], type);
                                }
                            }
                        }
                    }
                // Services read from META-INF/services
                //
                Set<URL> urls = new HashSet<URL>();
                    elt = reg.getConfigurationElementsFor("com.ibm.commons.ExtensionBundle")// $NON-NLS-1$
                    for( int i=0; i<elt.length; i++ ) {
                        try {
                            OSGiExtensionService o = (OSGiExtensionService)elt[i].createExecutableExtension("class");
                            Bundle bundle = o.getBundle();
                            if(bundle!=null) {
View Full Code Here

TOP

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

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.