private @Nullable DataContext commitAndRefreshDataContextIfNeeded(@Nullable DataContext dataContext, Caret caret) {
    // injected computed data must be refreshed after commit,
    // forced "caret" does that by adding a new snapshot layer
    return myWorksInInjected && ensureInjectionUpToDate(caret) && dataContext != null ?
           freshCaretDataContext(dataContext, caret) : dataContext;
  }
private @Nullable DataContext commitAndRefreshDataContextIfNeeded(@Nullable DataContext dataContext, Caret caret)