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

Fix disappearing sort button in outline view (fix #1091) #1092

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

travkin79
Copy link
Contributor

This PR should be merged before merging PR #1075.

@rubenporras
Copy link
Contributor

Could you explain why the fix works in the commit (and PR) message? I am not very skilled on this area of Eclipse, and just from looking at the PR, I cannot tell why it was broken before and why it is fixed now.

@travkin79
Copy link
Contributor Author

travkin79 commented Aug 30, 2024

Yes. 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.

@rubenporras
Copy link
Contributor

Thanks for the explanation. I understand now. Can you amend the commit message with the explanation? then I would be happy to merge.

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.
Copy link
Contributor

@rubenporras rubenporras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@rubenporras rubenporras merged commit 6d188a8 into eclipse:main Aug 30, 2024
6 checks passed
@travkin79
Copy link
Contributor Author

Thank you, @rubenporras . 😄

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

Successfully merging this pull request may close these issues.

2 participants