Object (@NotNull String dataId) { if (DATA_KEY.is(dataId)) { return this; } if (VcsDataKeys.CHANGES.is(dataId)) { return getSelectedChanges() .toArray(Change.EMPTY_CHANGE_ARRAY); } if (VcsDataKeys.CHANGE_LEAD_SELECTION.is(dataId)) { return VcsTreeModelData.exactlySelected(this) .iterateUserObjects(Change.class) .toArray(Change.EMPTY_CHANGE_ARRAY); } if (VcsDataKeys.CHANGE_LISTS.is(dataId)) { return VcsTreeModelData.exactlySelected(this) .iterateRawUserObjects(ChangeList.class) .toList().toArray(ChangeList[]::new); } if (VcsDataKeys.FILE_PATHS.is(dataId)) { return VcsTreeModelData.mapToFilePath(VcsTreeModelData.selected(this)); } if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { // don't try to delete files when only a changelist node is selected boolean hasSelection = VcsTreeModelData.exactlySelected(this) .iterateRawUserObjects() .filter(userObject -> !(userObject instanceof ChangeList)) .isNotEmpty(); return hasSelection ? new VirtualFileDeleteProvider() : null; } if (UNVERSIONED_FILE_PATHS_DATA_KEY.is(dataId)) { return getSelectedUnversionedFiles(); } if (IGNORED_FILE_PATHS_DATA_KEY.is(dataId)) { return getSelectedIgnoredFiles(); } if (VcsDataKeys.MODIFIED_WITHOUT_EDITING_DATA_KEY.is(dataId)) { return getSelectedModifiedWithoutEditing().toList(); } if (LOCALLY_DELETED_CHANGES.is(dataId)) { return getSelectedLocallyDeletedChanges().toList(); } if (MISSING_FILES_DATA_KEY.is(dataId)) { return getSelectedLocallyDeletedChanges() .map(LocallyDeletedChange::getPath) .toList(); } if (PlatformCoreDataKeys.HELP_ID.is(dataId)) { return HELP_ID; } if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { DataProvider superProvider = (DataProvider)super.getData(dataId); VcsTreeModelData treeSelection = VcsTreeModelData.selected(this); VcsTreeModelData exactSelection = VcsTreeModelData.exactlySelected(this); return CompositeDataProvider.compose(slowId -> getSlowData(myProject, treeSelection, exactSelection, slowId), superProvider); } return super.getData(dataId); }