blob: 670ad36ce56d56c585269e9294438bc4fdd91288 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2014-2019 Xored Software Inc and others.
* 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
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.tesla.core.protocol.diagram.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.rcptt.tesla.core.protocol.ElementCommand;
import org.eclipse.rcptt.tesla.core.protocol.diagram.*;
import org.eclipse.rcptt.tesla.core.protocol.raw.Command;
import org.eclipse.rcptt.tesla.core.protocol.raw.Response;
/**
* <!-- 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.rcptt.tesla.core.protocol.diagram.DiagramPackage
* @generated
*/
public class DiagramAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static DiagramPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DiagramAdapterFactory() {
if (modelPackage == null) {
modelPackage = DiagramPackage.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 DiagramSwitch<Adapter> modelSwitch =
new DiagramSwitch<Adapter>() {
@Override
public Adapter caseCreateFigure(CreateFigure object) {
return createCreateFigureAdapter();
}
@Override
public Adapter caseCreateFigureResponse(CreateFigureResponse object) {
return createCreateFigureResponseAdapter();
}
@Override
public Adapter caseMoveFigure(MoveFigure object) {
return createMoveFigureAdapter();
}
@Override
public Adapter caseSetFigureSelection(SetFigureSelection object) {
return createSetFigureSelectionAdapter();
}
@Override
public Adapter caseGetFigures(GetFigures object) {
return createGetFiguresAdapter();
}
@Override
public Adapter caseGetFiguresResponse(GetFiguresResponse object) {
return createGetFiguresResponseAdapter();
}
@Override
public Adapter caseActivateDirectEdit(ActivateDirectEdit object) {
return createActivateDirectEditAdapter();
}
@Override
public Adapter caseCancelDirectEdit(CancelDirectEdit object) {
return createCancelDirectEditAdapter();
}
@Override
public Adapter caseCommitDirectEdit(CommitDirectEdit object) {
return createCommitDirectEditAdapter();
}
@Override
public Adapter caseCreateConnection(CreateConnection object) {
return createCreateConnectionAdapter();
}
@Override
public Adapter caseCreateConnectionResponse(CreateConnectionResponse object) {
return createCreateConnectionResponseAdapter();
}
@Override
public Adapter caseResizeFigure(ResizeFigure object) {
return createResizeFigureAdapter();
}
@Override
public Adapter caseMouseCommand(MouseCommand object) {
return createMouseCommandAdapter();
}
@Override
public Adapter caseFigureMouseCommand(FigureMouseCommand object) {
return createFigureMouseCommandAdapter();
}
@Override
public Adapter caseAssertFigureExists(AssertFigureExists object) {
return createAssertFigureExistsAdapter();
}
@Override
public Adapter caseCommand(Command object) {
return createCommandAdapter();
}
@Override
public Adapter caseElementCommand(ElementCommand object) {
return createElementCommandAdapter();
}
@Override
public Adapter caseResponse(Response object) {
return createResponseAdapter();
}
@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.rcptt.tesla.core.protocol.diagram.CreateFigure <em>Create Figure</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.rcptt.tesla.core.protocol.diagram.CreateFigure
* @generated
*/
public Adapter createCreateFigureAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.CreateFigureResponse <em>Create Figure Response</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.rcptt.tesla.core.protocol.diagram.CreateFigureResponse
* @generated
*/
public Adapter createCreateFigureResponseAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.MoveFigure <em>Move Figure</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.rcptt.tesla.core.protocol.diagram.MoveFigure
* @generated
*/
public Adapter createMoveFigureAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.SetFigureSelection <em>Set Figure Selection</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.rcptt.tesla.core.protocol.diagram.SetFigureSelection
* @generated
*/
public Adapter createSetFigureSelectionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.GetFigures <em>Get Figures</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.rcptt.tesla.core.protocol.diagram.GetFigures
* @generated
*/
public Adapter createGetFiguresAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.GetFiguresResponse <em>Get Figures Response</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.rcptt.tesla.core.protocol.diagram.GetFiguresResponse
* @generated
*/
public Adapter createGetFiguresResponseAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.ActivateDirectEdit <em>Activate Direct Edit</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.rcptt.tesla.core.protocol.diagram.ActivateDirectEdit
* @generated
*/
public Adapter createActivateDirectEditAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.CancelDirectEdit <em>Cancel Direct Edit</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.rcptt.tesla.core.protocol.diagram.CancelDirectEdit
* @generated
*/
public Adapter createCancelDirectEditAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.CommitDirectEdit <em>Commit Direct Edit</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.rcptt.tesla.core.protocol.diagram.CommitDirectEdit
* @generated
*/
public Adapter createCommitDirectEditAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.CreateConnection <em>Create Connection</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.rcptt.tesla.core.protocol.diagram.CreateConnection
* @generated
*/
public Adapter createCreateConnectionAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.CreateConnectionResponse <em>Create Connection Response</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.rcptt.tesla.core.protocol.diagram.CreateConnectionResponse
* @generated
*/
public Adapter createCreateConnectionResponseAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.ResizeFigure <em>Resize Figure</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.rcptt.tesla.core.protocol.diagram.ResizeFigure
* @generated
*/
public Adapter createResizeFigureAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.MouseCommand <em>Mouse Command</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.rcptt.tesla.core.protocol.diagram.MouseCommand
* @generated
*/
public Adapter createMouseCommandAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.FigureMouseCommand <em>Figure Mouse Command</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.rcptt.tesla.core.protocol.diagram.FigureMouseCommand
* @generated
*/
public Adapter createFigureMouseCommandAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.diagram.AssertFigureExists <em>Assert Figure Exists</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.rcptt.tesla.core.protocol.diagram.AssertFigureExists
* @generated
*/
public Adapter createAssertFigureExistsAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.raw.Command <em>Command</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.rcptt.tesla.core.protocol.raw.Command
* @generated
*/
public Adapter createCommandAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.ElementCommand <em>Element Command</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.rcptt.tesla.core.protocol.ElementCommand
* @generated
*/
public Adapter createElementCommandAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link org.eclipse.rcptt.tesla.core.protocol.raw.Response <em>Response</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.rcptt.tesla.core.protocol.raw.Response
* @generated
*/
public Adapter createResponseAdapter() {
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;
}
} //DiagramAdapterFactory