Examples of FunctionalAgentMetadata


Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    @Override
    void generateDataConsOverview(DataConstructor dataConstructor) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(CALFeatureName.getDataConstructorFeatureName(dataConstructor.getName()), getLocale());
        CALDocComment docComment = dataConstructor.getCALDocComment();
       
        // We delegate the generation to the helper that handles all function agents
        generateFunctionalAgentOverview(dataConstructor, labelMaker.getLabel(dataConstructor), metadata, docComment, StyleClassConstants.OVERVIEW_TABLE_NESTED_DESCRIPTION);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    @Override
    void generateFunctionOverview(Function function) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(CALFeatureName.getFunctionFeatureName(function.getName()), getLocale());
        CALDocComment docComment = function.getCALDocComment();
       
        // We delegate the generation to the helper that handles all function agents
        generateFunctionalAgentOverview(function, labelMaker.getLabel(function), metadata, docComment, StyleClassConstants.OVERVIEW_TABLE_OUTER_DESCRIPTION);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    @Override
    void generateClassMethodOverview(ClassMethod classMethod) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(CALFeatureName.getClassMethodFeatureName(classMethod.getName()), getLocale());
        CALDocComment docComment = classMethod.getCALDocComment();
       
        // We delegate the generation to the helper that handles all function agents
        generateFunctionalAgentOverview(classMethod, labelMaker.getLabel(classMethod), metadata, docComment, StyleClassConstants.OVERVIEW_TABLE_NESTED_DESCRIPTION);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    @Override
    void generateDataConsDoc(DataConstructor dataConstructor, int index) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(CALFeatureName.getDataConstructorFeatureName(dataConstructor.getName()), getLocale());
        CALDocComment docComment = dataConstructor.getCALDocComment();

        // We delegate the generation to the helper that handles all function agents
        generateFunctionalAgentDoc(dataConstructor, labelMaker.getLabel(dataConstructor), metadata, docComment, index, false);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    @Override
    void generateFunctionDoc(Function function, int index) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(CALFeatureName.getFunctionFeatureName(function.getName()), getLocale());
        CALDocComment docComment = function.getCALDocComment();
       
        // We delegate the generation to the helper that handles all function agents.
        // The helper expects to work in the context of a definition list, so we create one.
        currentPage.openTag(HTML.Tag.DL, classAttribute(getScopeStyleClass(function.getScope())));
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    @Override
    void generateClassMethodDoc(ClassMethod classMethod, int index) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(CALFeatureName.getClassMethodFeatureName(classMethod.getName()), getLocale());
        CALDocComment docComment = classMethod.getCALDocComment();
       
        // We delegate the generation to the helper that handles all function agents
        generateFunctionalAgentDoc(classMethod, labelMaker.getLabel(classMethod), metadata, docComment, index, true);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    void generateUsageDocArgTypeIndexEntry(ScopedEntity documentedEntity, FunctionalAgent entity) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(entity, getLocale());
        CALDocComment docComment = entity.getCALDocComment();
       
        // We delegate to a helper method to generate a usage index entry
        generateUsageIndexEntry(entity, labelMaker.getLabel(entity), metadata, docComment, StyleClassConstants.OVERVIEW_TABLE_OUTER_DESCRIPTION);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

    /**
     * {@inheritDoc}
     */
    void generateUsageDocReturnTypeIndexEntry(ScopedEntity documentedEntity, FunctionalAgent entity) {
        FunctionalAgentMetadata metadata = (FunctionalAgentMetadata)getMetadata(entity, getLocale());
        CALDocComment docComment = entity.getCALDocComment();
       
        // We delegate to a helper method to generate a usage index entry
        generateUsageIndexEntry(entity, labelMaker.getLabel(entity), metadata, docComment, StyleClassConstants.OVERVIEW_TABLE_OUTER_DESCRIPTION);
    }
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

     * @return the HTML formatted tooltip text for a functional agent gem
     */
    public static String getFunctionalAgentToolTip(FunctionalAgentGem gem, JComponent parent, Locale locale) {
       
        GemEntity gemEntity = gem.getGemEntity();
        FunctionalAgentMetadata metadata = gemEntity.getMetadata(GemCutter.getLocaleFromPreferences());

        // Add the name and the description.
        // Note: we want to show the fully qualified name in the title, so don't use the naming policy
        GemEntity entity = gem.getGemEntity();
        // todo-jowong modify below if tooltips are to display minimally qualified module names
        String name = metadata.getDisplayName() != null ? entity.getName().getModuleName() + "." + metadata.getDisplayName()
                                                        : entity.getName().getQualifiedName();
        StringBuilder text = new StringBuilder();
        text.append("<html><body><b>");
        text.append(name);
        text.append("</b>");

        if (metadata.getShortDescription() != null) {
            text.append("<br>");
            text.append(metadata.getShortDescription());
       
        } else if (metadata.getLongDescription() != null) {
            text.append("<br>").append(wrapTextToHTMLLines(metadata.getLongDescription(), parent));           
        } else {
            // If there is neither a short nor a long description, display the CALDoc description instead.
            CALDocComment caldoc = gem.getGemEntity().getFunctionalAgent().getCALDocComment();
            if (caldoc != null) {
                String caldocDesc = NavHtmlFactory.getHtmlForCALDocSummaryWithNoHyperlinks(caldoc, locale, true);
View Full Code Here

Examples of org.openquark.cal.metadata.FunctionalAgentMetadata

                   
                    // If there is no design description of the input,
                    // show the description of the gem argument instead.
                   
                    FunctionalAgentGem faGem = (FunctionalAgentGem) gem;
                    FunctionalAgentMetadata gemMetadata = faGem.getGemEntity().getMetadata(GemCutter.getLocaleFromPreferences());
                    ArgumentMetadata[] gemArguments = gemMetadata.getArguments();
                   
                    int argNum = inputPart.getInputNum();
                    argDesc = argNum < gemArguments.length ? gemArguments[argNum].getShortDescription() : null;
                   
                    // If there is no description of the gem argument, display the CALDoc instead.
                    if (argDesc == null) {
                        CALDocComment caldoc = faGem.getGemEntity().getFunctionalAgent().getCALDocComment();
                       
                        if (caldoc != null) {
                            if (argNum < caldoc.getNArgBlocks()) {
                                argCALDocDesc = NavHtmlFactory.getHtmlForCALDocTextBlockWithNoHyperlinks(caldoc.getNthArgBlock(argNum).getTextBlock(), true);
                            }
                        }
                    }
                }
               
                CollectorGem argTargetGem = GemGraph.getInputArgumentTarget(inputPart);
                if (argTargetGem != null) {
                    argTarget = argTargetGem.getUnqualifiedName();
                }
            }
        } else if (part instanceof Gem.PartOutput) {
           
            Gem gem = part.getGem();
            Gem.PartOutput outputPart = (Gem.PartOutput)part;
           
            if (!outputPart.isConnected() && gem instanceof FunctionalAgentGem) {
                FunctionalAgentGem faGem = (FunctionalAgentGem) gem;
                FunctionalAgentMetadata gemMetadata = faGem.getGemEntity().getMetadata(GemCutter.getLocaleFromPreferences());

                if (gemMetadata instanceof FunctionMetadata) {
                    argDesc = ((FunctionMetadata)gemMetadata).getReturnValueDescription();
                } else if (gemMetadata instanceof ClassMethodMetadata) {
                    argDesc = ((ClassMethodMetadata)gemMetadata).getReturnValueDescription();
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.