| /** |
| * Copyright (c) 2011-2018 EclipseSource Muenchen GmbH and others. |
| * |
| * 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: |
| * Johannes Faltermeier - initial API and implementation |
| */ |
| package org.eclipse.emf.ecp.view.template.style.wrap.model.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.emf.ecp.view.template.style.wrap.model.VTLabelWrapStyleProperty; |
| import org.eclipse.emf.ecp.view.template.style.wrap.model.VTWrapFactory; |
| import org.eclipse.emf.ecp.view.template.style.wrap.model.VTWrapPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public class VTWrapFactoryImpl extends EFactoryImpl implements VTWrapFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static VTWrapFactory init() { |
| try { |
| final VTWrapFactory theWrapFactory = (VTWrapFactory) EPackage.Registry.INSTANCE |
| .getEFactory(VTWrapPackage.eNS_URI); |
| if (theWrapFactory != null) { |
| return theWrapFactory; |
| } |
| } catch (final Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new VTWrapFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public VTWrapFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case VTWrapPackage.LABEL_WRAP_STYLE_PROPERTY: |
| return createLabelWrapStyleProperty(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public VTLabelWrapStyleProperty createLabelWrapStyleProperty() { |
| final VTLabelWrapStylePropertyImpl labelWrapStyleProperty = new VTLabelWrapStylePropertyImpl(); |
| return labelWrapStyleProperty; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public VTWrapPackage getWrapPackage() { |
| return (VTWrapPackage) getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static VTWrapPackage getPackage() { |
| return VTWrapPackage.eINSTANCE; |
| } |
| |
| } // VTWrapFactoryImpl |