DataContext (@NotNull Object buildId, @NotNull BuildProgressListener buildListener) { DataContext dataContext; if (buildListener instanceof BuildView) { dataContext = new MyDelegatingDataContext((BuildView)buildListener); } else if (buildListener instanceof AbstractViewManager) { dataContext = getDataContext(buildId, (AbstractViewManager)buildListener); } else { LOG.error("BuildView or AbstractViewManager expected to obtain proper DataContext for build console quick fixes"); dataContext = DataContext.EMPTY_CONTEXT; } return dataContext; }