| /******************************************************************************* |
| * Copyright (c) 2009, 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 v2.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.filesystem.impl; |
| |
| import org.eclipse.emf.ecore.EAttribute; |
| import org.eclipse.emf.ecore.EClass; |
| import org.eclipse.emf.ecore.EPackage; |
| import org.eclipse.emf.ecore.EReference; |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| import org.eclipse.rcptt.ecl.core.CorePackage; |
| |
| import org.eclipse.rcptt.core.scenario.ScenarioPackage; |
| import org.eclipse.rcptt.filesystem.FSCaptureParam; |
| import org.eclipse.rcptt.filesystem.FSFile; |
| import org.eclipse.rcptt.filesystem.FSFolder; |
| import org.eclipse.rcptt.filesystem.FSResource; |
| import org.eclipse.rcptt.filesystem.FilesystemContext; |
| import org.eclipse.rcptt.filesystem.FilesystemFactory; |
| import org.eclipse.rcptt.filesystem.FilesystemPackage; |
| |
| /** |
| * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- |
| * end-user-doc --> |
| * @generated |
| */ |
| public class FilesystemPackageImpl extends EPackageImpl implements |
| FilesystemPackage { |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass filesystemContextEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass fsResourceEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass fsFileEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass fsFolderEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass fsCaptureParamEClass = null; |
| |
| /** |
| * Creates an instance of the model <b>Package</b>, registered with |
| * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the |
| * package package URI value. |
| * <p> |
| * Note: the correct way to create the package is via the static factory |
| * method {@link #init init()}, which also performs initialization of the |
| * package, or returns the registered package, if one already exists. <!-- |
| * begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see org.eclipse.emf.ecore.EPackage.Registry |
| * @see org.eclipse.rcptt.filesystem.FilesystemPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private FilesystemPackageImpl() { |
| super(eNS_URI, FilesystemFactory.eINSTANCE); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private static boolean isInited = false; |
| |
| /** |
| * Creates, registers, and initializes the <b>Package</b> for this model, |
| * and for any others upon which it depends. |
| * |
| * <p> |
| * This method is used to initialize {@link FilesystemPackage#eINSTANCE} |
| * when that field is accessed. Clients should not invoke it directly. |
| * Instead, they should simply access that field to obtain the package. <!-- |
| * begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @see #eNS_URI |
| * @see #createPackageContents() |
| * @see #initializePackageContents() |
| * @generated |
| */ |
| public static FilesystemPackage init() { |
| if (isInited) return (FilesystemPackage)EPackage.Registry.INSTANCE.getEPackage(FilesystemPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| FilesystemPackageImpl theFilesystemPackage = (FilesystemPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FilesystemPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FilesystemPackageImpl()); |
| |
| isInited = true; |
| |
| // Initialize simple dependencies |
| CorePackage.eINSTANCE.eClass(); |
| ScenarioPackage.eINSTANCE.eClass(); |
| |
| // Create package meta-data objects |
| theFilesystemPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theFilesystemPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theFilesystemPackage.freeze(); |
| |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(FilesystemPackage.eNS_URI, theFilesystemPackage); |
| return theFilesystemPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFilesystemContext() { |
| return filesystemContextEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFilesystemContext_Path() { |
| return (EAttribute)filesystemContextEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getFilesystemContext_Root() { |
| return (EReference)filesystemContextEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFilesystemContext_Clear() { |
| return (EAttribute)filesystemContextEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFSResource() { |
| return fsResourceEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFSResource_Name() { |
| return (EAttribute)fsResourceEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFSFile() { |
| return fsFileEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFSFile_Data() { |
| return (EAttribute)fsFileEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFSFolder() { |
| return fsFolderEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getFSFolder_Folders() { |
| return (EReference)fsFolderEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getFSFolder_Files() { |
| return (EReference)fsFolderEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getFSCaptureParam() { |
| return fsCaptureParamEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFSCaptureParam_Path() { |
| return (EAttribute)fsCaptureParamEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getFSCaptureParam_Clear() { |
| return (EAttribute)fsCaptureParamEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| public FilesystemFactory getFilesystemFactory() { |
| return (FilesystemFactory)getEFactoryInstance(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isCreated = false; |
| |
| /** |
| * Creates the meta-model objects for the package. This method is |
| * guarded to have no affect on any invocation but its first. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public void createPackageContents() { |
| if (isCreated) return; |
| isCreated = true; |
| |
| // Create classes and their features |
| filesystemContextEClass = createEClass(FILESYSTEM_CONTEXT); |
| createEAttribute(filesystemContextEClass, FILESYSTEM_CONTEXT__PATH); |
| createEReference(filesystemContextEClass, FILESYSTEM_CONTEXT__ROOT); |
| createEAttribute(filesystemContextEClass, FILESYSTEM_CONTEXT__CLEAR); |
| |
| fsResourceEClass = createEClass(FS_RESOURCE); |
| createEAttribute(fsResourceEClass, FS_RESOURCE__NAME); |
| |
| fsFileEClass = createEClass(FS_FILE); |
| createEAttribute(fsFileEClass, FS_FILE__DATA); |
| |
| fsFolderEClass = createEClass(FS_FOLDER); |
| createEReference(fsFolderEClass, FS_FOLDER__FOLDERS); |
| createEReference(fsFolderEClass, FS_FOLDER__FILES); |
| |
| fsCaptureParamEClass = createEClass(FS_CAPTURE_PARAM); |
| createEAttribute(fsCaptureParamEClass, FS_CAPTURE_PARAM__PATH); |
| createEAttribute(fsCaptureParamEClass, FS_CAPTURE_PARAM__CLEAR); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * @generated |
| */ |
| private boolean isInitialized = false; |
| |
| /** |
| * Complete the initialization of the package and its meta-model. This |
| * method is guarded to have no affect on any invocation but its first. <!-- |
| * begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public void initializePackageContents() { |
| if (isInitialized) return; |
| isInitialized = true; |
| |
| // Initialize package |
| setName(eNAME); |
| setNsPrefix(eNS_PREFIX); |
| setNsURI(eNS_URI); |
| |
| // Obtain other dependent packages |
| ScenarioPackage theScenarioPackage = (ScenarioPackage)EPackage.Registry.INSTANCE.getEPackage(ScenarioPackage.eNS_URI); |
| |
| // Create type parameters |
| |
| // Set bounds for type parameters |
| |
| // Add supertypes to classes |
| filesystemContextEClass.getESuperTypes().add(theScenarioPackage.getContext()); |
| fsFileEClass.getESuperTypes().add(this.getFSResource()); |
| fsFolderEClass.getESuperTypes().add(this.getFSResource()); |
| |
| // Initialize classes and features; add operations and parameters |
| initEClass(filesystemContextEClass, FilesystemContext.class, "FilesystemContext", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getFilesystemContext_Path(), ecorePackage.getEString(), "path", null, 0, 1, FilesystemContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getFilesystemContext_Root(), this.getFSFolder(), null, "root", null, 0, 1, FilesystemContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getFilesystemContext_Clear(), ecorePackage.getEBoolean(), "clear", "true", 0, 1, FilesystemContext.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(fsResourceEClass, FSResource.class, "FSResource", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getFSResource_Name(), ecorePackage.getEString(), "name", null, 0, 1, FSResource.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(fsFileEClass, FSFile.class, "FSFile", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getFSFile_Data(), ecorePackage.getEByteArray(), "data", null, 0, 1, FSFile.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(fsFolderEClass, FSFolder.class, "FSFolder", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEReference(getFSFolder_Folders(), this.getFSFolder(), null, "folders", null, 0, -1, FSFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getFSFolder_Files(), this.getFSFile(), null, "files", null, 0, -1, FSFolder.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(fsCaptureParamEClass, FSCaptureParam.class, "FSCaptureParam", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getFSCaptureParam_Path(), ecorePackage.getEString(), "path", null, 0, 1, FSCaptureParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getFSCaptureParam_Clear(), ecorePackage.getEBoolean(), "clear", null, 0, 1, FSCaptureParam.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| // Create resource |
| createResource(eNS_URI); |
| } |
| |
| } // FilesystemPackageImpl |