mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
respect multiselection for open projects from Welcome Screen
This commit is contained in:
+6
-4
@@ -134,10 +134,12 @@ public class RecentProjectPanel extends JPanel {
|
||||
myList.registerKeyboardAction(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Object selection = myList.getSelectedValue();
|
||||
|
||||
if (selection != null) {
|
||||
((AnAction)selection).actionPerformed(AnActionEvent.createFromInputEvent((AnAction)selection, null, ActionPlaces.WELCOME_SCREEN));
|
||||
final Object[] selectedValued = myList.getSelectedValues();
|
||||
if (selectedValued != null) {
|
||||
for (Object selection : selectedValued) {
|
||||
AnActionEvent event = AnActionEvent.createFromInputEvent((AnAction)selection, null, ActionPlaces.WELCOME_SCREEN);
|
||||
((AnAction)selection).actionPerformed(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
}, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
|
||||
|
||||
Reference in New Issue
Block a user