Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort toolbar button disappears in outline view if an LSP editor is activated #1091

Closed
travkin79 opened this issue Aug 29, 2024 · 0 comments
Closed

Comments

@travkin79
Copy link
Contributor

The outline view provides a sort button. It is available as long as the outline view is active. As soon as instead an LSP editor becomes active, the button disappears, although the LSP editor provides the outline page that is still visible.

Examples:

Outline view is active, sort button is visible in the toolbar:
image

LSP editor is active, the sort button disappeared:
image

I found this issue while working on PR #1075.

travkin79 added a commit to travkin79/lsp4e that referenced this issue Aug 29, 2024
travkin79 added a commit to travkin79/lsp4e that referenced this issue Aug 30, 2024
Previously, the sort button was only active if the active part was the outline view (activePart had to be instanceof OutlineView). As soon as an editor became active, the visibleWhen expression became false and the sort button disappeared. The check was done by the expression definition named activePartHasCNFOutlinePage.

I added a new expression definition named activeEditorHasCNFOutlinePage. I changed the visibleWhen expression to only check if the (last) active editor (that does not necessarily has to be in focus) has an outline page of type CNFOutlinePage. The remaining checks using the expression activePartHasCNFOutlinePage are left unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant