Object (@NotNull Project project, @NotNull VcsTreeModelData treeSelection, @NotNull VcsTreeModelData exactSelection, @NotNull String slowId) { if (SelectInContext.DATA_KEY.is(slowId)) { VirtualFile file = VcsTreeModelData.mapObjectToVirtualFile(exactSelection.iterateRawUserObjects()).first(); if (file == null) return null; return new FileSelectInContext(project, file, null); } else if (CommonDataKeys.VIRTUAL_FILE_ARRAY.is(slowId)) { return VcsTreeModelData.mapToVirtualFile(treeSelection) .toArray(VirtualFile.EMPTY_ARRAY); } if (VcsDataKeys.VIRTUAL_FILES.is(slowId)) { return VcsTreeModelData.mapToVirtualFile(treeSelection); } if (CommonDataKeys.NAVIGATABLE.is(slowId)) { VirtualFile file = VcsTreeModelData.mapToNavigatableFile(treeSelection).single(); return file != null && !file.isDirectory() ? PsiNavigationSupport.getInstance().createNavigatable(project, file, 0) : null; } if (CommonDataKeys.NAVIGATABLE_ARRAY.is(slowId)) { return getNavigatableArray(project, VcsTreeModelData.mapToNavigatableFile(treeSelection)); } if (EXACTLY_SELECTED_FILES_DATA_KEY.is(slowId)) { return VcsTreeModelData.mapToExactVirtualFile(exactSelection); } return null; }