Open Nirvaxstiel opened 4 months ago
The same behavior is also apparent on my machine when I use the spade to manually reorder members (drag and drop).
I've been closing and reopening the spade with a hotkey to get it to refresh, but the pin and unpin also gets the spade to refresh its view. It seems like the spade reloads the outline very quickly but the spade window isn't notified of the change and the UI gets stuck in the 'refreshing...' state
Updated to VS 17.9.2. Now, it sometimes renders and at other times, it gets stuck again.
Apparently if I open documents by horizontal view, just unfocusing and re-focusing the working document fixes it. (i.e. If the left side is the issue, click the right side, and then back to the left side again.)
Ya, this has been happening for me lately too, it's probably a bug in the extension code.
I've noticed this behaviour consistently in VS 17.9.6. After I make any change to a file, launching CodeMaid Spade will result in the pane getting 'stuck' loading. If I close and re-open the pane, it loads fine. Then any change I make in Spade (like reordering methods, etc) will result in getting stuck loading again, to be fixed by closing and re-opening the pane.
Ya, this has been happening for me lately too, it's probably a bug in the extension code.
I didn't code this extension, but I'm pretty good at coding, so I did a little debugging in this extension's source code, and I found why this is happening, it happens on this line of code.
For some reason, the Document
and the codeModel.Document
aren't equal here after it finishes building the code model asynchronously, so the UpdateViewModelRawCodeItems
method doesn't get called here, so it doesn't load it and just keeps the loading thing there.
I made a temporary fix for this on just my computer by changing the if (Document == codeModel.Document)
to if (Document.FullName == codeModel.Document.FullName)
but that shouldn't need to be done though, so the creator of this extension just needs to figure out why those Documents aren't equal there to fix this bug.
@codecadwallader
Ya, this has been happening for me lately too, it's probably a bug in the extension code.
I didn't code this extension, but I'm pretty good at coding, so I did a little debugging with this extension's source code, and I found why this is happening, it happens on this line of code. For some reason, the
Document
and thecodeModel.Document
aren't equal here after it finishes building the code model asynchronously, so theUpdateViewModelRawCodeItems
method doesn't get called here, so it doesn't load it, and just keeps the loading thing there. I made a temporary fix for this on just my computer by changing theif (Document == codeModel.Document)
toif (Document.FullName == codeModel.Document.FullName)
but that shouldn't need to be done though, so the creator of the extension just needs to figure out why those Documents aren't equal there to fix this bug.
@codecadwallader
Same problem here with VS 17.9.6
Environment
Description
Spade takes too long to render document outline on save. However, redocking, pinning & unpinning spade window solves the issue. It may be due to monolithic code base but I can't tell for sure.
Steps to recreate
Current behavior
Takes too long to render the outline. I have not timed it, but the last time I tried going for a coffee break while it does this, it did not finish the job even after I was done brewing.
Expected behavior
Show some explicit messages on what is going on, or default to previous state and also show an error message.