|How suitable is Graphiti for a visual expression builder? [message #1705942]
||Thu, 20 August 2015 10:09
| David Wynter
Registered: July 2009
I need to create a visual expression builder that will create groovy source code underlying. It is based on taking an input record with fields, a map into a transformation which also can have exception objects and cache objects associated with it and map the input fields to fields in an output record. I have a set of classes in emf that represent all of these. The expression can change/inject output field values or raise exceptions.
I would have to add parenthese , 'if', 'else if', 'else', comparison operators (e.g. '>=', '!='. '==' etc.) and an assigment operator ( '=') into my model so all visual elements have an underlying emf class I assume.
Another important aspect is enforcing layout. Any opening parenthese DnD onto the design surface forces the next element to be indented and the next 'line' down. Similarly a closing parenthese is always moved to the next 'line' down and the indent is reduced. DnD an opening parenthese into an expression will cause all following 'lines' to indent.
The purpose is to allow users with no script training to apply logic using a very limited set of operations.
But I'd need the visual model to enforce syntax correctness and I am not sure this is possible with Graphiti. For example the user might DnD a field from a palette of input fields onto the design surface directly after a closing parenthese . This is invalid syntax and I am not sure if Graphiti can enforce this ordering? Valid syntax in this case would allow an opening parenthese , a 'if' statement or a directive such as setting an output field value to a cache value or input field value. It appears that Graphiti is more geared towards class modelling than procedural logic modelling.
So is it a good idea to base such an editor on Graphiti?
[Updated on: Thu, 20 August 2015 10:23]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01562 seconds