Add hide fields toolbar button to outline view (fix #1073) #1075
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @rubenporras,
I'm working on the "hide fields" toolbar entry in the outline view and it works already.
Nevertheless, I think, I need to improve the implementation. I'd like to improve how the states of the menu entry "Hide..." -> "Field" and the toolbar entry "Hide Fields" are synchronized in the outline view. Currently I let the Hide Fields handler register for preference changes and do update the command's state. Do you have a better solution for that?
Besides, I observe some strange behavior in the outline view. As soon as the outline looses focus (by clicking into the CDT LSP editor in my case), the sort and hide fields buttons disappear. I observed that already before preparing my PR with the sort toolbar entry. I'm not sure if this is going wrong in LSP4E or in CDT LSP. Can you observe the same issue?
Another minor issue is that the toolbar buttons icon look different to the icon used in the menu entry "Hide..." > "Field" (and other places). But I could live with that for now.
Thanks and best regards.