mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 17:03:12 +07:00
run tests from recent files (IDEA-161184)
This commit is contained in:
@@ -203,7 +203,7 @@ public class Switcher extends AnAction implements DumbAware {
|
||||
}
|
||||
}
|
||||
|
||||
public static class SwitcherPanel extends JPanel implements KeyListener, MouseListener, MouseMotionListener {
|
||||
public static class SwitcherPanel extends JPanel implements KeyListener, MouseListener, MouseMotionListener, DataProvider {
|
||||
final JBPopup myPopup;
|
||||
final JBList toolWindows;
|
||||
final JBList files;
|
||||
@@ -218,6 +218,24 @@ public class Switcher extends AnAction implements DumbAware {
|
||||
final SwitcherSpeedSearch mySpeedSearch;
|
||||
final String myTitle;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Object getData(@NonNls String dataId) {
|
||||
if (CommonDataKeys.VIRTUAL_FILE_ARRAY.is(dataId)) {
|
||||
final List list = getSelectedList().getSelectedValuesList();
|
||||
if (!list.isEmpty()) {
|
||||
final List<VirtualFile> vFiles = new ArrayList<>();
|
||||
for (Object o : list) {
|
||||
if (o instanceof FileInfo) {
|
||||
vFiles.add(((FileInfo)o).first);
|
||||
}
|
||||
}
|
||||
return vFiles.isEmpty() ? null : vFiles.toArray(VirtualFile.EMPTY_ARRAY);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private class MyFocusTraversalPolicy extends FocusTraversalPolicy {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user