| /******************************************************************************* |
| * Copyright (c) 2012-2014 SAP SE. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * SAP SE - initial API and implementation and/or initial documentation |
| * |
| *******************************************************************************/ |
| package org.eclipse.ogee.navigation.tree; |
| |
| import java.util.ArrayList; |
| |
| import org.eclipse.emf.common.notify.AdapterFactory; |
| import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory; |
| import org.eclipse.emf.edit.provider.ComposedAdapterFactory; |
| import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; |
| import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; |
| |
| public class MNComposedAdapterFactory { |
| |
| private static ComposedAdapterFactory mnCompAdapterFactory; |
| |
| public final static ComposedAdapterFactory getAdapterFactory() { |
| if (mnCompAdapterFactory == null) |
| mnCompAdapterFactory = new ComposedAdapterFactory( |
| createFactoryList()); |
| return mnCompAdapterFactory; |
| } |
| |
| public final static ArrayList<AdapterFactory> createFactoryList() { |
| ArrayList<AdapterFactory> factories = new ArrayList<AdapterFactory>(); |
| factories.add(new ResourceItemProviderAdapterFactory()); |
| factories.add(new EcoreItemProviderAdapterFactory()); |
| factories.add(new ReflectiveItemProviderAdapterFactory()); |
| return factories; |
| } |
| |
| } |