| /** |
| * |
| * 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 |
| * |
| * Contributors: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| */ |
| grammar org.eclipse.osbp.xtext.strategy.StrategyDSL with org.eclipse.osbp.xtext.oxtype.OXtype |
| |
| import "http://osbp.eclipse.org/xtext/strategy/StrategyDSL" |
| import "http://osbp.eclipse.org/dsl/common/types/v1" as types |
| import "http://www.eclipse.org/emf/2002/Ecore" as ecore |
| |
| StrategyModel: |
| importSection=XImportSection? |
| packages+=StrategyPackage*; |
| |
| StrategyPackage: |
| {StrategyPackage} 'package' name=QualifiedName ('{' (strategy=Strategy) '}')?; |
| |
| Strategy: |
| {Strategy} 'strategy' '{' targets=StrategyTarget strategyDefault=StrategyDefault '}'; |
| |
| StrategyTarget: |
| {StrategyTarget} 'targets' ('{' (layoutingStrategies+=LayoutingStrategy)* (focusingStrategies+=FocusingStrategy)* |
| (focusingEnhancer+=FocusingEnhancer)* '}')?; |
| |
| LayoutingStrategy: |
| {LayoutingStrategy} 'layoutingStrategy' name=ID 'layout=' layout=LayoutingEnum; |
| |
| FocusingStrategy: |
| {FocusingStrategy} 'focusingStrategy' name=ID 'ecviewFocusingId=' ecviewFocusingId=ID 'focus=' focus=FocusingEnum |
| ('keyStrokeDefinition' '{' 'keyCode=' keyCode=ID ('modifierKeys' '{' (modifierKeys+=ID)* '}')? '}')?; |
| |
| FocusingEnhancer: |
| {FocusingEnhancer} 'focusingEnhancer' name=ID '{' (focusingStrategies+=[FocusingStrategy])+ '}'; |
| |
| StrategyDefault: |
| {StrategyDefault} 'default' '{' 'defaultLayouting=' defaultLayouting=[LayoutingStrategy] 'defaultFocusing=' |
| defaultFocusing=[FocusingEnhancer] '}'; |
| |
| enum LayoutingEnum: |
| HORIZONTAL='Horizontal' | VERTICAL='Vertical' | GRID='Grid' | FORM2='Form2' | FORM3='Form3' | CSS='Css'; |
| |
| enum FocusingEnum: |
| FORWARD='Forward' | BACKWARD='Backward'; |
| |
| |