microsoft / XmlNotepad

XML Notepad provides a simple intuitive User Interface for browsing and editing XML documents.
https://microsoft.github.io/XmlNotepad/
MIT License
964 stars 205 forks source link

"XML Reload" removes loaded XSLT #385

Open Pierre-de-la-Verre opened 2 months ago

Pierre-de-la-Verre commented 2 months ago

To reproduce:

Could you modify this behaviour to keep the connection between XML and XSLT alive?

lovettchris commented 2 months ago

Ah, sounds like a great idea, so if you are on the XSLT transform tab and the XML file changes, and the user clicks Reload, then automatically rerun the transform. Is this what you want?

Pierre-de-la-Verre commented 2 months ago

Good question ..

I would say: the base feature should be to not! lose the connection to the XSL.

The "rerun/reload" topic can be seen in a complex way: 3 situations (XML has changed / XSL has changed / XML and XSL has changed) can be answered in 2 ways (reload / rerun) in 3 modes (ask always / do it always / don't do it)

Maybe some "possible combinations" are useless, but at the moment I don't have an idea which combinations are useful and how to handle it. But I think that's not the highest priority ;-)

lovettchris commented 2 months ago

Got it so how about we add to the Options dialog

Where the property has a drop down with 3 values [Always, Prompt, Never], where the behavior we see today is [Prompt] for XML and [Never] for XSL. If you change it to [Always], [Always] you get the fully "live" reload behavior (which is what VS code does). Maybe the status bar will tell you that a reload happened.

Could also play with:

Pierre-de-la-Verre commented 2 months ago

For me this would be fine, but I'm always hoping for some comments of other users.