| /* |
| * Copyright (c) 2014,2016 Loetz GmbH&Co.KG (Heidelberg) |
| * 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 |
| * |
| * Contributors: |
| * Loetz GmbH&Co.KG - Initial implementation |
| */ |
| grammar org.eclipse.osbp.xtext.menu.MenuDsl with org.eclipse.osbp.xtext.oxtype.OXtype |
| |
| import "http://osbp.eclipse.org/xtext/menu/MenuDsl" |
| |
| import "http://www.eclipse.org/emf/2002/Ecore" as ecore |
| import "http://osbp.eclipse.org/xtext/perspective/PerspectiveDsl" as perspective |
| import "http://osbp.eclipse.org/xtext/blip/BlipDSL" as blip |
| import "http://osbp.eclipse.org/xtext/table/TableDSL" as table |
| import "http://osbp.eclipse.org/xtext/dialogdsl/DialogDSL" as dialog |
| |
| MenuModel: |
| importSection=XImportSection? |
| menupackage=MenuPackage; |
| |
| MenuPackage: |
| {MenuPackage} 'package' name=QualifiedName |
| ('expandedImage' expandedImage=STRING 'collapsedImage' collapsedImage=STRING |
| ('height' height=STRING)? |
| ('width' width=STRING)? |
| (hasDesigner?='designer')? |
| (categories+=MenuCategory)*)?; |
| |
| MenuCategory: |
| 'category' name=TRANSLATABLEID |
| (hasTable?='table' table=[table::Table] | |
| hasDialog?='dialog' dialog=[dialog::Dialog] | |
| hasUserFilter?='userFilter' | |
| hasReportPrinter?='reportPrinter' | |
| hasKeyBinding?='keyBinding' | |
| hasSystemSettings?='systemSettings' | |
| '{' trees+=MenuTree* '}')?; |
| |
| MenuTree: |
| 'tree' name=TRANSLATABLEID |
| (hasTooltip?='tooltip' tooltip=TRANSLATABLESTRING)? |
| '{' entries+=MenuEntry* '}'; |
| |
| MenuEntry: |
| 'entry' name=TRANSLATABLEID |
| (hasIcon?='icon' icon=STRING)? |
| (hasProcess?='process' process=[blip::Blip] | |
| hasPerspective?='perspective' perspective=[perspective::Perspective]); |
| |
| TRANSLATABLESTRING: |
| STRING; |
| |
| TRANSLATABLEID: |
| ID; |