Package org.openquark.cal.compiler

Examples of org.openquark.cal.compiler.CALDocComment


            JavaFieldDeclaration jfd =
                makeQualifiedNameDeclaration(fieldName, typeClassName);

            // Add JavaDoc.  We use any CALDoc for the type class if available.
            JavaDocComment comment;
            CALDocComment cdc = tc.getCALDocComment();
            if (cdc != null) {
                comment = new JavaDocComment(calDocCommentToJavaComment(cdc, null, false));
            } else {
                comment = new JavaDocComment("/** Name binding for TypeClass: " + tc.getName().getQualifiedName() + ". */");
            }
View Full Code Here


            };
           
            for (final Map.Entry<String, CALDocComment> entry : caldocComments.entrySet()) {
               
                final String entityName = entry.getKey();
                final CALDocComment comment = entry.getValue();
               
                if (comment != null) {
                    if (comment.getDescriptionBlock() != null) {
                        comment.getDescriptionBlock().accept(visitor, entityName);
                    }
                   
                    if (comment.getDeprecatedBlock() != null) {
                        comment.getDeprecatedBlock().accept(visitor, entityName);
                    }

                    for (int j = 0, m = comment.getNArgBlocks(); j < m; j++) {
                        if (comment.getNthArgBlock(j).getTextBlock() != null) {
                            comment.getNthArgBlock(j).getTextBlock().accept(visitor, entityName);
                        }
                    }
                   
                    for (int j = 0, m = comment.getNAuthorBlocks(); j < m; j++) {
                        if (comment.getNthAuthorBlock(j) != null) {
                            comment.getNthAuthorBlock(j).accept(visitor, entityName);
                        }
                    }
                   
                    for (int j = 0, m = comment.getNDataConstructorReferences(); j < m; j++) {
                        if (comment.getNthDataConstructorReference(j) != null) {
                            validateGemReference(comment.getNthDataConstructorReference(j), entityName, workspaceManager, brokenReferences);
                        }
                    }
                    for (int j = 0, m = comment.getNFunctionOrClassMethodReferences(); j < m; j++) {
                        if (comment.getNthFunctionOrClassMethodReference(j) != null) {
                            validateGemReference(comment.getNthFunctionOrClassMethodReference(j), entityName, workspaceManager, brokenReferences);
                        }
                    }
                   
                    for (int j = 0, m = comment.getNModuleReferences(); j < m; j++) {
                        if (comment.getNthModuleReference(j) != null) {
                            validateModuleReference(comment.getNthModuleReference(j), entityName, workspaceManager, brokenReferences);
                        }
                    }
                   
                    for (int j = 0, m = comment.getNTypeClassReferences(); j < m; j++) {
                        if (comment.getNthTypeClassReference(j) != null) {
                            validateTypeClassReference(comment.getNthTypeClassReference(j), entityName, workspaceManager, brokenReferences);
                        }
                    }
                   
                    for (int j = 0, m = comment.getNTypeConstructorReferences(); j < m; j++) {
                        if (comment.getNthTypeConstructorReference(j) != null) {
                            validateTypeConsReference(comment.getNthTypeConstructorReference(j), entityName, workspaceManager, brokenReferences);
                        }
                    }

                    if (comment.getReturnBlock() != null) {
                        comment.getReturnBlock().accept(visitor, entityName);
                    }
                   
                    if (comment.getSummary() != null) {
                        comment.getSummary().accept(visitor, entityName);
                    }
                   
                    if (comment.getVersionBlock() != null) {
                        comment.getVersionBlock().accept(visitor, entityName);
                    }

                }
            }
        }
