| /******************************************************************************* |
| * 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.ecl.debug.commands.impl; |
| |
| import java.util.Map; |
| |
| |
| 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.EcorePackage; |
| |
| import org.eclipse.emf.ecore.impl.EPackageImpl; |
| import org.eclipse.rcptt.ecl.core.CorePackage; |
| import org.eclipse.rcptt.ecl.debug.commands.CommandsFactory; |
| import org.eclipse.rcptt.ecl.debug.commands.CommandsPackage; |
| import org.eclipse.rcptt.ecl.debug.commands.DebugCommand; |
| import org.eclipse.rcptt.ecl.debug.commands.DebugScript; |
| import org.eclipse.rcptt.ecl.debug.commands.ServerInfo; |
| import org.eclipse.rcptt.ecl.debug.commands.StartServer; |
| import org.eclipse.rcptt.ecl.debug.commands.StopServer; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Package</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class CommandsPackageImpl extends EPackageImpl implements CommandsPackage { |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass startServerEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass stopServerEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass serverInfoEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass debugScriptEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass debugCommandEClass = null; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private EClass pathsMapEClass = 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.ecl.debug.commands.CommandsPackage#eNS_URI |
| * @see #init() |
| * @generated |
| */ |
| private CommandsPackageImpl() { |
| super(eNS_URI, CommandsFactory.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 CommandsPackage#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 CommandsPackage init() { |
| if (isInited) return (CommandsPackage)EPackage.Registry.INSTANCE.getEPackage(CommandsPackage.eNS_URI); |
| |
| // Obtain or create and register package |
| CommandsPackageImpl theCommandsPackage = (CommandsPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof CommandsPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new CommandsPackageImpl()); |
| |
| isInited = true; |
| |
| // Initialize simple dependencies |
| CorePackage.eINSTANCE.eClass(); |
| |
| // Create package meta-data objects |
| theCommandsPackage.createPackageContents(); |
| |
| // Initialize created meta-data |
| theCommandsPackage.initializePackageContents(); |
| |
| // Mark meta-data to indicate it can't be changed |
| theCommandsPackage.freeze(); |
| |
| |
| // Update the registry and return the package |
| EPackage.Registry.INSTANCE.put(CommandsPackage.eNS_URI, theCommandsPackage); |
| return theCommandsPackage; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getStartServer() { |
| return startServerEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getStartServer_Id() { |
| return (EAttribute)startServerEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getStopServer() { |
| return stopServerEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getStopServer_Id() { |
| return (EAttribute)stopServerEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getServerInfo() { |
| return serverInfoEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getServerInfo_Port() { |
| return (EAttribute)serverInfoEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getDebugScript() { |
| return debugScriptEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getDebugScript_Path() { |
| return (EAttribute)debugScriptEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getDebugScript_Session() { |
| return (EAttribute)debugScriptEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getDebugScript_Paths() { |
| return (EReference)debugScriptEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getDebugCommand() { |
| return debugCommandEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getDebugCommand_Path() { |
| return (EAttribute)debugCommandEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getDebugCommand_Session() { |
| return (EAttribute)debugCommandEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getDebugCommand_Command() { |
| return (EReference)debugCommandEClass.getEStructuralFeatures().get(2); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EReference getDebugCommand_Paths() { |
| return (EReference)debugCommandEClass.getEStructuralFeatures().get(3); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EClass getPathsMap() { |
| return pathsMapEClass; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getPathsMap_Key() { |
| return (EAttribute)pathsMapEClass.getEStructuralFeatures().get(0); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public EAttribute getPathsMap_Value() { |
| return (EAttribute)pathsMapEClass.getEStructuralFeatures().get(1); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public CommandsFactory getCommandsFactory() { |
| return (CommandsFactory)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 |
| startServerEClass = createEClass(START_SERVER); |
| createEAttribute(startServerEClass, START_SERVER__ID); |
| |
| stopServerEClass = createEClass(STOP_SERVER); |
| createEAttribute(stopServerEClass, STOP_SERVER__ID); |
| |
| serverInfoEClass = createEClass(SERVER_INFO); |
| createEAttribute(serverInfoEClass, SERVER_INFO__PORT); |
| |
| debugScriptEClass = createEClass(DEBUG_SCRIPT); |
| createEAttribute(debugScriptEClass, DEBUG_SCRIPT__PATH); |
| createEAttribute(debugScriptEClass, DEBUG_SCRIPT__SESSION); |
| createEReference(debugScriptEClass, DEBUG_SCRIPT__PATHS); |
| |
| debugCommandEClass = createEClass(DEBUG_COMMAND); |
| createEAttribute(debugCommandEClass, DEBUG_COMMAND__PATH); |
| createEAttribute(debugCommandEClass, DEBUG_COMMAND__SESSION); |
| createEReference(debugCommandEClass, DEBUG_COMMAND__COMMAND); |
| createEReference(debugCommandEClass, DEBUG_COMMAND__PATHS); |
| |
| pathsMapEClass = createEClass(PATHS_MAP); |
| createEAttribute(pathsMapEClass, PATHS_MAP__KEY); |
| createEAttribute(pathsMapEClass, PATHS_MAP__VALUE); |
| } |
| |
| /** |
| * <!-- 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 |
| CorePackage theCorePackage = (CorePackage)EPackage.Registry.INSTANCE.getEPackage(CorePackage.eNS_URI); |
| EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI); |
| |
| // Create type parameters |
| |
| // Set bounds for type parameters |
| |
| // Add supertypes to classes |
| startServerEClass.getESuperTypes().add(theCorePackage.getCommand()); |
| stopServerEClass.getESuperTypes().add(theCorePackage.getCommand()); |
| debugScriptEClass.getESuperTypes().add(theCorePackage.getScript()); |
| debugCommandEClass.getESuperTypes().add(theCorePackage.getCommand()); |
| |
| // Initialize classes and features; add operations and parameters |
| initEClass(startServerEClass, StartServer.class, "StartServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getStartServer_Id(), theEcorePackage.getEString(), "id", null, 0, 1, StartServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(stopServerEClass, StopServer.class, "StopServer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getStopServer_Id(), theEcorePackage.getEString(), "id", null, 0, 1, StopServer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(serverInfoEClass, ServerInfo.class, "ServerInfo", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getServerInfo_Port(), ecorePackage.getEInt(), "port", null, 0, 1, ServerInfo.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(debugScriptEClass, DebugScript.class, "DebugScript", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getDebugScript_Path(), theEcorePackage.getEString(), "path", null, 0, 1, DebugScript.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getDebugScript_Session(), theEcorePackage.getEString(), "session", null, 0, 1, DebugScript.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getDebugScript_Paths(), this.getPathsMap(), null, "paths", null, 0, -1, DebugScript.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(debugCommandEClass, DebugCommand.class, "DebugCommand", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getDebugCommand_Path(), theEcorePackage.getEString(), "path", null, 0, 1, DebugCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getDebugCommand_Session(), theEcorePackage.getEString(), "session", null, 0, 1, DebugCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getDebugCommand_Command(), theCorePackage.getCommand(), null, "command", null, 0, 1, DebugCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEReference(getDebugCommand_Paths(), this.getPathsMap(), null, "paths", null, 0, -1, DebugCommand.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| initEClass(pathsMapEClass, Map.Entry.class, "PathsMap", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS); |
| initEAttribute(getPathsMap_Key(), theEcorePackage.getEString(), "key", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| initEAttribute(getPathsMap_Value(), theEcorePackage.getEString(), "value", null, 0, 1, Map.Entry.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
| |
| // Create resource |
| createResource(eNS_URI); |
| |
| // Create annotations |
| // http://www.eclipse.org/ecl/internal |
| createInternalAnnotations(); |
| } |
| |
| /** |
| * Initializes the annotations for <b>http://www.eclipse.org/ecl/internal</b>. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| protected void createInternalAnnotations() { |
| String source = "http://www.eclipse.org/ecl/internal"; |
| addAnnotation |
| (startServerEClass, |
| source, |
| new String[] { |
| }); |
| addAnnotation |
| (stopServerEClass, |
| source, |
| new String[] { |
| }); |
| addAnnotation |
| (debugScriptEClass, |
| source, |
| new String[] { |
| }); |
| addAnnotation |
| (debugCommandEClass, |
| source, |
| new String[] { |
| }); |
| } |
| |
| } //CommandsPackageImpl |