alexzhornyak / ScxmlEditor-Tutorial

ScxmlEditor - powerful tool for creating, editing and debugging scxml files
https://alexzhornyak.github.io/ScxmlEditor-Tutorial/
BSD 3-Clause "New" or "Revised" License
73 stars 13 forks source link

Allow SCXML raw update without re-layout #72

Open EdK-z opened 2 years ago

EdK-z commented 2 years ago

Feature request Currently, making changes in the raw SCXML panel causes the app to re-layout everything. Is it possible to retain the existing layout by default?

Perhaps a related request... when opening an SCXML file that was originally generated in ScxmlEditor, but was edited outside of the editor, can the layout be retained also in this situation. I know there's a checksum, but maybe if the checksum fails, allow the user an option to attempt to open with the old layout anyway?

alexzhornyak commented 2 years ago

image

ScxmlEditor creates files with metainformation. If such metainformation is present, it will be loaded. If not scxml will be parsed and auto layouted. So, never edit files with metainformation because all text information will be skipped during load.

If you edited manually state chart that was written in ScxmlEditor and want to override layout, you should remove commented metainformation

EdK-z commented 2 years ago

I guess this would be difficult to implement.... The problem is that I want to keep the layout that I created in ScxmlEditor even after changing some of the SCXML file content. There are two scenarios.... 1) In the app you have an "SCXML View" - if I make a change there and "convert" it will kill the current layout... is there a way to make this view editable without killing the current layout? 2) If I edit outside of the ScxmlEditor, and keep the metadata, then open inside ScxmlEditor... the metadata ignores the new content, it only draws the old SCXML before it was edited

Is it possible for ScxmlEditor to read the old metadata, then look at what changed in the actual SCXML file, then only attempt to layout the new items and keep the position of the old items?

alexzhornyak commented 2 years ago

I think you previously worked a lot of hand writing scxml. I offer to completely switch on visual editing. If you need batch operations like rename, you can use either app Rename operation or you can edit layout in text way

image

EdK-z commented 2 years ago

Sometimes its just easier to do a bulk edit in text, especially if I need to use some complex regex because I made a mistake consistently throughout the file. Its not common, but it happened once :-). Maybe I'll just try saving the DFM before I make my changes, then restore and manually add the new or altered items. Is DFM a standard, does it have a reference? I won't argue if you want to close this issue, but I still think this would be a useful feature.

alexzhornyak commented 2 years ago

Sometimes its just easier to do a bulk edit in text, especially if I need to use some complex regex because I made a mistake consistently throughout the file. Its not common, but it happened once :-). Maybe I'll just try saving the DFM before I make my changes, then restore and manually add the new or altered items. Is DFM a standard, does it have a reference? I won't argue if you want to close this issue, but I still think this would be a useful feature.

https://www.codeproject.com/Articles/1060345/DFM-serialization-in-depth