Changes between Initial Version and Version 1 of Ticket #2905, comment 3


Ignore:
Timestamp:
2015-02-05T11:53:29Z (10 years ago)
Author:
Francesco Casella

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2905, comment 3

    initial v1  
    11I had some discussion with Martin Sjoelund about how to get this done. One possibility, which is referred to in this ticket, is to parse comments and whitespace in the AST, so that it is possible to re-generate the same code when saving the modified model. However, this might be unnecessarily complicated and time-consuming to implement and debug.
    22
    3 Another option to solve this issue is that OMEdit works directly on the source text files, instead of working on their internal representation in OMC after parsing them. The easiest way to implement this is that OMEdit just edits the text file, and then has OMC re-load and re-parse it when the model is saved, checked or simulated. If it is possible to do this without having to re-load the entire root-level package the class being edited belongs to, this might turn out to be not fast enough, after the recent improvemens in DLL communication between OMEdit and OMC. Alternatively, it would be possible to keep track of the correspondence between the tokens in the text file and the tokens in the parsed AST, so that it is possible to update the latter after changes to the text file without reloading everything from scratch.
     3Another option to solve this issue is that OMEdit works directly on the source text files, instead of working on their internal representation in OMC after parsing them. The easiest way to implement this is that OMEdit just edits the text file, and then has OMC re-load and re-parse it when the model is saved, checked or simulated. If it is possible to do this without having to re-load the entire root-level package the class being edited belongs to, this might turn out to be fast enough, after the recent improvemens in DLL communication between OMEdit and OMC. Alternatively, it would be possible to keep track of the correspondence between the tokens in the text file and the tokens in the parsed AST, so that it is possible to update the latter after changes to the text file without reloading everything from scratch.
    44
    55Last, but not least, if OMEdit starts working on the text files directly, it would probably be much easier to eventually build direct support of revision control systems in OMEdit, as all these systems use files as basic storage entities. RCS support is essential for serious industrial use of OMEdit.