/**
* Copyright (c) 2008 Olivier Moises
*
* 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:
* Olivier Moises- initial API and implementation
*/
package org.eclipse.wazaabi.mm.core.extras.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.wazaabi.mm.core.extras.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class CoreExtrasFactoryImpl extends EFactoryImpl implements CoreExtrasFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static CoreExtrasFactory init() {
try {
CoreExtrasFactory theCoreExtrasFactory = (CoreExtrasFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.wazaabi.org/core/extras");
if (theCoreExtrasFactory != null) {
return theCoreExtrasFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new CoreExtrasFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CoreExtrasFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case CoreExtrasPackage.TEXT_CELL_EDITOR: return createTextCellEditor();
case CoreExtrasPackage.CHECKBOX_CELL_EDITOR: return createCheckboxCellEditor();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TextCellEditor createTextCellEditor() {
TextCellEditorImpl textCellEditor = new TextCellEditorImpl();
return textCellEditor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CheckboxCellEditor createCheckboxCellEditor() {
CheckboxCellEditorImpl checkboxCellEditor = new CheckboxCellEditorImpl();
return checkboxCellEditor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CoreExtrasPackage getCoreExtrasPackage() {
return (CoreExtrasPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static CoreExtrasPackage getPackage() {
return CoreExtrasPackage.eINSTANCE;
}
} //CoreExtrasFactoryImpl