Changeset 35


Ignore:
Timestamp:
05/08/11 19:32:17 (13 years ago)
Author:
phdmakk
Message:

+ added optional check for required @desc tags in function definitions

Location:
trunk/t3d/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/t3d/src/elements/TTCN3Comment.java

    r7 r35  
    116116                                } 
    117117 
     118                                if (T3D.activeProfile.isCheckFunctionDescTagsRequired()) 
     119                                if (elementType != TTCN3ParserTokenTypes.FunctionDef 
     120//                                              && elementType != TTCN3ParserTokenTypes.TestcaseDef 
     121//                                              && elementType != TTCN3ParserTokenTypes.AltstepDef 
     122                                                && desc.size() <= 0) { 
     123                                        warnings.add(getWarningMissingTags("@" + T3D.activeProfile.getCommentTagsConfiguration().getDescTag())); 
     124                                } 
     125 
     126                                 
    118127                                for (String d : desc) 
    119128                                        if (d.length() <= 0) 
     
    179188                return "Empty tag found: " + tagname; 
    180189        } 
    181          
     190 
     191        private String getWarningMissingTags(String tagname){ 
     192                return "Required " + tagname + " tag is missing"; 
     193        } 
     194 
    182195         
    183196        private String getIdentifier(String comment, int pos){ 
  • trunk/t3d/src/elements/TTCN3Element.java

    r7 r35  
    3636                this.paramView = paramView; 
    3737                this.path = path; 
    38                  
    39                  
    4038                 
    4139                for(String warning : comment.getWarnings()) { 
  • trunk/t3d/src/org/etsi/t3d/config/DocumentationProfile.java

    r7 r35  
    1111        private boolean showOriginalT3DocTags = false; 
    1212        private boolean checkUndocumentedParameters = true; 
     13        private boolean checkFunctionDescTagsRequired = false; 
     14 
    1315        private boolean checkConsistentTagUsage = true; 
    1416        private boolean checkIdenticalDescriptionTags = true; 
     
    126128                return commentTagsConfiguration; 
    127129        } 
     130        public boolean isCheckFunctionDescTagsRequired() { 
     131                return checkFunctionDescTagsRequired; 
     132        } 
     133 
     134        public void setCheckFunctionDescTagsRequired( 
     135                        boolean checkFunctionDescTagsRequired) { 
     136                this.checkFunctionDescTagsRequired = checkFunctionDescTagsRequired; 
     137        } 
     138 
    128139} 
Note: See TracChangeset for help on using the changeset viewer.