eclipse-xtext / eclipse-xtext/xtext
Support multiple comparators (for sorting) in outline view.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
At the moment, the outline view only supports a single comparator. The default sort contribution is defined in org.eclipse.xtext.ui.editor.outline.actions.SortOutlineContribution.
Simply registering multiple sort contributions does not work since the underlying API does not support multiple comparators, cf. org.eclipse.xtext.ui.editor.outline.impl.OutlineFilterAndSorter (multiple filters via add, only one comparator via set).
If would be great if multiple comparators were supported, e.g., by extending the comparator interface org.eclipse.xtext.ui.editor.outline.impl.OutlineFilterAndSorter.IComparator with a org.eclipse.xtext.ui.editor.actions.AbstractToggleActionContributor.configureAction(Action) like method. Then, instead of providing different "sort contributions", one can configure (in the UIModule) multiple comparators.
Of course in that case the "multiple comparator aware" sort contributions would have to toggle between the comparators.
Cf. forum: https://www.eclipse.org/forums/index.php/mv/msg/1088234/1770617/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read org.eclipse.xtext.ui.editor.outline.impl.OutlineFilterAndSorter and the IComparator interface, then inspect org.eclipse.xtext.ui.editor.outline.actions.SortOutlineContribution and the related UIModule configuration. Define how multiple comparators are configured and selected, including how sort contributions toggle them; done means the outline view supports multiple registered comparators without breaking existing sorting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100