You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Jacob Danner <ja...@gmail.com> on 2007/03/10 08:32:21 UTC

[XmlBeans-279] Add convenience XmlOptions setter methods with boolean arguments

http://issues.apache.org/jira/browse/XMLBEANS-279

Hey guys,
I've got a patch ready for the jira issue above, I think its a
improvement, but had some design questions I wanted to chat about.

In my patch I've added a method like
setSavePrettyPrint(boolean flag){
if(flag)
   return set( KEY );
else
   return checkAndRemove( KEY );
}

My questions are:
should methods like above be named:
savePrettyPrint(boolean flag)

Also, does/will it make sense to have similar convenience method for
methods that take parameters? For example,
setSavePrettyPrintIndent(boolean flag, int indent)
it doesn't really make sense to me, but I wanted to confirm.

Thanks,
-jacobd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


RE: [XmlBeans-279] Add convenience XmlOptions setter methods with boolean arguments

Posted by Cezar Andrei <ce...@bea.com>.
There is already a way to unset pretty print using remove() method.
But seems that SavePrettyPrint is one of the popular options and makes
sense to add a setSavePrettyPrint(Boolean). I don't think the other
methods are necessary.

Cezar

> -----Original Message-----
> From: Jacob Danner [mailto:jacob.danner@gmail.com]
> Sent: Saturday, March 10, 2007 1:32 AM
> To: Cezar Andrei; Radu Preotiuc-Pietro; dev@xmlbeans.apache.org
> Subject: [XmlBeans-279] Add convenience XmlOptions setter methods with
> boolean arguments
> 
> http://issues.apache.org/jira/browse/XMLBEANS-279
> 
> Hey guys,
> I've got a patch ready for the jira issue above, I think its a
> improvement, but had some design questions I wanted to chat about.
> 
> In my patch I've added a method like
> setSavePrettyPrint(boolean flag){
> if(flag)
>    return set( KEY );
> else
>    return checkAndRemove( KEY );
> }
> 
> My questions are:
> should methods like above be named:
> savePrettyPrint(boolean flag)
> 
> Also, does/will it make sense to have similar convenience method for
> methods that take parameters? For example,
> setSavePrettyPrintIndent(boolean flag, int indent)
> it doesn't really make sense to me, but I wanted to confirm.
> 
> Thanks,
> -jacobd
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org