docs: @SuppressWarnings("deprecation")
  	public static SaveOptions getOptions(Map<?, ?> saveOptions) {
  		if (saveOptions == null || saveOptions.isEmpty())
  			return defaultOptions();
  		if (saveOptions.containsKey(KEY))
  			return (SaveOptions) saveOptions.get(KEY);
  		if (saveOptions.containsKey(XtextResource.OPTION_SERIALIZATION_OPTIONS))
  			return ((org.eclipse.xtext.parsetree.reconstr.SerializerOptions) 
  					saveOptions.get(XtextResource.OPTION_SERIALIZATION_OPTIONS)).toSaveOptions();
  		if (Boolean.TRUE.equals(saveOptions.get(XtextResource.OPTION_FORMAT))) {
  			return newBuilder().format().getOptions();
  		}
  		return defaultOptions();
  	}