public static @NotNull ConfigurationContext getFromContext(DataContext dataContext, String place) {
    DataManager dataManager = DataManager.getInstance();

    ConfigurationContext sharedContext = dataManager.loadFromDataContext(dataContext, SHARED_CONTEXT);
    Location<?> sharedLocation = sharedContext == null ? null : sharedContext.getLocation();
    PsiElement sharedPsiElement = sharedLocation == null ? null : sharedLocation.getPsiElement();

    Module module = PlatformCoreDataKeys.MODULE.getData(dataContext);
    Location<PsiElement> location = calcLocation(dataContext, module);
    PsiElement psiElement = location == null ? null : location.getPsiElement();

    if (sharedLocation == null || location == null || !Comparing.equal(sharedPsiElement, psiElement)) {
      boolean isMultipleSelection = isMultipleSelection(dataContext);
      sharedContext = new ConfigurationContext(dataContext, location, module, isMultipleSelection, place);
      dataManager.saveInDataContext(dataContext, SHARED_CONTEXT, sharedContext);
    }
    return sharedContext;
  }
public static @NotNull ConfigurationContext getFromContext(DataContext dataContext, String place)