Examples of TextBlock


Examples of org.openquark.cal.compiler.CALDocComment.TextBlock

       
        final StringBuilder buffer = new StringBuilder();
       
        /// The deprecated block comes first.
        //
        final TextBlock deprecatedBlock = caldoc.getDeprecatedBlock();
        if (deprecatedBlock != null) {
            buffer.append("[").append(CALDocMessages.getString("deprecatedColon")).append("\n");
            buffer.append(getTextFromCALDocTextBlockWithLeadingIndentAndTrailingNewline(deprecatedBlock, INDENT_LEVEL));
            buffer.append("]\n\n");
        }
       
        /// If the entity is a class method, then display whether it is required or optional
        //
        if (envEntity instanceof ClassMethod) {
            final ClassMethod method = (ClassMethod)envEntity;
           
            buffer.append("\n");
            if (method.getDefaultClassMethodName() == null) {
                // no default - required
                buffer.append(CALDocMessages.getString("requiredMethodIndicator"));
            } else {
                // has default - optional
                buffer.append(CALDocMessages.getString("optionalMethodIndicator"));
            }
            buffer.append("\n\n");
        }
       
        /// The main description
        //
        buffer.append(getTextFromCALDocTextBlockWithLeadingIndentAndTrailingNewline(caldoc.getDescriptionBlock(), 0));
       
        /// The arguments and the return value
        //
        buffer.append(getTextForArgumentsAndReturnValue(caldoc, envEntity, typeExpr, scopedEntityNamingPolicy));
       
        /// The authors
        //
        final int nAuthors = caldoc.getNAuthorBlocks();
        if (nAuthors > 0) {
            buffer.append("\n").append(CALDocMessages.getString("authorColon")).append("\n");
            for (int i = 0; i < nAuthors; i++) {
                final TextBlock authorBlock = caldoc.getNthAuthorBlock(i);
                buffer.append(getTextFromCALDocTextBlockWithLeadingIndentAndTrailingNewline(authorBlock, INDENT_LEVEL));
            }
        }
       
        /// The version
        //
        final TextBlock versionBlock = caldoc.getVersionBlock();
        if (versionBlock != null) {
            buffer.append("\n").append(CALDocMessages.getString("versionColon")).append("\n");
            buffer.append(getTextFromCALDocTextBlockWithLeadingIndentAndTrailingNewline(versionBlock, INDENT_LEVEL));
        }
       
View Full Code Here

Examples of org.openquark.cal.compiler.CALDocComment.TextBlock

                final String returnTypeString = typePieceStrings[arity];
                buffer.append(spaces(INDENT_LEVEL)).append(CALDocMessages.getString("returnValueIndicator")).append(" :: ").append(returnTypeString).append("\n");
            }
           
            if (hasReturnBlock) {
                final TextBlock returnBlock = caldoc.getReturnBlock();
                buffer.append(getTextFromCALDocTextBlockWithLeadingIndentAndTrailingNewline(returnBlock, INDENT_LEVEL * 2));
            }
        }
       
        return buffer.toString();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.