User: ara_e_w 
  Date: 02/03/05 09:51:33

  Modified:    core/src/xdoclet/tags ClassTagsHandler.java
  Log:
  tighter checks for firstSentenceComment
  
  Revision  Changes    Path
  1.23      +15 -6     xdoclet/core/src/xdoclet/tags/ClassTagsHandler.java
  
  Index: ClassTagsHandler.java
  ===================================================================
  RCS file: /cvsroot/xdoclet/xdoclet/core/src/xdoclet/tags/ClassTagsHandler.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -w -r1.22 -r1.23
  --- ClassTagsHandler.java     4 Mar 2002 21:32:41 -0000       1.22
  +++ ClassTagsHandler.java     5 Mar 2002 17:51:33 -0000       1.23
  @@ -20,7 +20,7 @@
   /**
    * @author    Ara Abrahamian ([EMAIL PROTECTED])
    * @created   Oct 14, 2001
  - * @version   $Revision: 1.22 $
  + * @version   $Revision: 1.23 $
    */
   public class ClassTagsHandler extends AbstractProgramElementTagsHandler
   {
  @@ -721,14 +721,23 @@
         */
        public String firstSentenceDescription( Properties attributes ) throws 
XDocletException
        {
  -             boolean no_description_if_lacking = 
TypeConversionUtil.stringToBoolean( attributes.getProperty( 
"no-description-if-lacking" ), true );
  -             String desc = getCurrentClass().firstSentenceTags().length > 0 ? 
getCurrentClass().firstSentenceTags()[0].text().trim() : "";
  +             Tag[] tags = getCurrentClass().firstSentenceTags();
  +             String desc = null;
   
  -             if( desc.length() == 0 && no_description_if_lacking == true )
  +             if( tags != null && tags.length > 0 )
  +                     desc = tags[0].text();
  +
  +             if( desc == null || desc.length() == 0 )
  +             {
  +                     String no_description_if_lacking_str = attributes.getProperty( 
"no-description-if-lacking" );
  +                     boolean no_description_if_lacking = 
TypeConversionUtil.stringToBoolean( no_description_if_lacking_str, true );
  +
  +                     if( no_description_if_lacking == true )
                        desc = Translator.getString( "no_description" );
  +             }
   
                // Check if there is a \n and replace it by a space
  -             return checkForWrap( desc );
  +             return checkForWrap( desc.trim() );
        }
   
        /**
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to