blob: 82c8403a261d15b057d10e2b51eb7381a5ffcaad [file] [log] [blame]
/**
* Copyright (c) 2019 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*/
package org.eclipse.papyrus.model2doc.gmf.documentstructuretemplate.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.gmf.runtime.notation.Diagram;
import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.IBodyPartTemplate;
import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.IBodySectionPartTemplate;
import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.ILeafBodyPartTemplate;
import org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.ITemplatePartView;
import org.eclipse.papyrus.model2doc.gmf.documentstructuretemplate.*;
/**
* <!-- 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.papyrus.model2doc.gmf.documentstructuretemplate.GMFDocumentStructureTemplatePackage
* @generated
*/
public class GMFDocumentStructureTemplateAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
protected static GMFDocumentStructureTemplatePackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public GMFDocumentStructureTemplateAdapterFactory() {
if (modelPackage == null) {
modelPackage = GMFDocumentStructureTemplatePackage.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 GMFDocumentStructureTemplateSwitch<Adapter> modelSwitch = new GMFDocumentStructureTemplateSwitch<>() {
@Override
public Adapter caseGMFDiagramView(GMFDiagramView object) {
return createGMFDiagramViewAdapter();
}
@Override
public Adapter caseDiagram(Diagram object) {
return createDiagramAdapter();
}
@Override
public Adapter caseITemplatePartView(ITemplatePartView object) {
return createITemplatePartViewAdapter();
}
@Override
public Adapter caseIBodySectionPartTemplate(IBodySectionPartTemplate object) {
return createIBodySectionPartTemplateAdapter();
}
@Override
public Adapter caseIBodyPartTemplate(IBodyPartTemplate object) {
return createIBodyPartTemplateAdapter();
}
@Override
public Adapter caseILeafBodyPartTemplate(ILeafBodyPartTemplate object) {
return createILeafBodyPartTemplateAdapter();
}
@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.papyrus.model2doc.gmf.documentstructuretemplate.GMFDiagramView <em>GMF Diagram 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.papyrus.model2doc.gmf.documentstructuretemplate.GMFDiagramView
* @generated
*/
public Adapter createGMFDiagramViewAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.gmf.runtime.notation.Diagram <em>Diagram</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.gmf.runtime.notation.Diagram
* @generated
*/
public Adapter createDiagramAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.ITemplatePartView <em>ITemplate Part 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.papyrus.model2doc.emf.documentstructuretemplate.ITemplatePartView
* @generated
*/
public Adapter createITemplatePartViewAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.IBodySectionPartTemplate <em>IBody Section Part Template</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.papyrus.model2doc.emf.documentstructuretemplate.IBodySectionPartTemplate
* @generated
*/
public Adapter createIBodySectionPartTemplateAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.IBodyPartTemplate <em>IBody Part Template</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.papyrus.model2doc.emf.documentstructuretemplate.IBodyPartTemplate
* @generated
*/
public Adapter createIBodyPartTemplateAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.model2doc.emf.documentstructuretemplate.ILeafBodyPartTemplate <em>ILeaf Body Part Template</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.papyrus.model2doc.emf.documentstructuretemplate.ILeafBodyPartTemplate
* @generated
*/
public Adapter createILeafBodyPartTemplateAdapter() {
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;
}
} // GMFDocumentStructureTemplateAdapterFactory