Object (@NotNull String dataId) { if (CommonDataKeys.NAVIGATABLE.is(dataId)) { VcsFileRevision[] selectedRevisions = getSelectedRevisions(); if (selectedRevisions.length != 1) return null; VcsFileRevision firstSelectedRevision = ArrayUtil.getFirstElement(selectedRevisions); if (!myHistorySession.isContentAvailable(firstSelectedRevision)) { return null; } VirtualFile virtualFileForRevision = createVirtualFileForRevision(firstSelectedRevision); if (virtualFileForRevision != null) { return new OpenFileDescriptor(myVcs.getProject(), virtualFileForRevision); } else { return null; } } else if (CommonDataKeys.PROJECT.is(dataId)) { return myVcs.getProject(); } else if (VcsDataKeys.VCS_FILE_REVISION.is(dataId)) { return ArrayUtil.getFirstElement(getSelectedRevisions()); } else if (VcsDataKeys.VCS_NON_LOCAL_HISTORY_SESSION.is(dataId)) { return !myHistorySession.hasLocalSource(); } else if (VcsDataKeys.VCS.is(dataId)) { return myVcs.getKeyInstanceMethod(); } else if (VcsDataKeys.VCS_FILE_REVISIONS.is(dataId)) { return getSelectedRevisions(); } else if (VcsDataKeys.REMOTE_HISTORY_CHANGED_LISTENER.is(dataId)) { return (Consumer<String>)s -> myDualView.rebuild(); } else if (VcsDataKeys.CHANGES.is(dataId)) { return getChanges(); } else if (VcsDataKeys.VCS_VIRTUAL_FILE.is(dataId)) { VcsFileRevision[] selectedRevisions = getSelectedRevisions(); if (selectedRevisions.length == 0) return null; return createVirtualFileForRevision(ArrayUtil.getFirstElement(selectedRevisions)); } else if (VcsDataKeys.FILE_PATH.is(dataId)) { return myFilePath; } else if (CommonDataKeys.VIRTUAL_FILE.is(dataId)) { VirtualFile virtualFile = myFilePath.getVirtualFile(); return virtualFile == null || !virtualFile.isValid() ? null : virtualFile; } else if (VcsDataKeys.HISTORY_SESSION.is(dataId)) { return myHistorySession; } else if (VcsDataKeys.HISTORY_PROVIDER.is(dataId)) { return myProvider; } else if (PlatformDataKeys.COPY_PROVIDER.is(dataId)) { return this; } else if (PREVIOUS_REVISION_FOR_DIFF.is(dataId)) { TableView<TreeNodeOnVcsRevision> flatView = myDualView.getFlatView(); if (flatView.getSelectedRow() == (flatView.getRowCount() - 1)) { // no previous return myBottomRevisionForShowDiff != null ? myBottomRevisionForShowDiff : VcsFileRevision.NULL; } else { return flatView.getRow(flatView.getSelectedRow() + 1).getRevision(); } } else if (VcsInternalDataKeys.FILE_HISTORY_REFRESHER.is(dataId)) { return myRefresherI; } else if (PlatformCoreDataKeys.HELP_ID.is(dataId)) { return myHelpId; } return null; }