├── .gitattributes ├── .github └── workflows │ └── dotnetcore.yml ├── .gitignore ├── Ecore.sln ├── Ecore ├── Ecore.csproj ├── Ecore.nuspec ├── Ecore │ ├── AbstractCollection.cs │ ├── Adapter.cs │ ├── AdapterImpl.cs │ ├── Bag.cs │ ├── BasicDiagnostic.cs │ ├── BasicEObjectImpl.cs │ ├── BasicNotifierImpl.cs │ ├── Collection.cs │ ├── Diagnostic.cs │ ├── DiagnosticChain.cs │ ├── DiagnosticImpl.cs │ ├── Diagnostician.cs │ ├── EAnnotation.cs │ ├── EAnnotationBase.cs │ ├── EAnnotationImpl.cs │ ├── EAttribute.cs │ ├── EAttributeBase.cs │ ├── EAttributeImpl.cs │ ├── EClass.cs │ ├── EClassBase.cs │ ├── EClassImpl.cs │ ├── EClassifier.cs │ ├── EClassifierBase.cs │ ├── EClassifierImpl.cs │ ├── EDataType.cs │ ├── EDataTypeBase.cs │ ├── EDataTypeImpl.cs │ ├── EEnum.cs │ ├── EEnumBase.cs │ ├── EEnumImpl.cs │ ├── EEnumLiteral.cs │ ├── EEnumLiteralBase.cs │ ├── EEnumLiteralImpl.cs │ ├── EEnumerator.cs │ ├── EFactory.cs │ ├── EFactoryBase.cs │ ├── EFactoryImpl.cs │ ├── EGenericType.cs │ ├── EGenericTypeBase.cs │ ├── EGenericTypeImpl.cs │ ├── EMap.cs │ ├── EModelElement.cs │ ├── EModelElementBase.cs │ ├── EModelElementImpl.cs │ ├── ENamedElement.cs │ ├── ENamedElementBase.cs │ ├── ENamedElementImpl.cs │ ├── ENotificationImpl.cs │ ├── EObject.cs │ ├── EObjectBase.cs │ ├── EObjectImpl.cs │ ├── EObjectValidator.cs │ ├── EOperation.cs │ ├── EOperationBase.cs │ ├── EOperationImpl.cs │ ├── EPackage.cs │ ├── EPackageBase.cs │ ├── EPackageImpl.cs │ ├── EParameter.cs │ ├── EParameterBase.cs │ ├── EParameterImpl.cs │ ├── EReference.cs │ ├── EReferenceBase.cs │ ├── EReferenceImpl.cs │ ├── EStringToStringMapEntry.cs │ ├── EStringToStringMapEntryBase.cs │ ├── EStringToStringMapEntryImpl.cs │ ├── EStructuralFeature.cs │ ├── EStructuralFeatureBase.cs │ ├── EStructuralFeatureImpl.cs │ ├── ETypeParameter.cs │ ├── ETypeParameterBase.cs │ ├── ETypeParameterImpl.cs │ ├── ETypedElement.cs │ ├── ETypedElementBase.cs │ ├── ETypedElementImpl.cs │ ├── EValidator.cs │ ├── EcoreEList.cs │ ├── EcoreEMap.cs │ ├── EcoreFactory.cs │ ├── EcoreFactoryImpl.cs │ ├── EcorePackage.cs │ ├── EcorePackageImpl.cs │ ├── EcoreSwitch.cs │ ├── EcoreUtil.cs │ ├── EcoreValidator.cs │ ├── InternalEObject.cs │ ├── Map.cs │ ├── Notification.cs │ ├── NotificationChain.cs │ ├── NotificationChainImpl.cs │ ├── NotificationImpl.cs │ ├── Notifier.cs │ ├── NotifyingList.cs │ ├── OclAny.cs │ ├── OclInvalid.cs │ ├── OclVoid.cs │ ├── OrderedSet.cs │ ├── Resource.cs │ ├── ResourceLocator.cs │ ├── Sequence.cs │ ├── Serializer.cs │ ├── Set.cs │ ├── Switch.cs │ ├── TreeIterator.cs │ └── UnlimitedNatural.cs └── Xmi │ └── XmiResource.cs ├── EcoreTest ├── .gitignore ├── EReferenceIntegrityTest.cs ├── EcoreTest.csproj ├── Ocltestmodel │ ├── MyClass.cs │ ├── MyClassBase.cs │ ├── MyClassImpl.cs │ ├── OcltestmodelFactory.cs │ ├── OcltestmodelFactoryImpl.cs │ ├── OcltestmodelPackage.cs │ ├── OcltestmodelPackageImpl.cs │ ├── OcltestmodelSwitch.cs │ └── index.html ├── OrderedSetTest.cs ├── Serialization │ ├── MyClass.cs │ ├── MyClassBase.cs │ ├── MyClassImpl.cs │ ├── OtherClass.cs │ ├── OtherClassBase.cs │ ├── OtherClassImpl.cs │ ├── SerializationFactory.cs │ ├── SerializationFactoryImpl.cs │ ├── SerializationPackage.cs │ ├── SerializationPackageImpl.cs │ ├── SerializationSwitch.cs │ ├── SerializationValidator.cs │ ├── YetAnotherClass.cs │ ├── YetAnotherClassBase.cs │ ├── YetAnotherClassImpl.cs │ ├── index.html │ └── project.csproj └── Testmodel │ ├── A.cs │ ├── ABase.cs │ ├── AImpl.cs │ ├── B.cs │ ├── BBase.cs │ ├── BImpl.cs │ ├── C.cs │ ├── CBase.cs │ ├── CImpl.cs │ ├── Source.cs │ ├── SourceBase.cs │ ├── SourceImpl.cs │ ├── SubAbstractClass1.cs │ ├── SubAbstractClass1Base.cs │ ├── SubAbstractClass1Impl.cs │ ├── SubAbstractClass2.cs │ ├── SubAbstractClass2Base.cs │ ├── SubAbstractClass2Impl.cs │ ├── SubAbstractClass3.cs │ ├── SubAbstractClass3Base.cs │ ├── SubAbstractClass3Impl.cs │ ├── SubAbstractClass4.cs │ ├── SubAbstractClass4Base.cs │ ├── SubAbstractClass4Impl.cs │ ├── SubAbstractClass5.cs │ ├── SubAbstractClass5Base.cs │ ├── SubAbstractClass5Impl.cs │ ├── SubAbstractClass6.cs │ ├── SubAbstractClass6Base.cs │ ├── SubAbstractClass6Impl.cs │ ├── SubAbstractClass7.cs │ ├── SubAbstractClass7Base.cs │ ├── SubAbstractClass7Impl.cs │ ├── SubClass1.cs │ ├── SubClass1Base.cs │ ├── SubClass1Impl.cs │ ├── SubClass2.cs │ ├── SubClass2Base.cs │ ├── SubClass2Impl.cs │ ├── SubClass3.cs │ ├── SubClass3Base.cs │ ├── SubClass3Impl.cs │ ├── SubClass4.cs │ ├── SubClass4Base.cs │ ├── SubClass4Impl.cs │ ├── SubClass5.cs │ ├── SubClass5Base.cs │ ├── SubClass5Impl.cs │ ├── SubClass6.cs │ ├── SubClass6Base.cs │ ├── SubClass6Impl.cs │ ├── SubClass7.cs │ ├── SubClass7Base.cs │ ├── SubClass7Impl.cs │ ├── SubInterface1.cs │ ├── SubInterface1Base.cs │ ├── SubInterface1Impl.cs │ ├── SubInterface2.cs │ ├── SubInterface2Base.cs │ ├── SubInterface2Impl.cs │ ├── SubInterface3.cs │ ├── SubInterface3Base.cs │ ├── SubInterface3Impl.cs │ ├── SubInterface4.cs │ ├── SubInterface4Base.cs │ ├── SubInterface4Impl.cs │ ├── SubInterface5.cs │ ├── SubInterface5Base.cs │ ├── SubInterface5Impl.cs │ ├── SubInterface6.cs │ ├── SubInterface6Base.cs │ ├── SubInterface6Impl.cs │ ├── SubInterface7.cs │ ├── SubInterface7Base.cs │ ├── SubInterface7Impl.cs │ ├── SuperAbstractClass.cs │ ├── SuperAbstractClassBase.cs │ ├── SuperAbstractClassImpl.cs │ ├── SuperClass.cs │ ├── SuperClassBase.cs │ ├── SuperClassImpl.cs │ ├── SuperInterface.cs │ ├── SuperInterfaceBase.cs │ ├── SuperInterfaceImpl.cs │ ├── Target.cs │ ├── TargetBase.cs │ ├── TargetImpl.cs │ ├── TestmodelFactory.cs │ ├── TestmodelFactoryImpl.cs │ ├── TestmodelPackage.cs │ ├── TestmodelPackageImpl.cs │ └── TestmodelSwitch.cs ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/workflows/dotnetcore.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: 5 | - master 6 | pull_request: 7 | types: [opened, synchronize, reopened] 8 | jobs: 9 | build: 10 | name: Build 11 | runs-on: windows-latest 12 | steps: 13 | - name: Set up JDK 11 14 | uses: actions/setup-java@v1 15 | with: 16 | java-version: 1.11 17 | - uses: actions/checkout@v2 18 | with: 19 | fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis 20 | - name: Cache SonarCloud packages 21 | uses: actions/cache@v1 22 | with: 23 | path: ~\sonar\cache 24 | key: ${{ runner.os }}-sonar 25 | restore-keys: ${{ runner.os }}-sonar 26 | - name: Cache SonarCloud scanner 27 | id: cache-sonar-scanner 28 | uses: actions/cache@v1 29 | with: 30 | path: .\.sonar\scanner 31 | key: ${{ runner.os }}-sonar-scanner 32 | restore-keys: ${{ runner.os }}-sonar-scanner 33 | - name: Install SonarCloud scanner 34 | if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' 35 | shell: powershell 36 | run: | 37 | New-Item -Path .\.sonar\scanner -ItemType Directory 38 | dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner 39 | - name: Build and analyze 40 | env: 41 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any 42 | SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} 43 | shell: powershell 44 | run: | 45 | .\.sonar\scanner\dotnet-sonarscanner begin /k:"crossecore_ecore-csharp" /o:"crossecore" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" 46 | dotnet restore 47 | dotnet build 48 | dotnet test 49 | .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" -------------------------------------------------------------------------------- /Ecore.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29020.237 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ecore", "Ecore\Ecore.csproj", "{CBC71227-88CF-4220-859B-6F75B55C1C6B}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EcoreTest", "EcoreTest\EcoreTest.csproj", "{9F2EA3AE-893D-45A2-814B-41EB9DD8C22D}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {CBC71227-88CF-4220-859B-6F75B55C1C6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {CBC71227-88CF-4220-859B-6F75B55C1C6B}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {CBC71227-88CF-4220-859B-6F75B55C1C6B}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {CBC71227-88CF-4220-859B-6F75B55C1C6B}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {9F2EA3AE-893D-45A2-814B-41EB9DD8C22D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {9F2EA3AE-893D-45A2-814B-41EB9DD8C22D}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {9F2EA3AE-893D-45A2-814B-41EB9DD8C22D}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {9F2EA3AE-893D-45A2-814B-41EB9DD8C22D}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {6DCA42B4-986F-44C6-A2AD-5850C8C15908} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /Ecore/Ecore.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | Simon Schwichtenberg 6 | CrossEcore 7 | Com.Crossecore.Ecore 8 | CrossEcore 9 | https://github.com/crossecore/ecore-csharp 10 | Ecore and OCL runtime API for C# 11 | http://www.crossecore.org 12 | true 13 | 0.1.1 14 | EPL-2.0 15 | true 16 | Library 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Ecore/Ecore.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Com.CrossEcore.Ecore 5 | 0.1.1 6 | Simon Schwichtenberg 7 | Simon Schwichtenberg 8 | true 9 | EPL-2.0 10 | http://www.crossecore.com 11 | Ecore and OCL C# runtime API 12 | Copyright 2020 13 | 14 | -------------------------------------------------------------------------------- /Ecore/Ecore/Adapter.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | 10 | namespace Ecore 11 | { 12 | public interface Adapter 13 | { 14 | void notifyChanged(Notification notification); 15 | //Notifier getTarget(); 16 | //void setTarget(Notifier newTarget); 17 | //bool isAdapterForType(object type); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Ecore/Ecore/AdapterImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | 17 | public class AdapterImpl : Adapter 18 | { 19 | 20 | protected Notifier target = null; 21 | 22 | public AdapterImpl() 23 | { 24 | 25 | } 26 | 27 | public bool isAdapterForType(Object type) 28 | { 29 | return false; 30 | } 31 | 32 | 33 | public virtual void notifyChanged(Notification msg) 34 | { 35 | // Do nothing. 36 | } 37 | 38 | 39 | public Notifier getTarget() 40 | { 41 | return target; 42 | } 43 | 44 | 45 | public void setTarget(Notifier newTarget) 46 | { 47 | target = newTarget; 48 | } 49 | 50 | public void unsetTarget(Notifier oldTarget) 51 | { 52 | if (target == oldTarget) 53 | { 54 | setTarget(null); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Ecore/Ecore/BasicDiagnostic.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | public class BasicDiagnostic:Diagnostic, DiagnosticChain 17 | { 18 | 19 | public const int OK = 0x0; 20 | 21 | public const int INFO = 0x1; 22 | 23 | public const int WARNING = 0x2; 24 | 25 | public const int ERROR = 0x4; 26 | 27 | public const int CANCEL = 0x8; 28 | 29 | protected int severity; 30 | protected string message; 31 | protected List children; 32 | protected List data; 33 | protected String source; 34 | protected int code; 35 | 36 | public BasicDiagnostic():base() 37 | { 38 | 39 | } 40 | 41 | public BasicDiagnostic(string source, int code, string message, object[] data) 42 | { 43 | this.source = source; 44 | this.code = code; 45 | this.message = message; 46 | this.data = data.ToList(); 47 | } 48 | 49 | public BasicDiagnostic(int severity, string source, int code, string message, object[] data) 50 | :this(source, code, message, data) 51 | { 52 | this.severity = severity; 53 | } 54 | 55 | public int getSeverity() 56 | { 57 | return severity; 58 | } 59 | 60 | public string getMessage() 61 | { 62 | return message; 63 | } 64 | 65 | public string getSource() 66 | { 67 | return source; 68 | } 69 | 70 | public int getCode() 71 | { 72 | return code; 73 | } 74 | 75 | public List getChildren() 76 | { 77 | return children; 78 | } 79 | 80 | public void add(Diagnostic diagnostic) 81 | { 82 | throw new NotImplementedException(); 83 | } 84 | 85 | public void addAll(Diagnostic diagnostic) 86 | { 87 | throw new NotImplementedException(); 88 | } 89 | 90 | public void merge(Diagnostic diagnostic) 91 | { 92 | throw new NotImplementedException(); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Ecore/Ecore/BasicNotifierImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | 12 | namespace Ecore 13 | { 14 | 15 | public class BasicNotifierImpl : Notifier 16 | { 17 | 18 | private ICollection _eAdapters; 19 | //public EList eAdapters() 20 | public virtual ICollection eAdapters() 21 | { 22 | 23 | if (_eAdapters == default(ICollection)) 24 | { 25 | _eAdapters = new HashSet(); 26 | } 27 | return _eAdapters; 28 | } 29 | 30 | //protected BasicEList eBasicAdapters() 31 | protected virtual ICollection eBasicAdapters() 32 | { 33 | return null; 34 | } 35 | 36 | public virtual void eNotify(Notification notification) 37 | { 38 | foreach (Adapter adapter in eAdapters()) 39 | { 40 | adapter.notifyChanged(notification); 41 | } 42 | } 43 | 44 | public bool eNotificationRequired() 45 | { 46 | return eAdapters().Count > 0; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Ecore/Ecore/Collection.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace oclstdlib 15 | { 16 | public interface Collection: IEnumerable 17 | { 18 | bool add(T element); 19 | bool remove(T element); 20 | bool equals(Collection c); 21 | bool notEquals(Collection c); 22 | int size(); 23 | bool includes(T element); 24 | bool excludes(T element); 25 | int count(T element); 26 | bool includesAll(Collection c2); 27 | bool excludesAll(Collection c2); 28 | bool isEmpty(); 29 | bool notEmpty(); 30 | T max(); 31 | T min(); 32 | double sum(); 33 | Set asSet(); 34 | OrderedSet asOrderedSet(); 35 | Sequence asSequence(); 36 | Bag asBag(); 37 | //Collection flatten(); 38 | T any(Func lambda); 39 | //Collection closure(Func lambda); 40 | 41 | //Collection collect(Func lambda); 42 | //Collection collect(Func> lambda); 43 | 44 | //Collection including(T element); 45 | //Collection excluding(T element); 46 | //Collection collect(Func lambda); 47 | //Collection collect(Func> lambda); 48 | bool exists(Func lambda); 49 | bool forAll(Func lambda); 50 | bool isUnique(Func lambda); 51 | bool one(Func lambda); 52 | //Collection reject(Func lambda); 53 | 54 | //TODO if result set has only one element, this element should be returned directly 55 | //Collection select(Func lambda); 56 | //Collection sortedBy(Func lambda); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Ecore/Ecore/Diagnostic.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | 17 | 18 | public interface Diagnostic 19 | { 20 | 21 | int getSeverity(); 22 | 23 | string getMessage(); 24 | 25 | string getSource(); 26 | 27 | int getCode(); 28 | 29 | //Throwable getException(); 30 | 31 | //List getData(); 32 | 33 | List getChildren(); 34 | 35 | /* 36 | public Diagnostic OK_INSTANCE = 37 | new BasicDiagnostic 38 | (OK, "org.eclipse.emf.common", 0, org.eclipse.emf.common.CommonPlugin.INSTANCE.getString("_UI_OK_diagnostic_0"), null); 39 | */ 40 | 41 | /** 42 | * A diagnostic indicating that the diagnosis was canceled. 43 | */ 44 | /* 45 | public Diagnostic CANCEL_INSTANCE = 46 | new BasicDiagnostic 47 | (CANCEL, "org.eclipse.emf.common", 0, org.eclipse.emf.common.CommonPlugin.INSTANCE.getString("_UI_Cancel_diagnostic_0"), null); 48 | */ 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Ecore/Ecore/DiagnosticChain.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | public interface DiagnosticChain 17 | { 18 | void add(Diagnostic diagnostic); 19 | void addAll(Diagnostic diagnostic); 20 | void merge(Diagnostic diagnostic); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Ecore/Ecore/DiagnosticImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | public class DiagnosticImpl 17 | { 18 | 19 | public const int OK = 0x0; 20 | public const int INFO = 0x1; 21 | public const int WARNING = 0x2; 22 | public const int ERROR = 0x4; 23 | public const int CANCEL = 0x8; 24 | 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ecore/Ecore/EAnnotation.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EAnnotation 16 | : EModelElement 17 | { 18 | string source 19 | { 20 | get; 21 | set; 22 | } 23 | EMap details 24 | { 25 | get; 26 | 27 | } 28 | EModelElement eModelElement 29 | { 30 | get; 31 | set; 32 | } 33 | OrderedSet contents 34 | { 35 | get; 36 | 37 | } 38 | OrderedSet references 39 | { 40 | get; 41 | 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Ecore/Ecore/EAnnotationImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EAnnotationImpl 19 | : EAnnotationBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EAttribute.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EAttribute 16 | : EStructuralFeature 17 | { 18 | bool iD 19 | { 20 | get; 21 | set; 22 | } 23 | EDataType eAttributeType 24 | { 25 | get; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Ecore/Ecore/EAttributeImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EAttributeImpl 19 | : EAttributeBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EClass.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EClass 16 | : EClassifier 17 | { 18 | bool abstract_ 19 | { 20 | get; 21 | set; 22 | } 23 | bool interface_ 24 | { 25 | get; 26 | set; 27 | } 28 | OrderedSet eSuperTypes 29 | { 30 | get; 31 | 32 | } 33 | OrderedSet eOperations 34 | { 35 | get; 36 | 37 | } 38 | OrderedSet eAllAttributes 39 | { 40 | get; 41 | 42 | } 43 | OrderedSet eAllReferences 44 | { 45 | get; 46 | 47 | } 48 | OrderedSet eReferences 49 | { 50 | get; 51 | 52 | } 53 | OrderedSet eAttributes 54 | { 55 | get; 56 | 57 | } 58 | OrderedSet eAllContainments 59 | { 60 | get; 61 | 62 | } 63 | OrderedSet eAllOperations 64 | { 65 | get; 66 | 67 | } 68 | OrderedSet eAllStructuralFeatures 69 | { 70 | get; 71 | 72 | } 73 | OrderedSet eAllSuperTypes 74 | { 75 | get; 76 | 77 | } 78 | EAttribute eIDAttribute 79 | { 80 | get; 81 | } 82 | OrderedSet eStructuralFeatures 83 | { 84 | get; 85 | 86 | } 87 | OrderedSet eGenericSuperTypes 88 | { 89 | get; 90 | 91 | } 92 | OrderedSet eAllGenericSuperTypes 93 | { 94 | get; 95 | 96 | } 97 | bool isSuperTypeOf(EClass someClass); 98 | int getFeatureCount(); 99 | EStructuralFeature getEStructuralFeature(int featureID); 100 | int getFeatureID(EStructuralFeature feature); 101 | EStructuralFeature getEStructuralFeature(string featureName); 102 | int getOperationCount(); 103 | EOperation getEOperation(int operationID); 104 | int getOperationID(EOperation operation); 105 | EOperation getOverride(EOperation operation); 106 | EGenericType getFeatureType(EStructuralFeature feature); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Ecore/Ecore/EClassImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EClassImpl 19 | : EClassBase 20 | { 21 | //implement your generated class here 22 | 23 | public override OrderedSet eAttributes 24 | { 25 | get 26 | { 27 | return eStructuralFeatures.collect(s => s as EAttribute); 28 | } 29 | } 30 | 31 | public override OrderedSet eReferences 32 | { 33 | get 34 | { 35 | var x = eStructuralFeatures.collect(s => s as EReference); 36 | return eStructuralFeatures.collect(s => s as EReference); 37 | } 38 | 39 | } 40 | 41 | public override OrderedSet eAllSuperTypes 42 | { 43 | get 44 | { 45 | 46 | 47 | var result = new OrderedSet(); 48 | var queue = new Queue(); 49 | 50 | queue.Enqueue(this); 51 | 52 | while (queue.Count>0) 53 | { 54 | var current = queue.Dequeue(); 55 | result.Add(current); 56 | foreach (EClass supertype in current.eSuperTypes) 57 | { 58 | queue.Enqueue(supertype); 59 | } 60 | } 61 | 62 | return result; 63 | //TODO use ocl closure 64 | //return eSuperTypes.closure(s => s.eSuperTypes); 65 | } 66 | } 67 | 68 | public override OrderedSet eAllReferences 69 | { 70 | get 71 | { 72 | var x = eAllSuperTypes.collect(t => t.eReferences); 73 | return eAllSuperTypes.collect(t => t.eReferences); 74 | } 75 | 76 | } 77 | 78 | 79 | 80 | public override OrderedSet eAllContainments 81 | { 82 | get 83 | { 84 | var x = eAllReferences.select(i => i.containment); 85 | return eAllReferences.select(i => i.containment); 86 | } 87 | 88 | } 89 | 90 | public override OrderedSet eAllStructuralFeatures 91 | { 92 | get 93 | { 94 | return eAllSuperTypes.collect(e => e.eStructuralFeatures); 95 | } 96 | 97 | } 98 | 99 | public override EStructuralFeature getEStructuralFeature(string featureName) 100 | { 101 | foreach (EStructuralFeature feature in eAllStructuralFeatures) 102 | { 103 | if (feature.name == featureName) 104 | { 105 | return feature; 106 | } 107 | } 108 | 109 | return null; 110 | } 111 | 112 | 113 | 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /Ecore/Ecore/EClassifier.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EClassifier 16 | : ENamedElement 17 | { 18 | string instanceClassName 19 | { 20 | get; 21 | set; 22 | } 23 | Type instanceClass 24 | { 25 | get; 26 | } 27 | object defaultValue 28 | { 29 | get; 30 | } 31 | string instanceTypeName 32 | { 33 | get; 34 | set; 35 | } 36 | EPackage ePackage 37 | { 38 | get; 39 | } 40 | OrderedSet eTypeParameters 41 | { 42 | get; 43 | 44 | } 45 | bool isInstance(object object_); 46 | int getClassifierID(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Ecore/Ecore/EDataType.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EDataType 16 | : EClassifier 17 | { 18 | bool serializable 19 | { 20 | get; 21 | set; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Ecore/Ecore/EDataTypeBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | public class EDataTypeBase 15 | :EClassifierImpl, EDataType 16 | { 17 | private bool _serializable = false; 18 | public virtual bool serializable 19 | { 20 | get { 21 | return _serializable; 22 | } 23 | set { _serializable = value; } 24 | } 25 | 26 | protected override EClass eStaticClass() { 27 | return EcorePackageImpl.Literals.EDATATYPE; 28 | } 29 | 30 | 31 | 32 | public override Object eGet(int featureID, bool resolve, bool coreType) { 33 | switch (featureID) { 34 | case EcorePackageImpl.EDATATYPE_EANNOTATIONS: 35 | return eAnnotations; 36 | case EcorePackageImpl.EDATATYPE_NAME: 37 | return name; 38 | case EcorePackageImpl.EDATATYPE_INSTANCECLASSNAME: 39 | return instanceClassName; 40 | case EcorePackageImpl.EDATATYPE_INSTANCECLASS: 41 | return instanceClass; 42 | case EcorePackageImpl.EDATATYPE_DEFAULTVALUE: 43 | return defaultValue; 44 | case EcorePackageImpl.EDATATYPE_INSTANCETYPENAME: 45 | return instanceTypeName; 46 | case EcorePackageImpl.EDATATYPE_EPACKAGE: 47 | return ePackage; 48 | case EcorePackageImpl.EDATATYPE_ETYPEPARAMETERS: 49 | return eTypeParameters; 50 | case EcorePackageImpl.EDATATYPE_SERIALIZABLE: 51 | return serializable; 52 | } 53 | return base.eGet(featureID, resolve, coreType); 54 | } 55 | 56 | 57 | public override void eSet(int featureID, object newValue) { 58 | switch (featureID) { 59 | case EcorePackageImpl.EDATATYPE_EANNOTATIONS: 60 | eAnnotations.Clear(); 61 | eAnnotations.AddRange(((List)newValue)?.Cast()); 62 | return; 63 | case EcorePackageImpl.EDATATYPE_NAME: 64 | name = (string) newValue; 65 | return; 66 | case EcorePackageImpl.EDATATYPE_INSTANCECLASSNAME: 67 | instanceClassName = (string) newValue; 68 | return; 69 | case EcorePackageImpl.EDATATYPE_INSTANCETYPENAME: 70 | instanceTypeName = (string) newValue; 71 | return; 72 | case EcorePackageImpl.EDATATYPE_ETYPEPARAMETERS: 73 | eTypeParameters.Clear(); 74 | eTypeParameters.AddRange(((List)newValue)?.Cast()); 75 | return; 76 | case EcorePackageImpl.EDATATYPE_SERIALIZABLE: 77 | serializable = (bool) newValue; 78 | return; 79 | } 80 | base.eSet(featureID, newValue); 81 | } 82 | 83 | 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Ecore/Ecore/EDataTypeImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EDataTypeImpl 19 | : EDataTypeBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EEnum.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EEnum 16 | : EDataType 17 | { 18 | OrderedSet eLiterals 19 | { 20 | get; 21 | 22 | } 23 | EEnumLiteral getEEnumLiteral(string name); 24 | EEnumLiteral getEEnumLiteral(int value); 25 | EEnumLiteral getEEnumLiteralByLiteral(string literal); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ecore/Ecore/EEnumImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EEnumImpl 19 | : EEnumBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EEnumLiteral.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EEnumLiteral 16 | : ENamedElement 17 | { 18 | int value 19 | { 20 | get; 21 | set; 22 | } 23 | EEnumerator instance 24 | { 25 | get; 26 | set; 27 | } 28 | string literal 29 | { 30 | get; 31 | set; 32 | } 33 | EEnum eEnum 34 | { 35 | get; 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Ecore/Ecore/EEnumLiteralImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EEnumLiteralImpl 19 | : EEnumLiteralBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EEnumerator.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | 9 | namespace Ecore 10 | { 11 | public interface EEnumerator 12 | { 13 | string getName(); 14 | 15 | int getValue(); 16 | 17 | string getLiteral(); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Ecore/Ecore/EFactory.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EFactory 16 | : EModelElement 17 | { 18 | EPackage ePackage 19 | { 20 | get; 21 | set; 22 | } 23 | EObject create(EClass eClass); 24 | object createFromString(EDataType eDataType,string literalValue); 25 | string convertToString(EDataType eDataType,object instanceValue); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ecore/Ecore/EFactoryImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EFactoryImpl 19 | : EFactoryBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EGenericType.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EGenericType 16 | : EObject 17 | { 18 | EGenericType eUpperBound 19 | { 20 | get; 21 | set; 22 | } 23 | OrderedSet eTypeArguments 24 | { 25 | get; 26 | 27 | } 28 | EClassifier eRawType 29 | { 30 | get; 31 | } 32 | EGenericType eLowerBound 33 | { 34 | get; 35 | set; 36 | } 37 | ETypeParameter eTypeParameter 38 | { 39 | get; 40 | set; 41 | } 42 | EClassifier eClassifier 43 | { 44 | get; 45 | set; 46 | } 47 | bool isInstance(object object_); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Ecore/Ecore/EGenericTypeImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EGenericTypeImpl 19 | : EGenericTypeBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ecore 9 | { 10 | public interface EMap 11 | { 12 | V get(object key); 13 | V put(K key, V value); 14 | 15 | Dictionary map(); 16 | 17 | void putAll(Dictionary map); 18 | //TODO other methods 19 | 20 | bool isEmpty();//from org.eclipse.emf.common.util.EList(java.util.List) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Ecore/Ecore/EModelElement.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EModelElement 16 | : EObject 17 | { 18 | OrderedSet eAnnotations 19 | { 20 | get; 21 | 22 | } 23 | EAnnotation getEAnnotation(string source); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EModelElementBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | public class EModelElementBase 15 | :BasicEObjectImpl, EModelElement 16 | { 17 | private OrderedSet _eAnnotations; 18 | 19 | public virtual OrderedSet eAnnotations 20 | { 21 | get { 22 | if(_eAnnotations==null){ 23 | _eAnnotations = new OrderedSet(this, EcorePackageImpl.EMODELELEMENT_EANNOTATIONS, EcorePackageImpl.EANNOTATION_EMODELELEMENT); 24 | } 25 | return _eAnnotations; 26 | } 27 | 28 | } 29 | public virtual EAnnotation getEAnnotation(string source 30 | ) 31 | { 32 | throw new NotImplementedException(); 33 | } 34 | 35 | protected override EClass eStaticClass() { 36 | return EcorePackageImpl.Literals.EMODELELEMENT; 37 | } 38 | 39 | public override NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 40 | switch (featureID) { 41 | case EcorePackageImpl.EMODELELEMENT_EANNOTATIONS: 42 | return eAnnotations.basicAdd((EAnnotation)otherEnd, msgs); 43 | } 44 | return base.eInverseAdd(otherEnd, featureID, msgs); 45 | } 46 | 47 | public override NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 48 | switch (featureID) { 49 | case EcorePackageImpl.EMODELELEMENT_EANNOTATIONS: 50 | return eAnnotations.basicRemove((EAnnotation)otherEnd, msgs); 51 | } 52 | return base.eInverseRemove(otherEnd, featureID, msgs); 53 | } 54 | 55 | 56 | public override Object eGet(int featureID, bool resolve, bool coreType) { 57 | switch (featureID) { 58 | case EcorePackageImpl.EMODELELEMENT_EANNOTATIONS: 59 | return eAnnotations; 60 | } 61 | return base.eGet(featureID, resolve, coreType); 62 | } 63 | 64 | 65 | public override void eSet(int featureID, object newValue) { 66 | switch (featureID) { 67 | case EcorePackageImpl.EMODELELEMENT_EANNOTATIONS: 68 | eAnnotations.Clear(); 69 | eAnnotations.AddRange(((List)newValue)?.Cast()); 70 | return; 71 | } 72 | base.eSet(featureID, newValue); 73 | } 74 | 75 | 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Ecore/Ecore/EModelElementImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EModelElementImpl 19 | : EModelElementBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/ENamedElement.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface ENamedElement 16 | : EModelElement 17 | { 18 | string name 19 | { 20 | get; 21 | set; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Ecore/Ecore/ENamedElementBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | public class ENamedElementBase 15 | :EModelElementImpl, ENamedElement 16 | { 17 | private string _name = ""; 18 | public virtual string name 19 | { 20 | get { 21 | return _name; 22 | } 23 | set { _name = value; } 24 | } 25 | 26 | protected override EClass eStaticClass() { 27 | return EcorePackageImpl.Literals.ENAMEDELEMENT; 28 | } 29 | 30 | 31 | 32 | public override Object eGet(int featureID, bool resolve, bool coreType) { 33 | switch (featureID) { 34 | case EcorePackageImpl.ENAMEDELEMENT_EANNOTATIONS: 35 | return eAnnotations; 36 | case EcorePackageImpl.ENAMEDELEMENT_NAME: 37 | return name; 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | 43 | public override void eSet(int featureID, object newValue) { 44 | switch (featureID) { 45 | case EcorePackageImpl.ENAMEDELEMENT_EANNOTATIONS: 46 | eAnnotations.Clear(); 47 | eAnnotations.AddRange(((List)newValue)?.Cast()); 48 | return; 49 | case EcorePackageImpl.ENAMEDELEMENT_NAME: 50 | name = (string) newValue; 51 | return; 52 | } 53 | base.eSet(featureID, newValue); 54 | } 55 | 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Ecore/Ecore/ENamedElementImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class ENamedElementImpl 19 | : ENamedElementBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/ENotificationImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public class ENotificationImpl : NotificationImpl 16 | { 17 | 18 | protected InternalEObject notifier; 19 | protected int featureID = NO_FEATURE_ID; 20 | protected EStructuralFeature feature; 21 | 22 | public ENotificationImpl(InternalEObject notifier, int eventType, int featureID, Object oldValue, Object newValue) : this(notifier, eventType, featureID, oldValue, newValue, NO_INDEX) 23 | { 24 | 25 | } 26 | 27 | public ENotificationImpl(InternalEObject notifier, int eventType, int featureID, Object oldValue, Object newValue, int position) : base(eventType, oldValue, newValue, position) 28 | { 29 | 30 | this.notifier = notifier; 31 | this.featureID = featureID; 32 | } 33 | 34 | public Object getFeature() 35 | { 36 | if (feature == null && featureID != NO_FEATURE_ID) 37 | { 38 | EClass eClass = notifier.eClass(); 39 | feature = eClass.getEStructuralFeature(featureID); 40 | } 41 | return feature; 42 | } 43 | } 44 | 45 | 46 | 47 | } 48 | -------------------------------------------------------------------------------- /Ecore/Ecore/EObject.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EObject 16 | : Notifier 17 | { 18 | EClass eClass(); 19 | bool eIsProxy(); 20 | Resource eResource(); 21 | EObject eContainer(); 22 | EStructuralFeature eContainingFeature(); 23 | EReference eContainmentFeature(); 24 | List eContents(); 25 | TreeIterator eAllContents(); 26 | List eCrossReferences(); 27 | object eGet(EStructuralFeature feature); 28 | object eGet(EStructuralFeature feature,bool resolve); 29 | void eSet(EStructuralFeature feature,object newValue); 30 | bool eIsSet(EStructuralFeature feature); 31 | void eUnset(EStructuralFeature feature); 32 | object eInvoke(EOperation operation,List arguments); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Ecore/Ecore/EObjectBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | public class EObjectBase 15 | :BasicEObjectImpl, EObject 16 | { 17 | public virtual void eSet(EStructuralFeature feature, 18 | object newValue 19 | ) 20 | { 21 | throw new NotImplementedException(); 22 | } 23 | public virtual EReference eContainmentFeature() 24 | { 25 | throw new NotImplementedException(); 26 | } 27 | public virtual List eContents() 28 | { 29 | throw new NotImplementedException(); 30 | } 31 | public virtual TreeIterator eAllContents() 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | public virtual List eCrossReferences() 36 | { 37 | throw new NotImplementedException(); 38 | } 39 | public virtual void eUnset(EStructuralFeature feature 40 | ) 41 | { 42 | throw new NotImplementedException(); 43 | } 44 | public virtual bool eIsSet(EStructuralFeature feature 45 | ) 46 | { 47 | throw new NotImplementedException(); 48 | } 49 | public virtual object eGet(EStructuralFeature feature 50 | ) 51 | { 52 | throw new NotImplementedException(); 53 | } 54 | public virtual EClass eClass() 55 | { 56 | throw new NotImplementedException(); 57 | } 58 | public virtual EObject eContainer() 59 | { 60 | throw new NotImplementedException(); 61 | } 62 | public virtual object eInvoke(EOperation operation, 63 | List arguments 64 | ) 65 | { 66 | throw new NotImplementedException(); 67 | } 68 | public virtual Resource eResource() 69 | { 70 | throw new NotImplementedException(); 71 | } 72 | public virtual bool eIsProxy() 73 | { 74 | throw new NotImplementedException(); 75 | } 76 | public virtual object eGet(EStructuralFeature feature, 77 | bool resolve 78 | ) 79 | { 80 | throw new NotImplementedException(); 81 | } 82 | public virtual EStructuralFeature eContainingFeature() 83 | { 84 | throw new NotImplementedException(); 85 | } 86 | 87 | protected override EClass eStaticClass() { 88 | return EcorePackageImpl.Literals.EOBJECT; 89 | } 90 | 91 | 92 | 93 | public override Object eGet(int featureID, bool resolve, bool coreType) { 94 | switch (featureID) { 95 | } 96 | return base.eGet(featureID, resolve, coreType); 97 | } 98 | 99 | 100 | public override void eSet(int featureID, object newValue) { 101 | switch (featureID) { 102 | } 103 | base.eSet(featureID, newValue); 104 | } 105 | 106 | 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /Ecore/Ecore/EObjectImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EObjectImpl 19 | : EObjectBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EOperation.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EOperation 16 | : ETypedElement 17 | { 18 | EClass eContainingClass 19 | { 20 | get; 21 | } 22 | OrderedSet eTypeParameters 23 | { 24 | get; 25 | 26 | } 27 | OrderedSet eParameters 28 | { 29 | get; 30 | 31 | } 32 | OrderedSet eExceptions 33 | { 34 | get; 35 | 36 | } 37 | OrderedSet eGenericExceptions 38 | { 39 | get; 40 | 41 | } 42 | int getOperationID(); 43 | bool isOverrideOf(EOperation someOperation); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Ecore/Ecore/EOperationImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EOperationImpl 19 | : EOperationBase 20 | { 21 | protected int operationID = -1; 22 | public void setOperationID(int id) 23 | { 24 | operationID = id; 25 | } 26 | 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /Ecore/Ecore/EPackage.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EPackage 16 | : ENamedElement 17 | { 18 | string nsURI 19 | { 20 | get; 21 | set; 22 | } 23 | string nsPrefix 24 | { 25 | get; 26 | set; 27 | } 28 | EFactory eFactoryInstance 29 | { 30 | get; 31 | set; 32 | } 33 | OrderedSet eClassifiers 34 | { 35 | get; 36 | 37 | } 38 | OrderedSet eSubpackages 39 | { 40 | get; 41 | 42 | } 43 | EPackage eSuperPackage 44 | { 45 | get; 46 | } 47 | EClassifier getEClassifier(string name); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Ecore/Ecore/EParameter.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EParameter 16 | : ETypedElement 17 | { 18 | EOperation eOperation 19 | { 20 | get; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Ecore/Ecore/EParameterImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EParameterImpl 19 | : EParameterBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EReference.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EReference 16 | : EStructuralFeature 17 | { 18 | bool containment 19 | { 20 | get; 21 | set; 22 | } 23 | bool container 24 | { 25 | get; 26 | } 27 | bool resolveProxies 28 | { 29 | get; 30 | set; 31 | } 32 | EReference eOpposite 33 | { 34 | get; 35 | set; 36 | } 37 | EClass eReferenceType 38 | { 39 | get; 40 | } 41 | OrderedSet eKeys 42 | { 43 | get; 44 | 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Ecore/Ecore/EReferenceImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EReferenceImpl 19 | : EReferenceBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EStringToStringMapEntry.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EStringToStringMapEntry 16 | : EObject 17 | { 18 | string key 19 | { 20 | get; 21 | set; 22 | } 23 | string value 24 | { 25 | get; 26 | set; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Ecore/Ecore/EStringToStringMapEntryBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | public class EStringToStringMapEntryBase 15 | :BasicEObjectImpl, EStringToStringMapEntry 16 | { 17 | private string _value = ""; 18 | public virtual string value 19 | { 20 | get { 21 | return _value; 22 | } 23 | set { _value = value; } 24 | } 25 | private string _key = ""; 26 | public virtual string key 27 | { 28 | get { 29 | return _key; 30 | } 31 | set { _key = value; } 32 | } 33 | 34 | protected override EClass eStaticClass() { 35 | return EcorePackageImpl.Literals.ESTRINGTOSTRINGMAPENTRY; 36 | } 37 | 38 | 39 | 40 | public override Object eGet(int featureID, bool resolve, bool coreType) { 41 | switch (featureID) { 42 | case EcorePackageImpl.ESTRINGTOSTRINGMAPENTRY_KEY: 43 | return key; 44 | case EcorePackageImpl.ESTRINGTOSTRINGMAPENTRY_VALUE: 45 | return value; 46 | } 47 | return base.eGet(featureID, resolve, coreType); 48 | } 49 | 50 | 51 | public override void eSet(int featureID, object newValue) { 52 | switch (featureID) { 53 | case EcorePackageImpl.ESTRINGTOSTRINGMAPENTRY_KEY: 54 | key = (string) newValue; 55 | return; 56 | case EcorePackageImpl.ESTRINGTOSTRINGMAPENTRY_VALUE: 57 | value = (string) newValue; 58 | return; 59 | } 60 | base.eSet(featureID, newValue); 61 | } 62 | 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Ecore/Ecore/EStringToStringMapEntryImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EStringToStringMapEntryImpl 19 | : EStringToStringMapEntryBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/EStructuralFeature.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface EStructuralFeature 16 | : ETypedElement 17 | { 18 | bool changeable 19 | { 20 | get; 21 | set; 22 | } 23 | bool volatile_ 24 | { 25 | get; 26 | set; 27 | } 28 | bool transient 29 | { 30 | get; 31 | set; 32 | } 33 | string defaultValueLiteral 34 | { 35 | get; 36 | set; 37 | } 38 | object defaultValue 39 | { 40 | get; 41 | } 42 | bool unsettable 43 | { 44 | get; 45 | set; 46 | } 47 | bool derived 48 | { 49 | get; 50 | set; 51 | } 52 | EClass eContainingClass 53 | { 54 | get; 55 | } 56 | int getFeatureID(); 57 | Type getContainerClass(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Ecore/Ecore/EStructuralFeatureImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class EStructuralFeatureImpl 19 | : EStructuralFeatureBase 20 | { 21 | protected int featureID = -1; 22 | public void setFeatureID(int id) 23 | { 24 | featureID = id; 25 | } 26 | 27 | public override int getFeatureID() 28 | { 29 | return featureID; 30 | } 31 | 32 | private Type containerClass_; 33 | public Type containerClass 34 | { 35 | get { return containerClass_; } 36 | set { containerClass_ = value; } 37 | } 38 | 39 | public override Type getContainerClass() 40 | { 41 | return containerClass_; 42 | } 43 | 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /Ecore/Ecore/ETypeParameter.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface ETypeParameter 16 | : ENamedElement 17 | { 18 | OrderedSet eBounds 19 | { 20 | get; 21 | 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Ecore/Ecore/ETypeParameterBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | public class ETypeParameterBase 15 | :ENamedElementImpl, ETypeParameter 16 | { 17 | private OrderedSet _eBounds; 18 | 19 | public virtual OrderedSet eBounds 20 | { 21 | get { 22 | if(_eBounds==null){ 23 | _eBounds = new OrderedSet(this, EcorePackageImpl.ETYPEPARAMETER_EBOUNDS, EOPPOSITE_FEATURE_BASE - EcorePackageImpl.ETYPEPARAMETER_EBOUNDS); 24 | } 25 | return _eBounds; 26 | } 27 | 28 | } 29 | 30 | protected override EClass eStaticClass() { 31 | return EcorePackageImpl.Literals.ETYPEPARAMETER; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | case EcorePackageImpl.ETYPEPARAMETER_EANNOTATIONS: 39 | return eAnnotations; 40 | case EcorePackageImpl.ETYPEPARAMETER_NAME: 41 | return name; 42 | case EcorePackageImpl.ETYPEPARAMETER_EBOUNDS: 43 | return eBounds; 44 | } 45 | return base.eGet(featureID, resolve, coreType); 46 | } 47 | 48 | 49 | public override void eSet(int featureID, object newValue) { 50 | switch (featureID) { 51 | case EcorePackageImpl.ETYPEPARAMETER_EANNOTATIONS: 52 | eAnnotations.Clear(); 53 | eAnnotations.AddRange(((List)newValue)?.Cast()); 54 | return; 55 | case EcorePackageImpl.ETYPEPARAMETER_NAME: 56 | name = (string) newValue; 57 | return; 58 | case EcorePackageImpl.ETYPEPARAMETER_EBOUNDS: 59 | eBounds.Clear(); 60 | eBounds.AddRange(((List)newValue)?.Cast()); 61 | return; 62 | } 63 | base.eSet(featureID, newValue); 64 | } 65 | 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Ecore/Ecore/ETypeParameterImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class ETypeParameterImpl 19 | : ETypeParameterBase 20 | { 21 | //implement your generated class here 22 | 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Ecore/Ecore/ETypedElement.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | namespace Ecore{ 14 | 15 | public interface ETypedElement 16 | : ENamedElement 17 | { 18 | bool ordered 19 | { 20 | get; 21 | set; 22 | } 23 | bool unique 24 | { 25 | get; 26 | set; 27 | } 28 | int lowerBound 29 | { 30 | get; 31 | set; 32 | } 33 | int upperBound 34 | { 35 | get; 36 | set; 37 | } 38 | bool many 39 | { 40 | get; 41 | } 42 | bool required 43 | { 44 | get; 45 | } 46 | EClassifier eType 47 | { 48 | get; 49 | set; 50 | } 51 | EGenericType eGenericType 52 | { 53 | get; 54 | set; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Ecore/Ecore/ETypedElementImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using oclstdlib; 12 | ///This class was generated. 13 | namespace Ecore 14 | { 15 | 16 | 17 | 18 | public class ETypedElementImpl 19 | : ETypedElementBase 20 | { 21 | //implement your generated class here 22 | public override bool many 23 | { 24 | get 25 | { 26 | return upperBound == -1 || upperBound > 1; 27 | } 28 | } 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /Ecore/Ecore/EValidator.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public interface EValidator 16 | { 17 | 18 | bool validate(EObject eObject, DiagnosticChain diagnostics, Dictionary context); 19 | 20 | bool validate(EClass eClass, EObject eObject, DiagnosticChain diagnostics, Dictionary context); 21 | 22 | bool validate(EDataType eDataType, Object value, DiagnosticChain diagnostics, Dictionary context); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Ecore/Ecore/EcoreEList.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | public interface EcoreEList : NotifyingList 17 | { 18 | //from AbstractEList 19 | void addUnique(E o); 20 | 21 | bool hasNavigableInverse(); 22 | bool hasInstanceClass(); 23 | EStructuralFeature getEStructuralFeature(); 24 | EReference getInverseEReference(); 25 | Type getInverseFeatureClass(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Ecore/Ecore/EcoreEMap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace Ecore 9 | { 10 | public class EcoreEMap:Dictionary, EMap 11 | { 12 | 13 | protected EClass entryEClass; 14 | protected Type entryClass; 15 | public EcoreEMap(EClass entryEClass, Type entryClass, InternalEObject owner, int featureId) 16 | { 17 | this.entryClass = entryClass; 18 | this.entryEClass = entryEClass; 19 | } 20 | 21 | public V get(object key) 22 | { 23 | if (key is K) 24 | { 25 | return this[(K) key]; 26 | } 27 | return default(V); 28 | 29 | } 30 | 31 | public V put(K key, V value) 32 | { 33 | V oldValue = default(V);//FIXME allow null! 34 | if (this.ContainsKey(key)) 35 | { 36 | oldValue = this[key]; 37 | } 38 | this[key] = value; 39 | return oldValue; 40 | } 41 | 42 | 43 | 44 | public void set(object value) 45 | { 46 | if (value is Dictionary) 47 | { 48 | 49 | Dictionary mapValue = value as Dictionary; 50 | this.putAll(mapValue); 51 | } 52 | } 53 | 54 | public Dictionary map() 55 | { 56 | return this; 57 | } 58 | 59 | public void putAll(Dictionary map) 60 | { 61 | foreach (K key in map.Keys) 62 | { 63 | this.put(key, map[key]); 64 | } 65 | } 66 | 67 | public bool isEmpty() 68 | { 69 | return this.Values.Count == 0; 70 | } 71 | 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Ecore/Ecore/EcoreFactory.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | namespace Ecore{ 9 | public interface EcoreFactory : EFactory{ 10 | 11 | EAttribute createEAttribute(); 12 | EAnnotation createEAnnotation(); 13 | EClass createEClass(); 14 | EClassifier createEClassifier(); 15 | EDataType createEDataType(); 16 | EEnum createEEnum(); 17 | EEnumLiteral createEEnumLiteral(); 18 | EFactory createEFactory(); 19 | EModelElement createEModelElement(); 20 | ENamedElement createENamedElement(); 21 | EObject createEObject(); 22 | EOperation createEOperation(); 23 | EPackage createEPackage(); 24 | EParameter createEParameter(); 25 | EReference createEReference(); 26 | EStructuralFeature createEStructuralFeature(); 27 | ETypedElement createETypedElement(); 28 | EStringToStringMapEntry createEStringToStringMapEntry(); 29 | EGenericType createEGenericType(); 30 | ETypeParameter createETypeParameter(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Ecore/Ecore/EcoreUtil.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | 14 | namespace Ecore 15 | { 16 | public class EcoreUtil 17 | { 18 | 19 | public static string convertToString(EDataType eDataType, object value) 20 | { 21 | return eDataType.ePackage.eFactoryInstance.convertToString(eDataType, value); 22 | } 23 | 24 | public static string getIdentification(EObject eObject) 25 | { 26 | StringBuilder result = new StringBuilder(eObject.eClass().name); 27 | EClass eClass = eObject.eClass(); 28 | if (eClass.instanceClassName == null) 29 | { 30 | result.Append('/'); 31 | result.Append(eClass.ePackage.nsURI); 32 | result.Append('#'); 33 | result.Append(eClass.name); 34 | } 35 | result.Append('@'); 36 | result.Append(eObject.GetHashCode().ToString("X")); 37 | 38 | result.Append('{'); 39 | //TODO result.Append(getURI(eObject)); 40 | result.Append('}'); 41 | 42 | return result.ToString(); 43 | } 44 | 45 | public static string getID(EObject eObject) 46 | { 47 | EClass eClass = eObject.eClass(); 48 | EAttribute eIDAttribute = eClass.eIDAttribute; 49 | return eIDAttribute == null || !eObject.eIsSet(eIDAttribute) ? null : convertToString( 50 | eIDAttribute.eAttributeType, 51 | eObject.eGet(eIDAttribute)); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Ecore/Ecore/InternalEObject.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public interface InternalEObject : EObject 16 | { 17 | 18 | 19 | bool eNotificationRequired(); 20 | 21 | 22 | String eURIFragmentSegment(EStructuralFeature eFeature, EObject eObject); 23 | 24 | EObject eObjectForURIFragmentSegment(String uriFragmentSegment); 25 | 26 | 27 | void eSetClass(EClass eClass); 28 | 29 | 30 | //EStructuralFeature.Setting eSetting(EStructuralFeature feature); 31 | 32 | 33 | int eBaseStructuralFeatureID(int derivedFeatureID, Type baseClass); 34 | 35 | 36 | int eContainerFeatureID(); 37 | 38 | 39 | int eDerivedStructuralFeatureID(int baseFeatureID, Type baseClass); 40 | 41 | 42 | int eDerivedOperationID(int baseOperationID, Type baseClass); 43 | 44 | 45 | //NotificationChain eSetResource(Resource.Internal resource, NotificationChain notifications); 46 | 47 | 48 | //NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Class baseClass, NotificationChain notifications); 49 | NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, Type baseClass, NotificationChain notifications); 50 | 51 | NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, Type baseClass, NotificationChain notifications); 52 | 53 | NotificationChain eBasicSetContainer(InternalEObject newContainer, int newContainerFeatureID, NotificationChain notifications); 54 | 55 | NotificationChain eBasicRemoveFromContainer(NotificationChain notifications); 56 | 57 | //URI eProxyURI(); 58 | 59 | 60 | //void eSetProxyURI(URI uri); 61 | 62 | EObject eResolveProxy(InternalEObject proxy); 63 | 64 | InternalEObject eInternalContainer(); 65 | 66 | //Resource.Internal eInternalResource(); 67 | 68 | //Resource.Internal eDirectResource(); 69 | 70 | //EStore eStore(); 71 | 72 | //void eSetStore(EStore store); 73 | 74 | Object eGet(EStructuralFeature eFeature, bool resolve, bool coreType); 75 | 76 | Object eGet(int featureID, bool resolve, bool coreType); 77 | 78 | void eSet(int featureID, Object newValue); 79 | 80 | void eUnset(int featureID); 81 | 82 | bool eIsSet(int featureID); 83 | 84 | //Object eInvoke(int operationID, EList arguments) throws InvocationTargetException; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Ecore/Ecore/Map.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public class Map : Dictionary 16 | { 17 | 18 | private TValue defaultCase = default(TValue); 19 | 20 | public TValue Get(TKey key) 21 | { 22 | if (key==null) 23 | { 24 | return defaultCase; 25 | } 26 | else if (this.ContainsKey(key)) 27 | { 28 | return this[key]; 29 | } 30 | else 31 | { 32 | return default(TValue); 33 | 34 | } 35 | } 36 | 37 | public void Put(TKey key, TValue value) 38 | { 39 | if (key==null) 40 | { 41 | defaultCase = value; 42 | } 43 | else 44 | { 45 | base.Add(key, value); 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /Ecore/Ecore/Notification.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | namespace Ecore 9 | { 10 | public interface Notification 11 | { 12 | object getNotifier(); 13 | int getEventType(); 14 | 15 | object getNewValue(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Ecore/Ecore/NotificationChain.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | namespace Ecore 8 | { 9 | public interface NotificationChain 10 | { 11 | bool add(Notification notification); 12 | 13 | 14 | void dispatch(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Ecore/Ecore/NotificationChainImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public class NotificationChainImpl : List, NotificationChain 16 | { 17 | public bool add(Notification notification) 18 | { 19 | Add(notification); 20 | 21 | return Contains(notification); 22 | } 23 | 24 | public void dispatch() 25 | { 26 | 27 | foreach (Notification notification in this) 28 | { 29 | dispatch(notification); 30 | } 31 | 32 | 33 | 34 | } 35 | 36 | protected void dispatch(Notification notification) 37 | { 38 | object notifier = notification.getNotifier(); 39 | if (notifier != null && notification.getEventType() != -1) 40 | { 41 | ((Notifier)notifier).eNotify(notification); 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Ecore/Ecore/NotificationImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | 10 | namespace Ecore 11 | { 12 | public class NotificationImpl:NotificationChain, Notification 13 | { 14 | 15 | public const int SET = 1; 16 | public const int UNSET = 2; 17 | public const int ADD = 2; 18 | public const int REMOVE = 3; 19 | 20 | public const int ADD_MANY = 5; 21 | public const int REMOVE_MANY = 6; 22 | public const int MOVE = 7; 23 | 24 | public const int NO_INDEX = -1; 25 | public const int IS_SET_CHANGE_INDEX = NO_INDEX - 1; 26 | 27 | public const int NO_FEATURE_ID = -1; 28 | 29 | public const int PRIMITIVE_TYPE_OBJECT = -1; 30 | 31 | protected NotificationChain next; 32 | 33 | protected int eventType; 34 | protected object oldValue; 35 | protected object newValue; 36 | protected int position; 37 | protected int primitiveType; 38 | 39 | /* 40 | public NotificationImpl(int eventType, object oldValue, object newValue): this(eventType, oldValue, newValue, NO_INDEX) 41 | { 42 | 43 | } 44 | 45 | public NotificationImpl(int eventType, object oldValue, object newValue, bool isSetChange): this(eventType, oldValue, newValue, isSetChange ? IS_SET_CHANGE_INDEX : NO_INDEX) 46 | { 47 | 48 | } 49 | */ 50 | 51 | public NotificationImpl(int eventType, object oldValue, object newValue, int position, bool wasSet) 52 | { 53 | this.eventType = eventType; 54 | this.oldValue = oldValue; 55 | this.newValue = newValue; 56 | this.position = position; 57 | this.primitiveType = PRIMITIVE_TYPE_OBJECT; 58 | if (!wasSet) 59 | { 60 | this.position = IS_SET_CHANGE_INDEX - position - 1; 61 | } 62 | } 63 | 64 | public NotificationImpl(int eventType, object oldValue, object newValue, int position) 65 | { 66 | 67 | this.eventType = eventType; 68 | this.oldValue = oldValue; 69 | this.newValue = newValue; 70 | this.position = position; 71 | this.primitiveType = PRIMITIVE_TYPE_OBJECT; 72 | 73 | } 74 | 75 | public virtual bool add(Notification notification) 76 | { 77 | return next.add(notification); 78 | } 79 | 80 | public virtual void dispatch() 81 | { 82 | 83 | object notifier = getNotifier(); 84 | if (notifier != null && getEventType() != -1) 85 | { 86 | ((Notifier)notifier).eNotify(this); 87 | } 88 | 89 | if (next != null) 90 | { 91 | next.dispatch(); 92 | } 93 | 94 | 95 | } 96 | 97 | public virtual object getNotifier() 98 | { 99 | return null; 100 | 101 | } 102 | 103 | 104 | public virtual int getEventType() 105 | { 106 | return eventType; 107 | } 108 | 109 | public virtual object getNewValue() 110 | { 111 | return newValue; 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /Ecore/Ecore/Notifier.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System.Collections.Generic; 8 | 9 | 10 | namespace Ecore 11 | { 12 | public interface Notifier 13 | { 14 | 15 | 16 | 17 | //EList eAdapters(); 18 | ICollection eAdapters(); 19 | 20 | //EList eAdapters(); 21 | 22 | //boolean eDeliver(); 23 | 24 | //void eSetDeliver(boolean deliver); 25 | 26 | void eNotify(Notification notification); 27 | 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Ecore/Ecore/NotifyingList.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | 9 | namespace Ecore 10 | { 11 | public interface NotifyingList 12 | { 13 | bool isNotificationRequired(); 14 | bool hasInverse(); 15 | void dispatchNotification(Notification notification); 16 | NotificationChain basicAdd(T item, NotificationChain notifications); 17 | NotificationChain basicRemove(T item, NotificationChain notifications); 18 | NotificationChain inverseAdd(T item, NotificationChain notifications); 19 | NotificationChain inverseRemove(T item, NotificationChain notifications); 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Ecore/Ecore/OclAny.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public class OclAny 16 | { 17 | public static OclAny Invalid = new OclAny(); 18 | } 19 | 20 | /* 21 | public class MyString : OclAny 22 | { 23 | protected string wrapped; 24 | 25 | public MyString(string x) 26 | { 27 | wrapped = x; 28 | } 29 | 30 | public MyString Substring(int begin, int end) 31 | { 32 | try { 33 | var result = this.wrapped.Substring(begin, end); 34 | return new MyString(result); 35 | } 36 | catch(Exception e) 37 | { 38 | 39 | return Invalid as MyString; 40 | } 41 | 42 | 43 | } 44 | } 45 | */ 46 | } 47 | -------------------------------------------------------------------------------- /Ecore/Ecore/OclInvalid.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | 14 | namespace oclstdlib 15 | { 16 | public class OclInvalid 17 | { 18 | public static OclInvalid INVALID = new OclInvalid(); 19 | 20 | protected OclInvalid() 21 | { 22 | 23 | } 24 | 25 | public object oclAsSet() 26 | { 27 | return INVALID; 28 | } 29 | 30 | /* 31 | public bool oclIsInState(OclState statespec) 32 | { 33 | return false; 34 | } 35 | 36 | 37 | public Boolean oclIsInvalid() 38 | { 39 | return true; 40 | } 41 | 42 | public object oclIsKindOf(Type type) 43 | { 44 | return INVALID; 45 | } 46 | 47 | public bool oclIsNew() 48 | { 49 | return false; 50 | } 51 | 52 | public bool oclIsTypeOf(Type type) 53 | { 54 | return INVALID; 55 | } 56 | 57 | public bool oclIsUndefined(Type type) 58 | { 59 | return true; 60 | } 61 | 62 | public Type oclType() 63 | { 64 | return typeof(OclVoid); 65 | } 66 | 67 | */ 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Ecore/Ecore/OclVoid.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | 14 | namespace oclstdlib 15 | { 16 | public class OclVoid 17 | { 18 | public static OclVoid NULL = new OclVoid(); 19 | 20 | protected OclVoid() 21 | { 22 | 23 | } 24 | 25 | public Set oclAsSet() 26 | { 27 | return new Set(); 28 | } 29 | 30 | /* 31 | public bool oclIsInState(OclState statespec) 32 | { 33 | return false; 34 | } 35 | 36 | 37 | public bool oclIsInvalid() 38 | { 39 | return false; 40 | } 41 | 42 | public bool oclIsKindOf(Type type) 43 | { 44 | return OclInvalid.INVALID; 45 | } 46 | 47 | public bool oclIsNew() 48 | { 49 | return false; 50 | } 51 | 52 | public bool oclIsTypeOf(Type type) 53 | { 54 | return OclInvalid.INVALID; 55 | } 56 | 57 | public bool oclIsUndefined(Type type) 58 | { 59 | return true; 60 | } 61 | 62 | public Type oclType() 63 | { 64 | return typeof(OclVoid); 65 | } 66 | 67 | */ 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Ecore/Ecore/Resource.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | 16 | 17 | public interface Resource 18 | { 19 | EObject getEObject(string uriFragment); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Ecore/Ecore/ResourceLocator.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.IO; 10 | using System.Linq; 11 | using System.Reflection; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | 15 | namespace Ecore 16 | { 17 | public class ResourceLocator 18 | { 19 | 20 | public static ResourceLocator INSTANCE = new ResourceLocator(); 21 | 22 | private Dictionary messages = new Dictionary(); 23 | 24 | public void init() 25 | { 26 | 27 | var assembly = Assembly.GetExecutingAssembly(); 28 | var resourceName = "Ecore.plugin.properties";//Ecore = default namespace 29 | 30 | Stream stream = assembly.GetManifestResourceStream(resourceName); 31 | 32 | string line; 33 | StreamReader file = new StreamReader(stream); 34 | while ((line = file.ReadLine()) != null) 35 | { 36 | 37 | if (!line.StartsWith("#")) 38 | { 39 | var parts = line.Split('='); 40 | 41 | 42 | if (parts.Count()==2) 43 | { 44 | var key = parts[0].Trim(); 45 | var value = parts[1].Trim(); 46 | value = value.Replace("''", ","); 47 | //TODO escape everyhing between pairs of ' 48 | value = value.Replace("'{'", "{{"); 49 | value = value.Replace("'}'","}}"); 50 | messages.Add(key, value); 51 | 52 | } 53 | } 54 | 55 | 56 | } 57 | 58 | file.Close(); 59 | } 60 | 61 | public string getString(string key, object[] substitutions) 62 | { 63 | if (messages!=null && messages.ContainsKey(key)) 64 | { 65 | return String.Format(messages[key], substitutions); 66 | } 67 | 68 | return key; 69 | } 70 | 71 | public string getString(string key) 72 | { 73 | 74 | 75 | return key; 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Ecore/Ecore/Switch.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | using oclstdlib; 13 | 14 | namespace Ecore 15 | { 16 | public abstract class Switch 17 | { 18 | 19 | 20 | public T defaultCase(EObject eObject) 21 | { 22 | return default(T); 23 | } 24 | 25 | 26 | 27 | protected T doSwitch(EClass eClass, EObject eObject) 28 | { 29 | if (isSwitchFor(eClass.ePackage)) 30 | { 31 | return doSwitch(eClass.getClassifierID(), eObject); 32 | } 33 | else 34 | { 35 | OrderedSet eSuperTypes = eClass.eSuperTypes; 36 | return eSuperTypes.isEmpty() ? defaultCase(eObject) : doSwitch(eSuperTypes.at(0), eObject); 37 | } 38 | } 39 | 40 | 41 | 42 | public T doSwitch(EObject eObject) 43 | { 44 | return doSwitch(eObject.eClass(), eObject); 45 | } 46 | 47 | 48 | 49 | protected virtual T doSwitch(int classifierID, EObject eObject) 50 | { 51 | return default(T); 52 | } 53 | 54 | 55 | 56 | protected abstract bool isSwitchFor(EPackage ePackage); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Ecore/Ecore/TreeIterator.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace Ecore 14 | { 15 | public class TreeIterator 16 | { 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Ecore/Ecore/UnlimitedNatural.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace oclstdlib 14 | { 15 | public enum UnlimitedNatural 16 | { 17 | UNLIMITED 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /EcoreTest/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | /obj/ 3 | -------------------------------------------------------------------------------- /EcoreTest/EcoreTest.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.1 5 | 6 | false 7 | 8 | Library 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /EcoreTest/Ocltestmodel/MyClassImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Ocltestmodel{ 20 | public class MyClassImpl 21 | : MyClassBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Ocltestmodel/OcltestmodelFactory.cs: -------------------------------------------------------------------------------- 1 | using Ecore; 2 | namespace Ocltestmodel{ 3 | public interface OcltestmodelFactory : EFactory{ 4 | 5 | MyClass createMyClass(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /EcoreTest/Ocltestmodel/OcltestmodelFactoryImpl.cs: -------------------------------------------------------------------------------- 1 | using Ecore; 2 | namespace Ocltestmodel{ 3 | public class OcltestmodelFactoryImpl : EFactoryImpl, OcltestmodelFactory { 4 | 5 | public static OcltestmodelFactory eINSTANCE = OcltestmodelFactoryImpl.init(); 6 | 7 | public static OcltestmodelFactory init() 8 | { 9 | return new OcltestmodelFactoryImpl(); 10 | } 11 | 12 | public MyClass createMyClass(){ 13 | var theMyClass = new MyClassImpl(); 14 | return theMyClass; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /EcoreTest/Ocltestmodel/OcltestmodelSwitch.cs: -------------------------------------------------------------------------------- 1 | using Ecore; 2 | namespace Ocltestmodel{ 3 | public class OcltestmodelSwitch : Switch { 4 | 5 | protected static OcltestmodelPackage modelPackage; 6 | 7 | protected override bool isSwitchFor(EPackage ePackage) 8 | { 9 | return ePackage == modelPackage; 10 | } 11 | 12 | public OcltestmodelSwitch() 13 | { 14 | if (modelPackage == null) 15 | { 16 | modelPackage = OcltestmodelPackageImpl.eINSTANCE; 17 | } 18 | } 19 | 20 | protected override T doSwitch(int classifierID, EObject theEObject) { 21 | switch (classifierID) { 22 | case OcltestmodelPackageImpl.MYCLASS: { 23 | var myclass = (MyClass) theEObject; 24 | var result = caseMyClass(myclass); 25 | 26 | 27 | if (result == null) result = defaultCase(theEObject); 28 | return result; 29 | } 30 | default: return defaultCase(theEObject); 31 | } 32 | } 33 | 34 | 35 | public virtual T caseMyClass(MyClass theEObject) { 36 | return default(T); 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/MyClass.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | 16 | public interface MyClass 17 | : EObject 18 | { 19 | string attribute_string 20 | { 21 | get; 22 | set; 23 | } 24 | OrderedSet otherclass 25 | { 26 | get; 27 | 28 | } 29 | OtherClass selection 30 | { 31 | get; 32 | set; 33 | } 34 | OrderedSet yetanotherclass 35 | { 36 | get; 37 | 38 | } 39 | YetAnotherClass selection2 40 | { 41 | get; 42 | set; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/MyClassImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | public class MyClassImpl 16 | : MyClassBase 17 | { 18 | 19 | public static oclstdlib.Set allInstances_ = new oclstdlib.Set(); 20 | 21 | public static oclstdlib.Set allInstances() 22 | { 23 | 24 | var result = new oclstdlib.Set(); 25 | result.AddRange(MyClassImpl.allInstances_); 26 | 27 | return result; 28 | } 29 | 30 | //implement your generated class here 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/OtherClass.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | 16 | public interface OtherClass 17 | : EObject 18 | { 19 | string id 20 | { 21 | get; 22 | set; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/OtherClassBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | public class OtherClassBase 16 | :BasicEObjectImpl, OtherClass 17 | { 18 | private string _id = ""; 19 | public virtual string id 20 | { 21 | get { 22 | return _id; 23 | } 24 | set { _id = value; } 25 | } 26 | 27 | protected override EClass eStaticClass() { 28 | return SerializationPackageImpl.Literals.OTHERCLASS; 29 | } 30 | 31 | 32 | 33 | 34 | public override object eGet(int featureID, bool resolve, bool coreType) { 35 | switch (featureID) { 36 | case SerializationPackageImpl.OTHER_CLASS__ID: 37 | return id; 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | 43 | public override void eSet(int featureID, object newValue) { 44 | switch (featureID) { 45 | case SerializationPackageImpl.OTHER_CLASS__ID: 46 | id = (string) newValue; 47 | return; 48 | } 49 | base.eSet(featureID, newValue); 50 | } 51 | 52 | /* 53 | public override bool eIsSet(int featureID) { 54 | switch (featureID) { 55 | case SerializationPackageImpl.OTHER_CLASS__ID: 56 | return ID_EDEFAULT == null ? _id != null : !ID_EDEFAULT.equals(_id); 57 | } 58 | return base.eIsSet(featureID); 59 | } 60 | */ 61 | 62 | 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/OtherClassImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | public class OtherClassImpl 16 | : OtherClassBase 17 | { 18 | 19 | public static oclstdlib.Set allInstances_ = new oclstdlib.Set(); 20 | 21 | public static oclstdlib.Set allInstances() 22 | { 23 | 24 | var result = new oclstdlib.Set(); 25 | result.AddRange(OtherClassImpl.allInstances_); 26 | 27 | return result; 28 | } 29 | 30 | //implement your generated class here 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/SerializationFactory.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using Ecore; 9 | namespace Serialization{ 10 | public interface SerializationFactory : EFactory{ 11 | 12 | MyClass createMyClass(); 13 | OtherClass createOtherClass(); 14 | YetAnotherClass createYetAnotherClass(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/SerializationFactoryImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using Ecore; 9 | using System; 10 | using System.IO; 11 | using System.Runtime.Serialization.Formatters.Binary; 12 | namespace Serialization{ 13 | public class SerializationFactoryImpl : EFactoryImpl, SerializationFactory { 14 | 15 | public static SerializationFactory eINSTANCE = SerializationFactoryImpl.init(); 16 | 17 | public static SerializationFactory init() 18 | { 19 | return new SerializationFactoryImpl(); 20 | } 21 | 22 | public MyClass createMyClass(){ 23 | var theMyClass = new MyClassImpl(); 24 | MyClassImpl.allInstances_.Add(theMyClass); 25 | 26 | return theMyClass; 27 | } 28 | public OtherClass createOtherClass(){ 29 | var theOtherClass = new OtherClassImpl(); 30 | OtherClassImpl.allInstances_.Add(theOtherClass); 31 | 32 | return theOtherClass; 33 | } 34 | public YetAnotherClass createYetAnotherClass(){ 35 | var theYetAnotherClass = new YetAnotherClassImpl(); 36 | YetAnotherClassImpl.allInstances_.Add(theYetAnotherClass); 37 | 38 | return theYetAnotherClass; 39 | } 40 | 41 | public override EObject create(EClass eClass) { 42 | switch (eClass.getClassifierID()) { 43 | case SerializationPackageImpl.MYCLASS: return createMyClass(); 44 | case SerializationPackageImpl.OTHERCLASS: return createOtherClass(); 45 | case SerializationPackageImpl.YETANOTHERCLASS: return createYetAnotherClass(); 46 | default: 47 | throw new ArgumentException("The class '" + eClass.name + "' is not a valid classifier"); 48 | } 49 | } 50 | 51 | 52 | 53 | 54 | 55 | 56 | /* 57 | public SerializationPackage getSerialization() { 58 | return (SerializationPackage) getEPackage(); 59 | } 60 | */ 61 | 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/SerializationPackage.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using Ecore; 9 | namespace Serialization{ 10 | public interface SerializationPackage : EPackage { 11 | 12 | EClass getMyClass(); 13 | EReference getMyClass_Otherclass(); 14 | EReference getMyClass_Selection(); 15 | EReference getMyClass_Yetanotherclass(); 16 | EReference getMyClass_Selection2(); 17 | 18 | EAttribute getMyClass_Attribute_string(); 19 | EClass getOtherClass(); 20 | 21 | EAttribute getOtherClass_Id(); 22 | EClass getYetAnotherClass(); 23 | 24 | EAttribute getYetAnotherClass_No_id(); 25 | 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/SerializationSwitch.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using Ecore; 9 | namespace Serialization{ 10 | public class SerializationSwitch : Switch { 11 | 12 | protected static SerializationPackage modelPackage; 13 | 14 | protected override bool isSwitchFor(EPackage ePackage) 15 | { 16 | return ePackage == modelPackage; 17 | } 18 | 19 | public SerializationSwitch() 20 | { 21 | if (modelPackage == null) 22 | { 23 | modelPackage = SerializationPackageImpl.eINSTANCE; 24 | } 25 | } 26 | 27 | protected override T doSwitch(int classifierID, EObject theEObject) { 28 | switch (classifierID) { 29 | case SerializationPackageImpl.MYCLASS: { 30 | var theMyClass = (MyClass) theEObject; 31 | var result = caseMyClass(theMyClass); 32 | 33 | 34 | if (result == null) result = defaultCase(theEObject); 35 | return result; 36 | } 37 | case SerializationPackageImpl.OTHERCLASS: { 38 | var theOtherClass = (OtherClass) theEObject; 39 | var result = caseOtherClass(theOtherClass); 40 | 41 | 42 | if (result == null) result = defaultCase(theEObject); 43 | return result; 44 | } 45 | case SerializationPackageImpl.YETANOTHERCLASS: { 46 | var theYetAnotherClass = (YetAnotherClass) theEObject; 47 | var result = caseYetAnotherClass(theYetAnotherClass); 48 | 49 | 50 | if (result == null) result = defaultCase(theEObject); 51 | return result; 52 | } 53 | default: return defaultCase(theEObject); 54 | } 55 | } 56 | 57 | 58 | public virtual T caseMyClass(MyClass theEObject) { 59 | return default(T); 60 | } 61 | public virtual T caseOtherClass(OtherClass theEObject) { 62 | return default(T); 63 | } 64 | public virtual T caseYetAnotherClass(YetAnotherClass theEObject) { 65 | return default(T); 66 | } 67 | 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/YetAnotherClass.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | 16 | public interface YetAnotherClass 17 | : EObject 18 | { 19 | int no_id 20 | { 21 | get; 22 | set; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/YetAnotherClassBase.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | public class YetAnotherClassBase 16 | :BasicEObjectImpl, YetAnotherClass 17 | { 18 | private int _no_id = 0; 19 | public virtual int no_id 20 | { 21 | get { 22 | return _no_id; 23 | } 24 | set { _no_id = value; } 25 | } 26 | 27 | protected override EClass eStaticClass() { 28 | return SerializationPackageImpl.Literals.YETANOTHERCLASS; 29 | } 30 | 31 | 32 | 33 | 34 | public override object eGet(int featureID, bool resolve, bool coreType) { 35 | switch (featureID) { 36 | case SerializationPackageImpl.YET_ANOTHER_CLASS__NO_ID: 37 | return no_id; 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | 43 | public override void eSet(int featureID, object newValue) { 44 | switch (featureID) { 45 | case SerializationPackageImpl.YET_ANOTHER_CLASS__NO_ID: 46 | no_id = (int) newValue; 47 | return; 48 | } 49 | base.eSet(featureID, newValue); 50 | } 51 | 52 | /* 53 | public override bool eIsSet(int featureID) { 54 | switch (featureID) { 55 | case SerializationPackageImpl.YET_ANOTHER_CLASS__NO_ID: 56 | return _no_id != NO_ID_EDEFAULT; 57 | } 58 | return base.eIsSet(featureID); 59 | } 60 | */ 61 | 62 | 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/YetAnotherClassImpl.cs: -------------------------------------------------------------------------------- 1 | /* CrossEcore is a cross-platform modeling framework that generates C#, TypeScript, 2 | * JavaScript, Swift code from Ecore models with embedded OCL (http://www.crossecore.org/). 3 | * The original Eclipse Modeling Framework is available at https://www.eclipse.org/modeling/emf/. 4 | * 5 | * contributor: Simon Schwichtenberg 6 | */ 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | using System.Text; 12 | using oclstdlib; 13 | using Ecore; 14 | namespace Serialization{ 15 | public class YetAnotherClassImpl 16 | : YetAnotherClassBase 17 | { 18 | 19 | public static oclstdlib.Set allInstances_ = new oclstdlib.Set(); 20 | 21 | public static oclstdlib.Set allInstances() 22 | { 23 | 24 | var result = new oclstdlib.Set(); 25 | result.AddRange(YetAnotherClassImpl.allInstances_); 26 | 27 | return result; 28 | } 29 | 30 | //implement your generated class here 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /EcoreTest/Serialization/project.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/A.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface A 22 | : EObject 23 | { 24 | string a 25 | { 26 | get; 27 | set; 28 | } 29 | void aOp(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/ABase.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class ABase 21 | :BasicEObjectImpl, A 22 | { 23 | private string _a = ""; 24 | public virtual string a 25 | { 26 | get { 27 | return _a; 28 | } 29 | set { _a = value; } 30 | } 31 | public virtual void aOp() 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | 36 | /* 37 | public static Set allInstances(){ 38 | throw new NotImplementedException(); 39 | } 40 | */ 41 | 42 | protected override EClass eStaticClass() { 43 | return TestmodelPackageImpl.Literals.A; 44 | } 45 | 46 | 47 | 48 | public override Object eGet(int featureID, bool resolve, bool coreType) { 49 | switch (featureID) { 50 | case TestmodelPackageImpl.A_A: 51 | return a; 52 | } 53 | return base.eGet(featureID, resolve, coreType); 54 | } 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/AImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class AImpl 21 | : ABase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/B.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface B 22 | : A 23 | { 24 | string b 25 | { 26 | get; 27 | set; 28 | } 29 | void bOp(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/BBase.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class BBase 21 | :AImpl, B 22 | { 23 | private string _b = ""; 24 | public virtual string b 25 | { 26 | get { 27 | return _b; 28 | } 29 | set { _b = value; } 30 | } 31 | public virtual void bOp() 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | 36 | /* 37 | public static Set allInstances(){ 38 | throw new NotImplementedException(); 39 | } 40 | */ 41 | 42 | protected override EClass eStaticClass() { 43 | return TestmodelPackageImpl.Literals.B; 44 | } 45 | 46 | 47 | 48 | public override Object eGet(int featureID, bool resolve, bool coreType) { 49 | switch (featureID) { 50 | case TestmodelPackageImpl.B_A: 51 | return a; 52 | case TestmodelPackageImpl.B_B: 53 | return b; 54 | } 55 | return base.eGet(featureID, resolve, coreType); 56 | } 57 | 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/BImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class BImpl 21 | : BBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/C.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface C 22 | : B 23 | { 24 | string c 25 | { 26 | get; 27 | set; 28 | } 29 | void aOp(); 30 | void bOp(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/CBase.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class CBase 21 | :BImpl, C 22 | { 23 | private string _c = ""; 24 | public virtual string c 25 | { 26 | get { 27 | return _c; 28 | } 29 | set { _c = value; } 30 | } 31 | public virtual void aOp() 32 | { 33 | throw new NotImplementedException(); 34 | } 35 | public virtual void bOp() 36 | { 37 | throw new NotImplementedException(); 38 | } 39 | 40 | /* 41 | public static Set allInstances(){ 42 | throw new NotImplementedException(); 43 | } 44 | */ 45 | 46 | protected override EClass eStaticClass() { 47 | return TestmodelPackageImpl.Literals.C; 48 | } 49 | 50 | 51 | 52 | public override Object eGet(int featureID, bool resolve, bool coreType) { 53 | switch (featureID) { 54 | case TestmodelPackageImpl.C_A: 55 | return a; 56 | case TestmodelPackageImpl.C_B: 57 | return b; 58 | case TestmodelPackageImpl.C_C: 59 | return c; 60 | } 61 | return base.eGet(featureID, resolve, coreType); 62 | } 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/CImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class CImpl 21 | : CBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/Source.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface Source 22 | : EObject 23 | { 24 | 25 | Target zero_one_no_no 26 | { 27 | get; 28 | set; 29 | } 30 | Set zero_many_no_no 31 | { 32 | get; 33 | 34 | } 35 | 36 | Target zero_one_no_yes 37 | { 38 | get; 39 | set; 40 | } 41 | Set zero_many_no_yes 42 | { 43 | get; 44 | 45 | } 46 | 47 | Target one_one_no_no 48 | { 49 | get; 50 | set; 51 | } 52 | Set one_many_no_no 53 | { 54 | get; 55 | 56 | } 57 | Set many_many_no_no 58 | { 59 | get; 60 | 61 | } 62 | Set one_many_no_yes 63 | { 64 | get; 65 | 66 | } 67 | 68 | Target one_one_no_yes 69 | { 70 | get; 71 | set; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SourceImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SourceImpl 21 | : SourceBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass1.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass1 22 | : SuperInterface 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass1Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass1Base 21 | :BasicEObjectImpl, SubAbstractClass1 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS1; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass1Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass1Impl 21 | : SubAbstractClass1Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass2.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass2 22 | : SuperAbstractClass 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass2Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass2Base 21 | :SuperAbstractClassImpl, SubAbstractClass2 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS2; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass2Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass2Impl 21 | : SubAbstractClass2Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass3.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass3 22 | : SuperClass 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass3Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass3Base 21 | :SuperClassImpl, SubAbstractClass3 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS3; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass3Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass3Impl 21 | : SubAbstractClass3Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass4.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass4 22 | : SubInterface1,SubInterface2 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass4Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass4Base 21 | :BasicEObjectImpl, SubAbstractClass4 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS4; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass4Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass4Impl 21 | : SubAbstractClass4Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass5.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass5 22 | : SubInterface1,SubAbstractClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass5Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass5Base 21 | :BasicEObjectImpl, SubAbstractClass5 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS5; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass5Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass5Impl 21 | : SubAbstractClass5Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass6.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass6 22 | : SubInterface1,SubClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass6Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass6Base 21 | :BasicEObjectImpl, SubAbstractClass6 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS6; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass6Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass6Impl 21 | : SubAbstractClass6Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass7.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubAbstractClass7 22 | : SubAbstractClass1,SubClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass7Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass7Base 21 | :SubAbstractClass1Impl, SubAbstractClass7 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBABSTRACTCLASS7; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubAbstractClass7Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubAbstractClass7Impl 21 | : SubAbstractClass7Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass1.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass1 22 | : SuperInterface 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass1Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass1Base 21 | :BasicEObjectImpl, SubClass1 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS1; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass1Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass1Impl 21 | : SubClass1Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass2.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass2 22 | : SuperAbstractClass 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass2Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass2Base 21 | :SuperAbstractClassImpl, SubClass2 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS2; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass2Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass2Impl 21 | : SubClass2Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass3.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass3 22 | : SuperClass 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass3Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass3Base 21 | :SuperClassImpl, SubClass3 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS3; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass3Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass3Impl 21 | : SubClass3Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass4.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass4 22 | : SubInterface1,SubInterface2 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass4Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass4Base 21 | :BasicEObjectImpl, SubClass4 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS4; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass4Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass4Impl 21 | : SubClass4Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass5.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass5 22 | : SubInterface1,SubAbstractClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass5Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass5Base 21 | :BasicEObjectImpl, SubClass5 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS5; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass5Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass5Impl 21 | : SubClass5Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass6.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass6 22 | : SubInterface1,SubClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass6Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass6Base 21 | :BasicEObjectImpl, SubClass6 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS6; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass6Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass6Impl 21 | : SubClass6Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass7.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubClass7 22 | : SubAbstractClass1,SubClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass7Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass7Base 21 | :SubAbstractClass1Impl, SubClass7 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUBCLASS7; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubClass7Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SubClass7Impl 21 | : SubClass7Base 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface1.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface1 22 | : SuperInterface 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface1Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface1Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface2.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface2 22 | : SuperAbstractClass 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface2Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface2Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface3.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface3 22 | : SuperClass 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface3Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface3Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface4.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface4 22 | : SubInterface1,SubInterface2 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface4Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface4Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface5.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface5 22 | : SubInterface1,SubAbstractClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface5Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface5Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface6.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface6 22 | : SubInterface1,SubClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface6Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface6Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface7.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SubInterface7 22 | : SubAbstractClass1,SubClass1 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface7Base.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SubInterface7Impl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperAbstractClass.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SuperAbstractClass 22 | : EObject 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperAbstractClassBase.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SuperAbstractClassBase 21 | :BasicEObjectImpl, SuperAbstractClass 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUPERABSTRACTCLASS; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperAbstractClassImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SuperAbstractClassImpl 21 | : SuperAbstractClassBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperClass.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SuperClass 22 | : EObject 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperClassBase.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SuperClassBase 21 | :BasicEObjectImpl, SuperClass 22 | { 23 | 24 | /* 25 | public static Set allInstances(){ 26 | throw new NotImplementedException(); 27 | } 28 | */ 29 | 30 | protected override EClass eStaticClass() { 31 | return TestmodelPackageImpl.Literals.SUPERCLASS; 32 | } 33 | 34 | 35 | 36 | public override Object eGet(int featureID, bool resolve, bool coreType) { 37 | switch (featureID) { 38 | } 39 | return base.eGet(featureID, resolve, coreType); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperClassImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class SuperClassImpl 21 | : SuperClassBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperInterface.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface SuperInterface 22 | : EObject 23 | { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperInterfaceBase.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/SuperInterfaceImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | } 21 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/Target.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | 21 | public interface Target 22 | : EObject 23 | { 24 | 25 | Source one_one_no_no 26 | { 27 | get; 28 | set; 29 | } 30 | 31 | Source one_many_no_no 32 | { 33 | get; 34 | set; 35 | } 36 | Set many_many_no_no 37 | { 38 | get; 39 | 40 | } 41 | 42 | Source one_many_no_yes 43 | { 44 | get; 45 | set; 46 | } 47 | 48 | Source one_one_no_yes 49 | { 50 | get; 51 | set; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/TargetImpl.cs: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2002-2004 IBM Corporation and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * IBM - Initial API and implementation 10 | * Paderborn University, s-lab, Software Quality Lab 11 | */ 12 | using System; 13 | using System.Collections.Generic; 14 | using System.Linq; 15 | using System.Text; 16 | using oclstdlib; 17 | ///This class was generated. 18 | using Ecore; 19 | namespace Testmodel{ 20 | public class TargetImpl 21 | : TargetBase 22 | { 23 | //implement your generated class here 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/TestmodelFactory.cs: -------------------------------------------------------------------------------- 1 | using Ecore; 2 | namespace Testmodel{ 3 | public interface TestmodelFactory : EFactory{ 4 | 5 | SuperAbstractClass createSuperAbstractClass(); 6 | SuperClass createSuperClass(); 7 | SubAbstractClass1 createSubAbstractClass1(); 8 | SubAbstractClass2 createSubAbstractClass2(); 9 | SubAbstractClass3 createSubAbstractClass3(); 10 | SubClass1 createSubClass1(); 11 | SubClass2 createSubClass2(); 12 | SubClass3 createSubClass3(); 13 | SubAbstractClass4 createSubAbstractClass4(); 14 | SubAbstractClass5 createSubAbstractClass5(); 15 | SubAbstractClass6 createSubAbstractClass6(); 16 | SubAbstractClass7 createSubAbstractClass7(); 17 | SubClass4 createSubClass4(); 18 | SubClass5 createSubClass5(); 19 | SubClass6 createSubClass6(); 20 | SubClass7 createSubClass7(); 21 | A createA(); 22 | B createB(); 23 | C createC(); 24 | Source createSource(); 25 | Target createTarget(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /EcoreTest/Testmodel/TestmodelPackage.cs: -------------------------------------------------------------------------------- 1 | using Ecore; 2 | namespace Testmodel{ 3 | public interface TestmodelPackage : EPackage { 4 | 5 | EClass getSuperInterface(); 6 | 7 | EClass getSuperAbstractClass(); 8 | 9 | EClass getSuperClass(); 10 | 11 | EClass getA(); 12 | 13 | EAttribute getA_A(); 14 | EClass getSource(); 15 | EReference getSource_Zero_one_no_no(); 16 | EReference getSource_Zero_many_no_no(); 17 | EReference getSource_Zero_one_no_yes(); 18 | EReference getSource_Zero_many_no_yes(); 19 | EReference getSource_One_one_no_no(); 20 | EReference getSource_One_many_no_no(); 21 | EReference getSource_Many_many_no_no(); 22 | EReference getSource_One_many_no_yes(); 23 | EReference getSource_One_one_no_yes(); 24 | 25 | EClass getTarget(); 26 | EReference getTarget_One_one_no_no(); 27 | EReference getTarget_One_many_no_no(); 28 | EReference getTarget_Many_many_no_no(); 29 | EReference getTarget_One_many_no_yes(); 30 | EReference getTarget_One_one_no_yes(); 31 | 32 | EClass getSubInterface1(); 33 | 34 | EClass getSubAbstractClass1(); 35 | 36 | EClass getSubClass1(); 37 | 38 | EClass getSubInterface2(); 39 | 40 | EClass getSubAbstractClass2(); 41 | 42 | EClass getSubClass2(); 43 | 44 | EClass getSubInterface3(); 45 | 46 | EClass getSubAbstractClass3(); 47 | 48 | EClass getSubClass3(); 49 | 50 | EClass getB(); 51 | 52 | EAttribute getB_B(); 53 | EClass getSubInterface4(); 54 | 55 | EClass getSubInterface5(); 56 | 57 | EClass getSubInterface6(); 58 | 59 | EClass getSubAbstractClass4(); 60 | 61 | EClass getSubAbstractClass5(); 62 | 63 | EClass getSubAbstractClass6(); 64 | 65 | EClass getSubClass4(); 66 | 67 | EClass getSubClass5(); 68 | 69 | EClass getSubClass6(); 70 | 71 | EClass getSubInterface7(); 72 | 73 | EClass getSubAbstractClass7(); 74 | 75 | EClass getSubClass7(); 76 | 77 | EClass getC(); 78 | 79 | EAttribute getC_C(); 80 | 81 | 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![.NET Core](https://github.com/crossecore/ecore-csharp/workflows/.NET%20Core/badge.svg?branch=master) 2 | ![Nuget](https://img.shields.io/nuget/v/Com.CrossEcore.Ecore) 3 | [![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=crossecore_ecore-csharp&metric=ncloc)](https://sonarcloud.io/dashboard?id=crossecore_ecore-csharp) 4 | [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=crossecore_ecore-csharp&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=crossecore_ecore-csharp) 5 | [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=crossecore_ecore-csharp&metric=security_rating)](https://sonarcloud.io/dashboard?id=crossecore_ecore-csharp) 6 | [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=crossecore_ecore-csharp&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=crossecore_ecore-csharp) 7 | 8 | # ecore-csharp 9 | 10 | CrossEcore is a framework for model-based software engineering targeting multiple platforms. 11 | From a platform-independent class model (i.e. an Ecore model), source code for multiple platforms like C#, TypeScript, JavaScript and Swift is generated. 12 | Derived attributes, constraints for model validation and operation bodies can be expressed in the [Object Constraint Language (OCL)](http://www.omg.org/spec/OCL/About-OCL/). 13 | CrossEcore comes with a runtime library for every target platform that implements the Ecore and OCL API. 14 | The Ecore API provides many of the features that are known from the [Eclipse Modeling Framework](https://www.eclipse.org/modeling/emf/), e.g., persistence, reflection, notifications, switches, factories, referential integrity and validation. 15 | With the aid of an OCL Compiler, OCL expressions are translated to equivalent expressions of the target programming language. 16 | CrossEcore’s APIs can be used across platforms almost consistently. 17 | 18 | This package implements the Ecore and OCL API in C#. 19 | You need this package (1) when you have generated C# code from your own custom Ecore model as it depends on this package or (2) when you want to create Ecore models programmatically. 20 | 21 | Java developers that are familiar with the Eclipse Modeling Framework will note that this package corresponds to the original Java package org.eclipse.emf.ecore. 22 | 23 | ## Features 24 | ### Persistence 25 | ```csharp 26 | //Load a model from XMI file: 27 | var epackage = new XmiResource().Load("./Ecore.ecore") as EPackage; 28 | ``` 29 | ### Factory 30 | ```csharp 31 | //Create EClass instance by using the factory: 32 | var eclass = EcoreFactoryImpl.eINSTANCE.createEClass(); 33 | ``` 34 | 35 | ### Reflection 36 | ```csharp 37 | //Get the supertypes of an EClass 38 | var supertypes = eclass.eSuperTypes; 39 | ``` 40 | 41 | ### Notifications 42 | ```csharp 43 | public class MyAdapter : AdapterImpl 44 | { 45 | public override void notifyChanged(Notification msg) 46 | { 47 | //do something 48 | } 49 | } 50 | eclass.eAdapters().Add(new MyAdapter()); 51 | ``` 52 | ## Publications 53 | S. Schwichtenberg, I. Jovanovikj, C. Gerth, and G. Engels, "Poster: CrossEcore: An Extendible Framework to Use Ecore and OCL across Platforms," in Proceedings of the 40th International Conference on Software Engineering, ICSE 2018 - Companion Volume, Gothenburg, Sweden. 54 | 55 | Accepted Talk "CrossEcore: The best parts of the Eclipe Modeling Framework for C#, TypeScript and Swift" at the EclipseCon Europe 2018 in terms of the Modeling Symposium. Available on [YouTube](https://www.youtube.com/watch?v=T7-ExsSzSWw). 56 | --------------------------------------------------------------------------------