View Full Code Here

                if (envEntity instanceof ClassMethod) {
                    ClassMethod method = (ClassMethod)envEntity;
                    isRequiredClassMethod = (method.getDefaultClassMethodName() == null); // no default -> required
                }
               
                CALDocComment caldoc = envEntity.getCALDocComment();
                buffer.append(getBasicMetadataHtml(owner, metadata, caldoc));
                buffer.append(getFunctionalAgentMetadataHtml(owner, (FunctionalAgentMetadata) metadata, url, caldoc, isRequiredClassMethod));
                buffer.append(getAdditionalMetadataHtml(owner, metadata, caldoc));
               
            } else if (metadata instanceof ModuleMetadata) {
                ModuleName moduleName = featureName.toModuleName();
                ModuleTypeInfo moduleTypeInfoForFeature = owner.getPerspective().getMetaModule(moduleName).getTypeInfo();
               
                CALDocComment caldoc = moduleTypeInfoForFeature.getCALDocComment();
                buffer.append(getBasicMetadataHtml(owner, metadata, caldoc));
                buffer.append(getModuleMetadataHtml(owner, (ModuleMetadata) metadata));
                buffer.append(getAdditionalMetadataHtml(owner, metadata, caldoc));
               
            } else if (metadata instanceof TypeClassMetadata) {
                QualifiedName qualifiedName = featureName.toQualifiedName();
                ModuleTypeInfo moduleTypeInfoForFeature = owner.getPerspective().getMetaModule(qualifiedName.getModuleName()).getTypeInfo();
                TypeClass typeClass = moduleTypeInfoForFeature.getTypeClass(qualifiedName.getUnqualifiedName());
               
                CALDocComment caldoc = typeClass.getCALDocComment();
                buffer.append(getBasicMetadataHtml(owner, metadata, caldoc));
                buffer.append(getTypeClassMetadataHtml(owner, (TypeClassMetadata) metadata));
                buffer.append(getAdditionalMetadataHtml(owner, metadata, caldoc));
               
            } else if (metadata instanceof TypeConstructorMetadata) {
                QualifiedName qualifiedName = featureName.toQualifiedName();
                ModuleTypeInfo moduleTypeInfoForFeature = owner.getPerspective().getMetaModule(qualifiedName.getModuleName()).getTypeInfo();
                TypeConstructor typeCons = moduleTypeInfoForFeature.getTypeConstructor(qualifiedName.getUnqualifiedName());
               
                CALDocComment caldoc = typeCons.getCALDocComment();
                buffer.append(getBasicMetadataHtml(owner, metadata, caldoc));
                buffer.append(getTypeConstructorMetadataHtml(owner, (TypeConstructorMetadata) metadata));
                buffer.append(getAdditionalMetadataHtml(owner, metadata, caldoc));
               
            } else if (metadata instanceof ClassInstanceMetadata) {
                ClassInstanceIdentifier classInstanceID = featureName.toInstanceIdentifier();
                ModuleTypeInfo moduleTypeInfoForFeature = owner.getPerspective().getMetaModule(featureName.toModuleName()).getTypeInfo();
                ClassInstance instance = moduleTypeInfoForFeature.getClassInstance(classInstanceID);
               
                CALDocComment caldoc = instance.getCALDocComment();
                buffer.append(getBasicMetadataHtml(owner, metadata, caldoc));
                buffer.append(getClassInstanceMetadataHtml(owner, (ClassInstanceMetadata) metadata));
                buffer.append(getAdditionalMetadataHtml(owner, metadata, caldoc));
               
            } else if (metadata instanceof InstanceMethodMetadata) {
                ClassInstanceIdentifier classInstanceID = featureName.toInstanceIdentifier();
                ModuleTypeInfo moduleTypeInfoForFeature = owner.getPerspective().getMetaModule(featureName.toModuleName()).getTypeInfo();
                ClassInstance instance = moduleTypeInfoForFeature.getClassInstance(classInstanceID);
               
                CALDocComment caldoc = instance.getMethodCALDocComment(featureName.toInstanceMethodName());
                buffer.append(getBasicMetadataHtml(owner, metadata, caldoc));
                buffer.append(getInstanceMethodMetadataHtml(owner, (InstanceMethodMetadata) metadata, url, caldoc));
                buffer.append(getAdditionalMetadataHtml(owner, metadata, caldoc));
            }
        }
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.CALDocComment

Copyright © 2018 www.massapicom. 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.