In Project Explorer, ensure "Select All" (Ctrl+A and menu) works reliably irrespective of first or subsequent selections.#3534
Conversation
a63f01a to
98792b8
Compare
Test Results 3 024 files ±0 3 024 suites ±0 2h 15m 50s ⏱️ - 6m 46s For more details on these failures, see this check. Results for commit 7bd7d58. ± Comparison against base commit b44e9ab. ♻️ This comment has been updated with latest results. |
| } | ||
|
|
||
| // no-ops for the other methods: | ||
| @Override |
There was a problem hiding this comment.
All the methods have default implementations so these stubs are just useless noise.
There was a problem hiding this comment.
As suggested, removed them.
| // Immediate fallback: handle Ctrl+A at the Tree level | ||
| commonViewer.getTree().addKeyListener(new KeyAdapter() { | ||
| @Override | ||
| public void keyPressed(KeyEvent e) { |
There was a problem hiding this comment.
Note, CommonViewer is a base class in CNF and can be extended. Adding key and part listeners that consumes key or register handlers here directly might affect others code. So please carefully change the code here, it is not only about Project Explorer.
There was a problem hiding this comment.
Somehow it seems like a hack to handle this one key directly, especially given the key binding appears to be configurable:
Let me check on it.
a3fe77d to
a49db52
Compare
a49db52 to
835fc39
Compare
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
8849f93 to
a9f91c5
Compare
| @Override | ||
| public void keyPressed(KeyEvent e) { | ||
| // MOD1 = Ctrl on Win/Linux, Command on macOS | ||
| if ((e.stateMask & SWT.MOD1) != 0 && (e.keyCode == 'a' || e.keyCode == 'A')) { |
There was a problem hiding this comment.
This continues to hard code a key binding that is configurable doesn't it?
merks
left a comment
There was a problem hiding this comment.
It continues to feel like we are treating a symptom and not fixing an underlying problem.
08db76d to
876fada
Compare
|
@merks |
124b217 to
dd70538
Compare
41c3a5c to
77edf2b
Compare
reliably irrespective of first or subsequent selections.
77edf2b to
7bd7d58
Compare

Fixes #2739
Description:
In the Project Explorer, the "Edit > Select All" menu item and Ctrl+A shortcut did not work reliably when a single project was selected. Specifically, pressing Ctrl+A after selecting a project for the first time had no effect. Only after clicking another project did Ctrl+A begin to work as expected.
Details of the fix:
Note : No-ops - These methods are required by the IPartListener2 interface though unused but must be implemented. Yeah - i just tried even if removed it works(not sure if it added some warnings).
Open eclipse freshly, open Project Explorer view. Select a project and ctrl+A to select all the projects.

Before fix(unable to select, next click on 2nd project then ctrl+A will be enabled)
After fix(able to select)
