Пример #1
0
 public static <T> void assertOneOf(T value, T... values) {
   boolean found = false;
   for (T v : values) {
     if (value == v || value != null && value.equals(v)) {
       found = true;
     }
   }
   Assert.assertTrue(value + " should be equal to one of " + Arrays.toString(values), found);
 }
 @NotNull
 public VirtualFile[] getOpenFiles() {
   final ArrayListSet<VirtualFile> files = new ArrayListSet<VirtualFile>();
   for (final EditorWindow myWindow : myWindows) {
     final EditorWithProviderComposite[] editors = myWindow.getEditors();
     for (final EditorWithProviderComposite editor : editors) {
       final VirtualFile file = editor.getFile();
       LOG.assertTrue(file.isValid(), Arrays.toString(editor.getProviders()));
       files.add(file);
     }
   }
   return VfsUtil.toVirtualFileArray(files);
 }