DataContext (@NotNull DataContext fallbackDataContext) { DataContext envContext = ExecutionManagerImpl.getEnvironmentDataContext(); if (fallbackDataContext == DataContext.EMPTY_CONTEXT && envContext != null) { Project project = CommonDataKeys.PROJECT.getData(envContext); Module module = PlatformCoreDataKeys.MODULE.getData(envContext); if (project != null) { fallbackDataContext = projectContext(project, module, null); } } DataContext finalFallbackDataContext = fallbackDataContext; DataContext context = envContext == null ? fallbackDataContext : new DataContext() { @Override public @Nullable Object getData(@NotNull String dataId) { Object data = envContext.getData(dataId); return data != null ? data : finalFallbackDataContext.getData(dataId); } }; return context; }