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;
}
Aggregations