| grammar org.eclipse.osbp.xtext.gridsource.GridSource with org.eclipse.xtext.xbase.Xtype |
| |
| import "http://www.eclipse.org/emf/2002/Ecore" as ecore |
| import "http://www.eclipse.org/xtext/common/JavaVMTypes" |
| import "platform:/resource/org.eclipse.osbp.infogrid.model/model/gridsource.ecore" |
| import "platform:/resource/org.eclipse.osbp.infogrid.model/model/gridsource.ecore#//style" as style |
| |
| Source returns CxGridSource: |
| 'gridsource' id=QualifiedName 'for' rootType=JvmTypeReference '{' |
| 'inputs' '{' |
| inputs+=Input* |
| '}' |
| properties+=Property* |
| '}'; |
| |
| Input returns CxGridSourceInput: |
| 'inputType' inputType=JvmTypeReference |
| 'filters' filters+=EQFilter ('&&' filters+=EQFilter)*; |
| |
| EQFilter returns CxGridSourceEQFilter: |
| {CxGridSourceEQFilter} |
| 'root:' rootTypePropertyPath=NestedField '=' 'input:' inputTypePropertyPath=NestedField; |
| |
| Property returns CxGridProperty: |
| 'prop' path=NestedField 'style' style=PropertyStyle; |
| |
| NestedField returns CxGridNestedField: |
| {CxGridNestedField} |
| field=[JvmOperation] path=(NestedPath)?; |
| |
| NestedPath returns CxGridNestedPath: |
| {CxGridNestedPath} |
| '.' field=[JvmOperation] path=(NestedPath)?; |
| |
| PropertyStyle returns style::CxGridPropStyle: |
| PropertyButtonStyle | PropertyHtmlStyle | PropertyProgressbarStyle | PropertyTextStyle | |
| PropertyBooleanStyle | PropertyDateStyle | PropertyNumberStyle | PropertyImageStyle | PropertyQuantityStyle | |
| PropertyPriceStyle | GridPropIndicatorStyle; |
| |
| PropertyButtonStyle returns style::CxGridPropButtonStyle: |
| {style::CxGridPropButtonStyle} |
| 'buttonStyle' 'eventTopic' eventTopic=STRING; |
| |
| PropertyHtmlStyle returns style::CxGridPropHtmlStyle: |
| {style::CxGridPropHtmlStyle} |
| 'htmlStyle'; |
| |
| PropertyBooleanStyle returns style::CxGridPropBooleanStyle: |
| {style::CxGridPropBooleanStyle} |
| 'boolStyle'; |
| |
| PropertyDateStyle returns style::CxGridPropDateStyle: |
| {style::CxGridPropDateStyle} |
| 'dateStyle' 'format' dateFormat=STRING; |
| |
| PropertyNumberStyle returns style::CxGridPropNumberStyle: |
| {style::CxGridPropNumberStyle} |
| 'numberStyle' 'format' numberFormat=STRING; |
| |
| PropertyProgressbarStyle returns style::CxGridPropProgressbarStyle: |
| {style::CxGridPropProgressbarStyle} |
| 'progressbarStyle' 'max' maxValue=LDouble; |
| |
| GridPropIndicatorStyle returns style::CxGridPropIndicatorStyle: |
| {style::CxGridPropIndicatorStyle} |
| 'indicatorStyle' 'greenFrom' greenStarts=LDouble 'redUntil' redEnds=LDouble; |
| |
| PropertyQuantityStyle returns style::CxGridPropQuantityStyle: |
| {style::CxGridPropQuantityStyle} |
| 'quantityStyle' (htmlPattern=STRING)? 'value' '=' valuePropertyPath=NestedField ('(' 'format' valueNumberFormat=STRING |
| ')')? 'uom' '=' |
| uomPropertyPath=NestedField; |
| |
| PropertyPriceStyle returns style::CxGridPropPriceStyle: |
| {style::CxGridPropPriceStyle} |
| 'priceStyle' (htmlPattern=STRING)? 'value' '=' valuePropertyPath=NestedField ('(' 'format' valueNumberFormat=STRING |
| ')')? 'currency' '=' |
| currencyPropertyPath=NestedField; |
| |
| PropertyTextStyle returns style::CxGridPropTextStyle: |
| {style::CxGridPropTextStyle} |
| 'textStyle'; |
| |
| PropertyImageStyle returns style::CxGridPropImageStyle: |
| {style::CxGridPropImageStyle} |
| 'imageStyle' ('eventTopic' eventTopic=STRING)? '{' |
| configs+=StyleConfig* |
| '}'; |
| |
| QualifiedName: |
| ValidID (=> '.' ValidID)*; |
| |
| ValidID: |
| ID; |
| |
| StyleConfig returns style::CxGridStyleConfig: |
| NumericToResourceStyleConfig | StringToResourceStyleConfig; |
| |
| NumericToResourceStyleConfig returns style::CxGridStyleConfigNumericToResource: |
| 'number' compare=StyleCompare value=LDouble 'then' resourceThemePath=THEME_RESOURCE; |
| |
| StringToResourceStyleConfig returns style::CxGridStyleConfigStringToResource: |
| 'string' compare=StyleCompare value=STRING 'then' resourceThemePath=THEME_RESOURCE; |
| |
| enum StyleCompare returns style::CxGridCompare: |
| Equal="equal" | GreaterEqual="greater equal" | GreaterThan="greater than" | LowerEqual="lower equal" | |
| LowerThan="lower than" | NotEqual="not equal"; |
| |
| terminal ID: |
| '^'? ('a'..'z' | 'A'..'Z' | '$' | '_') ('a'..'z' | 'A'..'Z' | '$' | '_' | '0'..'9')*; |
| |
| terminal INT returns ecore::EInt: |
| '0'..'9' ('0'..'9' | '_')*; |
| |
| terminal THEME_RESOURCE: |
| 'theme:/' ('a'..'z' | 'A'..'Z' | '$' | '_' | '.' | '/' | '0'..'9')*; |
| |
| LInt returns ecore::EInt: |
| ('+' | '-')? INT; |
| |
| LDouble returns ecore::EDouble: |
| LInt ('.' INT)?; |
| |
| terminal EVENT_TOPIC: |
| "'" (ID) ('/' ID)* ('/*')? "'"; |