Repository navigation
Conversation
|
Cool feature, something many users have wanted for a long time. |
|
While reading the description I assumed it will be applied to the editor tabs, not just the editor drop down list. Now tabs and drop-down list order will be inconsistent, which is not nice. Would it make sense to apply same preference to the tab ordering? E.g. if user pins an editor, it will be moved to the left most place in the tab folder, if a second editor pinned, it will be moved next to the already pinned one? |
Sounds cool, let me check on it. |
3e7124e to
f64ba99
Compare
0b9a41f to
77626aa
Compare
|
@iloveeclipse - Thank you for the thoughtful feedback and suggestion! I completely agree that keeping the physical editor tabs in sync with the drop-down lists provides a much more cohesive and intuitive user experience. The PR and description have been updated accordingly. Please feel free to review the latest changes and let me know if you have any further suggestions! |
Let me check on it. Looks like something got missed out. |
77626aa to
482dec6
Compare
1af0ec4 to
f15d089
Compare
f15d089 to
1ec46c9
Compare
|
@merks : can you take a look at this small feature, when you get some time please? if anything else needs to be made better or different in your opinion? @HeikoKlare : do you have any inputs on this please. |
|
@deepika-u : the tests are failing |
Yes - checking on it. Will keep the task posted. |
|
Thanks for working on this, the idea is quite interesting and would be good to have. However, the overall concept and the resulting behavior are hard to understand from a user's (or at least my) perspective: pinned tabs are moved to the left, but with MRU enabled (the default) tab visibility depends on selection recency, so pinned tabs can still disappear into the chevron. In addition, the tab strip, the chevron list (grouped by pinned/hidden, then alphabetical) and Ctrl+E (activation history) end up showing three different orders. I tried to play around with the PR but was quite confused of the behavior (even more than of the already existing MRU behavior), comparable to what @iloveeclipse already pointed to. I think we first need one simple rule that users can understand, e.g., "pinned editors are listed first in the chevron list and in Ctrl+E" without moving tabs, or "pinned tabs never overflow" (which would probably require support in Apart from that, the current implementation does not seem to be ready for production yet. When taking a first look at it, I stumpled upon these points:
|
Thanks for the detailed feedback, let me check them. |
1ec46c9 to
f54fac0
Compare
|
@HeikoKlare thanks a lot for the detailed review. I'd like to narrow this PR to one simple rule: With the preference enabled, pinned editors are listed first in the editor chevron list and in Ctrl+E. Tabs are not moved. Done:
I'll update the PR shortly with:
Known limitations:
Heiko, does this match what you had in mind? @iloveeclipse thanks for the suggestion to move pinned tabs. With MRU on, tab visibility depends on recency, so pinned tabs can still end up in the chevron, and moving them changes the persisted model and the order the user arranged by dragging. I'd keep this PR to the lists (chevron and Ctrl+E) and revisit the tab strip separately. Is that OK for you? |
Sure. Should you follow on this, one possibility would be to move tabs only if MRU is off, or spend yet another option to move pinned tabs. |
Thanks, that makes sense. I'll keep this PR to the chevron list and Ctrl+E. |
Yes, that sounds reasonable. But I also have to admit that I am a bit afraid that with more options for tab sorting, it will become more and more incomprehensive for users. I have not used editor pinning before and, if I understand correctly, it is supposed to avoid editor closing/replacement. Now it gets an additional semantics (sorting, but only under specific circumstances) while sorting is already done in a mixed way of user sorting and MRU. So this has the risk of becoming rather confusing (for user as well as for developers who have to take care of all the interacting functionalities). We already had a discussion about the MRU behavior recently, which is strange for certain scenarios: #4207 So I wonder if we should not take a step back and think of a holistic concept of how tab sorting should happen and if the existing pinning functionality is the right thing to affect sorting at all. I do not want to ask for a complete UX redesign of this area with all the effort it would require, but I have the impression that this proposal may rather become a quick fix than a smooth integration into existing concepts. If people using pinning more often have a different opinion, that would probably be more valuable than mine. |
f54fac0 to
3a60c26
Compare
|
Thanks for the reviews. I have pushed the latest changes (all review points addressed, squashed into one commit). The PR is now limited to the rule discussed: with the preference enabled, pinned editors are listed first in the chevron list and in Ctrl+E. Tabs are not moved and the model is not modified.
Title and description are updated to match. For the broader question about tab ordering and pinning, I opened a discussion to collect opinions from people who use pinning a lot: #4536. I am happy to adapt this PR depending on the outcome. |
3a60c26 to
88070a9
Compare
88070a9 to
b29f4bf
Compare


This PR adds an opt-in preference under Preferences > General > Editors: "Show pinned editors first in editor lists (chevron and Ctrl+E)" (off by default).
When many editors are open, pinned editors are the ones users want to reach quickly. With the preference enabled, pinned editors are listed first in the editor chevron list (
>>) and in the Quick Switch list (Ctrl+E).Tabs are not moved and the workbench model is not modified. Only the order of these two lists changes.
Behavior
When enabled
>>): pinned editors form one block above the other editors. Inside the pinned block and inside the remaining editors, the existing order of the list applies (see below).Ctrl+E): pinned editors are listed first, then the others.Inside each group the existing order is kept (MRU order, or tab order if MRU is disabled).
Ctrl+Estill pre-selects the previously used editor, soCtrl+Efollowed byEnterkeeps switching to it, even when pinned editors are listed above it.When disabled (default)
Behavior is unchanged from before this PR.
Limitations
Ctrl+E: MRU order, or tab order if MRU is disabled.Implementation
PinnedEditorsOrder(new): single place for the preference lookup and the stable pinned-first ordering. It is used by the chevron list,Ctrl+Eand the preference page.BasicPartList: chevron list uses it, and the MRU sorter has one pinned category.WorkbookEditorsHandler:Ctrl+Euses it, and the pre-selection uses the position in the reordered list.EditorsPreferencePage/IDEEditorsPreferencePage: new checkbox. Defaults are read from the default scope, and a failingflush()is logged.CTabRendering: new preference constants.Testing
WorkbookEditorsHandlerTest:Ctrl+Eorder with MRU and non-MRU, preference enabled and disabled.Ctrl+Epre-selects the previously used editor with pinned editors listed first.Before the pr(disabled) ->

Ctrl+E ->

After the pr(when enabled) ->

Ctrl+E ->

Why This Feature is Needed
>>) and the Quick Switch list (Ctrl+E).Enterwithout scanning the whole list.Why It Matters
SHOW_PINNED_EDITORS_FIRSTdefaults tofalse. When off, the chevron list andCtrl+Ebehave exactly as before this PR.Ctrl+E; the existing chevron ordering for the chevron list).Ctrl+Eand the preference page.