| @GenModel(fileExtensions="strategy") |
| @GenModel(modelName="StrategyDSL") |
| @GenModel(prefix="StrategyDSL") |
| @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 2.0 |
| which accompanies this distribution, and is available at |
| https://www.eclipse.org/legal/epl-2.0/ |
| |
| SPDX-License-Identifier: EPL-2.0 |
| |
| Based on ideas from Xtext, Xtend, Xcore |
| |
| Contributors: |
| Loetz GmbH&Co.KG - Initial implementation |
| Jose C. Dominguez - ongoing development |
| ") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/strategy/StrategyDSL") |
| @Ecore(nsPrefix="strategydsl") |
| @Ecore(rootPackage="strategydsl") |
| package org.eclipse.osbp.xtext.strategy |
| |
| import GenModel |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.emf.ecore.InternalEObject |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3 |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.xtext.xtype.XImportSection |
| |
| class StrategyModel { |
| contains XImportSection importSection |
| contains StrategyPackage[] packages |
| } |
| |
| type InternalEObject wraps InternalEObject |
| |
| class StrategyLazyResolver { |
| op EObject eResolveProxy(InternalEObject proxy) { |
| return EcoreUtil3.resolve(proxy, this.eResource().resourceSet); |
| } |
| } |
| |
| class StrategyBase extends StrategyLazyResolver { |
| String name |
| } |
| |
| class StrategyPackage extends LPackage { |
| contains Strategy strategy |
| } |
| |
| class Strategy { |
| contains StrategyTarget targets |
| contains StrategyDefault strategyDefault |
| } |
| |
| class StrategyTarget { |
| contains LayoutingStrategy[] layoutingStrategies |
| contains FocusingStrategy[] focusingStrategies |
| contains FocusingEnhancer[] focusingEnhancer |
| contains StrategyDefault strategyDefault |
| } |
| |
| class LayoutingStrategy extends StrategyBase { |
| LayoutingEnum layout |
| } |
| |
| class FocusingStrategy extends StrategyBase { |
| String ecviewFocusingId |
| FocusingEnum focus |
| String keyCode |
| String[] modifierKeys |
| } |
| |
| class FocusingEnhancer extends StrategyBase { |
| refers FocusingStrategy[] focusingStrategies |
| } |
| |
| class StrategyDefault { |
| refers LayoutingStrategy defaultLayouting |
| refers FocusingEnhancer defaultFocusing |
| } |
| |
| enum LayoutingEnum{ |
| HORIZONTAL as'Horizontal', |
| VERTICAL as 'Vertical', |
| GRID as 'Grid', |
| FORM as 'Form', |
| FORM2 as 'Form2', |
| FORM3 as 'Form3', |
| CSS as 'Css' |
| } |
| |
| enum FocusingEnum{ |
| FORWARD as 'Forward', |
| BACKWARD as 'Backward' |
| } |