void (@NotNull Registry registry) { Validator<VirtualFile> fileValidator = (data, dataId, source) -> data.isValid(); registry.register(CommonDataKeys.VIRTUAL_FILE, fileValidator); registry.register(CommonDataKeys.VIRTUAL_FILE_ARRAY, arrayValidator(fileValidator)); Validator<Project> projectValidator = (data, dataId, source) -> !data.isDisposed(); registry.register(CommonDataKeys.PROJECT, projectValidator); Validator<Editor> editorValidator = (data, dataId, source) -> !data.isDisposed(); registry.register(CommonDataKeys.EDITOR, editorValidator); registry.register(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE, editorValidator); registry.register(CommonDataKeys.HOST_EDITOR, editorValidator); registry.register(InjectedDataKeys.EDITOR, editorValidator); Validator<Object> objectValidator = (data, dataId, source) -> true; registry.register(CommonDataKeys.NAVIGATABLE_ARRAY, arrayValidator(objectValidator)); registry.register(PlatformCoreDataKeys.SELECTED_ITEMS, arrayValidator(objectValidator)); registry.register(PlatformDataKeys.LAST_ACTIVE_TOOL_WINDOWS, arrayValidator(objectValidator)); Validator<EditorWindow> editorWindowValidator = (data, dataId, source) -> data.isValid(); registry.register(EditorWindow.DATA_KEY, editorWindowValidator); }