Community
Participate
Working Groups
Pressing down arrow in the type dialog throw focus from the Text control to the "Matching Types" list, which makes it unnecessary to press TAB. Pretty cool, so let's take it one step further. When I type "Keystr", DOWN will select "javax.swing.Keystroke". The next DOWN_ARROW should select "org.eclipse.ui.Keystroke", thereby allowing all matches to be enumerated with just one key. Alternatively, collapse the two lists into a single list or table.
The dialog we are using is provided by Platform/UI.
Deb has looked into this one in the past
Post 3.0
Reopening now that 3.0 has shipped
This took 5 minutes to do :-). In TwoPaneElementSelector#createDialogArea: Composite contents = (Composite) super.createDialogArea(parent); createMessageArea(contents); createFilterText(contents); createLabel(contents, fUpperListLabel); ~ FilteredList list = createFilteredList(contents); createLabel(contents, fLowerListLabel); ~ final Table table = createLowerList(contents); +list.addKeyListener(new KeyAdapter() { + public void keyPressed(KeyEvent e) { + if (e.keyCode == 16777217) { + if (table.getSelectionIndex() > 0) { + table.setSelection(table.getSelectionIndex() - 1); + e.doit = false; + } + } + if (e.keyCode == 16777218) { + if (table.getSelectionIndex() < table.getItemCount() - 1) { + table.setSelection(table.getSelectionIndex() + 1); + e.doit = false; + } + } + } And in FilteredList, you need to override addKeyListener and removeKeyListener so that they are forwarded to the fList.
replace magic numbers with: SWT.ARROW_UP SWT.ARROW_DOWN
Please increase the priority since I have provided the actual fix itself. You just need to review and commit the changes. In case it wasn't obvious, in FilteredList, add: /** * Adds a key listener from the list */ public void addKeyListener(KeyListener listener) { fList.addKeyListener(listener); } /** * Removes a key listener from the list */ public void removeKeyListener(KeyListener listener) { fList.removeKeyListener(listener); }
Billy has moved teams.
The Open Type dialog has been changed to use a single list.
TwoPaneElementSelector is API so I'm sure it still exists, no?
Anyway, who cares. Thanks (JDT?) for the improved dialog.
It is still API, but I was also concerned about the change. When there's more than one item in the middle pane, you don't want up/down affecting the lower pane.
This problem is still annoying me when trying to open a plugin.xml file.
Sorry, I disagree with having a different mode for the behaviour of up/down arrow based on the number of items in the list. Note that there is also work going on to make Open Resource work more like Open Type (i.e. using a single pane), which may address the problem.