SUMMARY STEPS TO REPRODUCE 1. Setup a tool, restricted to work with a particular mime type 2. put a toolbar button for this tool 3. restart Kate 4. File, New 5. File, Save as..., save with the right extension OBSERVED RESULT The button for the tool is greyed until you close and reopen the file EXPECTED RESULT The button should be ungreyed from the moment the file has been saved SOFTWARE/OS VERSIONS Kate 19.12.1, Fedora packages.
One needs to track the mimetype changed or documenturlchanged signals to track this kind of change. I don't have the time to look into this right now.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/154
Git commit 4ae5e3e4a80260b5e501e9a1d48f71c6c72ebe3e by Dominik Haumann. Committed on 31/12/2020 at 15:58. Pushed by cullmann into branch 'master'. External Tools: Track mimetype changes to enable/disable actions M +15 -1 addons/externaltools/kateexternaltoolsview.cpp M +8 -1 addons/externaltools/kateexternaltoolsview.h https://invent.kde.org/utilities/kate/commit/4ae5e3e4a80260b5e501e9a1d48f71c6c72ebe3e