Closed jpcima closed 5 years ago
Abount integrating this in the editor, I an not completely sure how I lay it out the best way. I think a small toolbar which has 3 icons: copy/paste/select format. Maybe I can take some space for it at the right side of the long instrument name box.
Another thing is that there exists already ctrl-c/ctrl-v as copy & paste, which currently copies instrument's binary data. It's important to keep these two are distinct, as custom format are unable to save all data. But also this difference can be lead to confusion for users.
What is implemented and working:
Next, I allowed to parse varying forms of PMD found... Ther are some using comma to separate, and some which don't.
Also, writing name seems optional is the case of PMD. I have extended the parser with conditionals using simple looking ahead by one token. It looks for an = symbol to check the presence of name.
For me, the current state if fine to merge.
Also @Wohlstand, the travis shows failure at the ftp upload step.
That because your branch state lacks the script I have added in some moment, so, merging...
Oh that's right, I didn't pay attention about this. Thanks
81
Hi, this shows a concept of using custom text formats for reading and writing. It's not implemented yet in the editor, and only has VOPM as a format now.
In
createVopmFormat
, it can be seen how to build a grammar for a format. TheVal
s are to replace with the actual values of the instrument. To associate with values, it relies on MetaParameter, which has been given a setter function. TheInt
s are just number fields which are ignored, and have defaults used for writing.While writing, the whitespace tokens are used for human-readable formatting. During parsing, the whitespace tokens are always ignored.