Miscellaneous fixes identified while preparing diagrams
Several change items are identified:
- When closing an MP file or opening a new one, ask to save if it changed. Currently, Gryphon only asks to save when exiting Gryphon.
- Do not report meta-symbols such as $$scope (See MP2-syntax-v4 Section 7.6 for meta-symbols) as a missing event. Test schema: original_examples/Example11_Publish_Subscribe.mp.
- Do not export trace image file ~000.svg if it is an empty graph view.
- Do not overwrite existing trace image files without asking first.
- Do not globally highlight text when selecting a text range with the cursor. Only globally highlight text when searching for text using the Find dialog. Consider using yellow for the global highlight background color as is done with Google Chrome.
- Clear all traces from the graph pane and the navigation pane when "Run" is pressed. Allow these views to repopulate when the run is completed. These views remain cleared if the run fails. These views are restored if "Stop" is pressed. This change prevents users from mistaking old traces for new traces.
- When no traces are generated say "Generated 0 event traces" instead of "Error running trace-generator: Expecting value: line 1 column 1 (char 0)". Test schema:
SCHEMA Simple_Message_Flow ROOT Sender: (* send *); ROOT Receiver: (* receive *); COORDINATE $x: send FROM Sender, $y: receive FROM Receiver DO ADD $x PRECEDES $y; OD; ENSURE #send != #receive;
- Very long event names do not fit within their box. If text wrapping does not fit on word boundaries then wrap on character boundaries. During layout, tall boxes should not crowd boxes above and below them. Test schema:
SCHEMA Long_Names ROOT aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa_bbbbbbbbbbbbbbbbbbbbbb_ccccccccccccccccc_d_e:(f_g_hhhhhhhhhhhhhh_wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww jjjjjjjjjjjjjjj_kkkkkkkkkkkkkkk_lllllllllllll_lll_llllllllll_mmmmmmmmmmmmmmmmmm);
- CTRL+Y does not perform redo in the text editor. CTRL+Z performs undo fine.
- Make model statistics look more like a graphical dashboard (like Innoslate Intelligence) rather than prose text. For each category, e.g. Missing events (error condition is red): 100% events accounted for in traces. Identical traces: amber warning. Use fonts and colors.
- Allow a transparent background in the graph pane so that exported .svg images can be used as overlays.
- Suppress underscores in edge labels for diagrams.
- Add "Snap to grid" option in the graph pane: Use "Align" in the node menu.
- Allow access to all files in the preloaded examples.
- Draw a semi-opaque background behind edge labels in traces and graphs.