DataContext (@NotNull Project project, @Nullable Module module, @Nullable Boolean validationMode) { return dataId -> { if (CommonDataKeys.VIRTUAL_FILE.is(dataId)) return project.getBaseDir(); if (CommonDataKeys.PROJECT.is(dataId)) return project; if (PlatformCoreDataKeys.PROJECT_FILE_DIRECTORY.is(dataId)) return project.getBaseDir(); if (PlatformCoreDataKeys.MODULE.is(dataId) || LangDataKeys.MODULE_CONTEXT.is(dataId)) return module; if (VALIDATION_MODE.is(dataId)) return validationMode; return null; }; }