blob: 3f4494161a5f02f4290d7f257dc03e152d7781ad [file] [log] [blame]
/**
*
* 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
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
grammar org.eclipse.osbp.xtext.action.ActionDSL with org.eclipse.osbp.xtext.oxtype.OXtype
import "http://osbp.eclipse.org/xtext/action/ActionDSL"
//import "http://osbp.eclipse.org/dsl/entity/v1" as entity
import "http://osbp.eclipse.org/xtext/functionlibrarydsl/FunctionLibraryDSL" as func
import "http://osbp.eclipse.org/xtext/messagedsl/MessageDSL" as msg
import "http://osbp.eclipse.org/xtext/datainterchange/DataDSL" as data
import "http://osbp.eclipse.org/dsl/common/types/v1" as types
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
ActionModel:
importSection=XImportSection?
packages+=ActionPackage*;
ActionPackage:
{ActionPackage} 'package' name=QualifiedName (withouCommandProvider?='noCommandProvider')?
('{'
(commands+=ActionCommand)*
(toolbars+=ActionToolbar)*
'}')?;
ActionCommand:
{ActionCommand} 'command' name=ID
(hasDescription?='describedBy' description=TRANSLATABLESTRING)?
(hasKeyBinding?='keyBinding' keyBinding=STRING)?
actionType = ActionType;
ActionToolbar:
{ActionToolbar} 'toolbar' name=ID (description?='describedBy' descriptionValue=TRANSLATABLESTRING)?
('items' '{' (actions+=ActionToolbarItem)* '}')?;
ActionToolbarItem:
ActionButton | ActionSpacer | ActionState;
ActionSpacer:
{ActionSpacer} 'spacer';
ActionButton:
{ActionButton} 'item' name=TRANSLATABLEID (description?='describedBy' descriptionValue=TRANSLATABLESTRING)?
'command' command=[ActionCommand]
('icon' iconURI=STRING)?;
ActionState:
{ActionState} 'state';
ActionType:
ActionTask | ActionSelectWorkload | ActionDialog | ActionReport |ActionChart | ActionWorkflow | ActionFunction | ActionDatainterchange | ActionUI | ActionTable;
ActionTask:
'taskAction' action=TaskActionEnum;
ActionSelectWorkload:
'selectWorkloadAction' action=SelectWorkloadActionEnum;
ActionDialog:
'dialogAction' action=DialogActionEnum;
ActionReport:
'reportAction' action=ReportActionEnum;
ActionChart:
'chartAction' action=ChartActionEnum;
ActionWorkflow:
'workflowAction' action=WorkflowActionEnum;
ActionDatainterchange:
'datainterchangeAction' action=DatainterchangeActionEnum
dataRef=[data::DataInterchange|FQN]
(hasfilter?='filterOn')?;
ActionUI:
'userinterfaceAction' action=UIActionEnum;
ActionTable:
'tableAction' action=TableActionEnum;
ActionFunction:
'functionalAction'
'group' actionGroup=[func::FunctionLibraryActionGroup]
'canExecute' canExecute=[func::FunctionLibraryCanExecute]
((hasExecuteImmediate?='executeImmediate' executeImmediate=[func::FunctionLibraryExecute]
(hasMessage?='messageCategory' messageCategory=[msg::MessageCategory]
'onFailMessage' onFailMessage=[msg::MessageItem] (hasSuccessMessage?='onSuccessMessage' onSuccessMessage=[msg::MessageItem])?)?
)|
(hasExecuteLater?='executeLater' executeLater=[func::FunctionLibraryExecute]
(hasStartedMessage?='messageCategory' messageCategory=[msg::MessageCategory]
'onStartedMessage' onStartedMessage=[msg::MessageItem])?
));
ActionParameter:
{ActionParameter} 'parameter' parameter = [func::FunctionLibraryParameter];
TRANSLATABLEID:
ID;
TRANSLATABLESTRING:
STRING;
FQN:
ID ('.' ID)*;
enum TaskActionEnum:
TASK_ACTION_CLAIM='Claim' | TASK_ACTION_START='Start' | TASK_ACTION_STOP='Stop' | TASK_ACTION_RELEASE='Release' | TASK_ACTION_SUSPEND='Suspend' |
TASK_ACTION_RESUME='Resume' | TASK_ACTION_SKIP='Skip' | TASK_ACTION_COMPLETE='Complete' | TASK_ACTION_DELEGATE='Delegate' |
TASK_ACTION_FORWARD='Forward' | TASK_ACTION_FAIL='Fail' | TASK_ACTION_REGISTER='Register' | TASK_ACTION_REMOVE='Remove' |
TASK_ACTION_ACTIVATE='Activate' | TASK_ACTION_EXIT='Exit';
enum SelectWorkloadActionEnum:
WORKLOAD_SELECT_ACTION_REMOVE_ALL='RemoveAll' | WORKLOAD_SELECT_ACTION_ADD_ALL='AddAll';
enum DialogActionEnum:
DIALOG_ACTION_NEW='New' |
DIALOG_ACTION_SAVE='Save' |
DIALOG_ACTION_DELETE='Delete' |
DIALOG_ACTION_CANCEL='Cancel' |
DIALOG_ACTION_SAVE_AND_NEW='SaveAndNew' |
DIALOG_ACTION_SAVE_AS_NEW='SaveAsNew';
enum ReportActionEnum:
REPORT_ACTION_PRINT_ON_SERVER_PDF='PrintOnServer' | REPORT_ACTION_DOWNLOAD_PDF='Download';
enum ChartActionEnum:
CHART_ACTION_DOWNLOAD='Download';
enum WorkflowActionEnum:
WORKFLOW_ACTION_START='Start';
enum DatainterchangeActionEnum:
DATAINTERCHANGE_ACTION_IMPORT='Import' | DATAINTERCHANGE_ACTION_EXPORT='Export';
enum UIActionEnum:
NEXT_PART = 'NextPart' |
PREVIOUS_PART = 'PreviousPart' |
NEXT_PERSPECTIVE = 'NextPerspective' |
PREVIOUS_PERSPECTIVE = 'PreviousPerspective' |
DATABASE_INFO='Info' |
MDX_QUERY='MDXQuery';
enum TableActionEnum:
EXPORT_EXCEL = 'ExportExcel' |
EXPORT_CSV = 'ExportCsv' |
EXPORT_PDF = 'ExportPDF';