| @xcore.lang.GenModel(fileExtensions="functionlibrary") |
| @GenModel(modelName="FunctionLibraryDSL") |
| @GenModel(prefix="FunctionLibraryDSL") |
| @GenModel(updateClasspath="false") |
| // force bigModel == false |
| @GenModel(loadInitialization="false") |
| @GenModel(literalsInterface="true") |
| @GenModel(copyrightText="Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| |
| Based on ideas from Xtext, Xtend, Xcore |
| |
| Contributors: |
| Christophe Loetz - Initial implementation |
| ") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/functionlibrarydsl/FunctionLibraryDSL") |
| @Ecore(nsPrefix="functionLibraryDSL") |
| @Ecore(rootPackage="functionLibraryDSL") |
| package org.eclipse.osbp.xtext.functionlibrarydsl |
| |
| import org.eclipse.xtext.common.types.JvmParameterizedTypeReference |
| import org.eclipse.xtext.common.types.JvmTypeReference |
| import org.eclipse.xtext.xbase.XExpression |
| import org.eclipse.xtext.xtype.XImportSection |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.osbp.dsl.semantic.common.types.LDataType |
| |
| class FunctionLibraryModel { |
| contains XImportSection importSection |
| contains FunctionLibraryPackage pckg |
| } |
| |
| class FunctionLibraryPackage extends LPackage{ |
| contains FunctionLibraryRating[] ratings |
| contains FunctionLibraryGroup[] groups |
| contains FunctionLibraryConverterGroup[] converters |
| } |
| |
| class FunctionLibraryGroup { |
| String name |
| // contains FunctionLibraryProperty[] properties |
| contains FunctionLibraryFunction[] functions |
| contains FunctionLibraryRate[] rates |
| contains FunctionLibraryTest[] tests |
| contains FunctionLibraryGuard[] guards |
| contains FunctionLibraryOperation[] operations |
| contains FunctionLibraryExecute[] executes |
| contains FunctionLibraryCanExecute[] canExecutes |
| contains FunctionConvertToModel convertToModel |
| contains FunctionConvertToPresentation convertToPresentation |
| } |
| |
| class FunctionLibraryBlipGroup extends FunctionLibraryGroup { |
| } |
| |
| class FunctionLibraryStatemachineGroup extends FunctionLibraryGroup { |
| } |
| |
| class FunctionLibraryActionGroup extends FunctionLibraryGroup { |
| } |
| |
| class FunctionLibraryConverterGroup extends FunctionLibraryGroup { |
| refers LDataType convertToModelDatatype |
| refers LDataType convertToPresentationDatatype |
| } |
| |
| //class FunctionLibraryProperty { |
| // String name |
| // contains JvmTypeReference oftype |
| //} |
| |
| class FunctionLibraryRating { |
| String name |
| contains FunctionLibraryRatingItem[] items |
| } |
| |
| class FunctionLibraryRatingItem { |
| String name |
| } |
| |
| class FunctionLibraryBaseFunction { |
| String name |
| contains FunctionLibraryParameter[] params |
| contains XExpression body |
| } |
| |
| class FunctionLibraryFunction extends FunctionLibraryBaseFunction { |
| contains JvmParameterizedTypeReference oftype |
| } |
| |
| class FunctionLibraryTest extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionLibraryRate extends FunctionLibraryBaseFunction { |
| refers FunctionLibraryRating oftype |
| } |
| |
| class FunctionLibraryGuard extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionLibraryOperation extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionLibraryExecute extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionLibraryCanExecute extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionConvertToModel extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionConvertToPresentation extends FunctionLibraryBaseFunction { |
| } |
| |
| class FunctionLibraryParameter { |
| String name |
| contains JvmTypeReference parameterType |
| // contains XExpression requires |
| } |
| |
| //class FunctionLibraryRequirement extends XExpression { |
| //} |