/*******************************************************************************
* Copyright (c) 2008, 2011 Obeo.
* 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:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.emf.eef.views.util;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.eef.views.*;
import org.eclipse.emf.eef.views.Category;
import org.eclipse.emf.eef.views.Container;
import org.eclipse.emf.eef.views.CustomElementEditor;
import org.eclipse.emf.eef.views.CustomView;
import org.eclipse.emf.eef.views.DocumentedElement;
import org.eclipse.emf.eef.views.ElementEditor;
import org.eclipse.emf.eef.views.IdentifiedElement;
import org.eclipse.emf.eef.views.View;
import org.eclipse.emf.eef.views.ViewElement;
import org.eclipse.emf.eef.views.ViewReference;
import org.eclipse.emf.eef.views.ViewsPackage;
import org.eclipse.emf.eef.views.ViewsRepository;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see org.eclipse.emf.eef.views.ViewsPackage
* @generated
*/
public class ViewsAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static ViewsPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ViewsAdapterFactory() {
if (modelPackage == null) {
modelPackage = ViewsPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ViewsSwitch<Adapter> modelSwitch = new ViewsSwitch<Adapter>() {
@Override
public Adapter caseViewsRepository(ViewsRepository object) {
return createViewsRepositoryAdapter();
}
@Override
public Adapter caseView(View object) {
return createViewAdapter();
}
@Override
public Adapter caseElementEditor(ElementEditor object) {
return createElementEditorAdapter();
}
@Override
public Adapter caseCategory(Category object) {
return createCategoryAdapter();
}
@Override
public Adapter caseContainer(Container object) {
return createContainerAdapter();
}
@Override
public Adapter caseViewElement(ViewElement object) {
return createViewElementAdapter();
}
@Override
public Adapter caseCustomElementEditor(CustomElementEditor object) {
return createCustomElementEditorAdapter();
}
@Override
public Adapter caseCustomView(CustomView object) {
return createCustomViewAdapter();
}
@Override
public Adapter caseDocumentedElement(DocumentedElement object) {
return createDocumentedElementAdapter();
}
@Override
public Adapter caseViewReference(ViewReference object) {
return createViewReferenceAdapter();
}
@Override
public Adapter caseIdentifiedElement(IdentifiedElement object) {
return createIdentifiedElementAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject) target);
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.ViewsRepository <em>Repository</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.ViewsRepository
* @generated
*/
public Adapter createViewsRepositoryAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.View <em>View</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.View
* @generated
*/
public Adapter createViewAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.ElementEditor <em>Element Editor</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.ElementEditor
* @generated
*/
public Adapter createElementEditorAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.Category <em>Category</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.Category
* @generated
*/
public Adapter createCategoryAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.Container <em>Container</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.Container
* @generated
*/
public Adapter createContainerAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.ViewElement <em>View Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.ViewElement
* @generated
*/
public Adapter createViewElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.CustomElementEditor <em>Custom Element Editor</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.CustomElementEditor
* @generated
*/
public Adapter createCustomElementEditorAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.CustomView <em>Custom View</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.CustomView
* @generated
*/
public Adapter createCustomViewAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.DocumentedElement <em>Documented Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.DocumentedElement
* @generated
*/
public Adapter createDocumentedElementAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.ViewReference <em>View Reference</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.ViewReference
* @generated
*/
public Adapter createViewReferenceAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.emf.eef.views.IdentifiedElement <em>Identified Element</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
* @return the new adapter.
* @see org.eclipse.emf.eef.views.IdentifiedElement
* @generated
*/
public Adapter createIdentifiedElementAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //ViewsAdapterFactory