Search in sources :

Example 1 with PropagatingAdapterFactory

use of org.eclipse.wst.sse.core.internal.PropagatingAdapterFactory in project webtools.sourceediting by eclipse.

the class PropagatingAdapterFactoryImpl method copy.

public INodeAdapterFactory copy() {
    PropagatingAdapterFactory clonedInstance = new PropagatingAdapterFactoryImpl(getAdapterKey(), isShouldRegisterAdapter());
    // clone this adapters specific list of adapter factories too
    if (fContributedFactories != null) {
        Iterator iterator = fContributedFactories.iterator();
        clonedInstance.setContributedFactories(new ArrayList());
        while (iterator.hasNext()) {
            INodeAdapterFactory existingFactory = (INodeAdapterFactory) iterator.next();
            clonedInstance.addContributedFactories(existingFactory.copy());
        }
    }
    return clonedInstance;
}
Also used : PropagatingAdapterFactory(org.eclipse.wst.sse.core.internal.PropagatingAdapterFactory) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) INodeAdapterFactory(org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory)

Aggregations

ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 PropagatingAdapterFactory (org.eclipse.wst.sse.core.internal.PropagatingAdapterFactory)1 INodeAdapterFactory (org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory)1