Package org.locationtech.udig.project.internal.impl

Examples of org.locationtech.udig.project.internal.impl.SynchronizedEList


            @Override
            protected IStatus run( IProgressMonitor monitor ) {
                if (parent instanceof Map) {
                    Map map = (Map) parent;
                    boolean found = false;
                    SynchronizedEList adapters = (SynchronizedEList) map.getContextModel()
                            .eAdapters();
                    adapters.lock();
                    try {
                        for( Iterator<Adapter> iter = adapters.iterator(); iter.hasNext(); ) {
                            Adapter next = iter.next();
                            if (next instanceof ContextModelItemProvider
                                    && ((ContextModelItemProvider) next).getAdapterFactory() == getAdapterFactory())
                                found = true;
                        }
                    } finally {
                        adapters.unlock();
                    }
                    if (!found) {
                        ContextModelItemProvider provider = new ContextModelItemProvider(
                                getAdapterFactory());
                        adapters.add(provider);
                    }
                }

                IStatus result = super.run(monitor);
                return result;
View Full Code Here


            @Override
            protected IStatus run(IProgressMonitor monitor) {
                if (parent instanceof Map) {
                    Map map = (Map) parent;
                    boolean found = false;
                    SynchronizedEList adapters = (SynchronizedEList) map.getContextModel()
                            .eAdapters();
                    adapters.lock();
                    try {
                        for (Iterator<Adapter> iter = adapters.iterator(); iter.hasNext();) {
                            Adapter next = iter.next();
                            if (next instanceof ContextModelItemProvider
                                    && ((ContextModelItemProvider) next).getAdapterFactory() == getAdapterFactory())
                                found = true;
                        }
                    } finally {
                        adapters.unlock();
                    }
                    if (!found) {
                        ContextModelItemProvider provider = new ContextModelItemProvider(
                                getAdapterFactory());
                        adapters.add(provider);
                    }
                }

                IStatus result = super.run(monitor);
                return result;
View Full Code Here

TOP

Related Classes of org.locationtech.udig.project.internal.impl.SynchronizedEList

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.