private String getFilename(final ProfilesSelection profileSelection, final ISelection selection) {
    final String fileName = ExportShapeUtils.guessExportFileName(selection);
    if (!StringUtils.isEmpty(fileName)) return fileName;

    // if no theme, we should use the container.
    final Feature container = profileSelection.getContainer();
    if (container != null)
      return FeatureHelper.getAnnotationValue(container, IAnnotation.ANNO_LABEL);

    final IProfileFeature[] profiles = profileSelection.getProfiles();
    if (!ArrayUtils.isEmpty(profiles)) return profiles[0].getName();

    return null;
  }