Package org.gradle.build.docs.dsl.source.model

Examples of org.gradle.build.docs.dsl.source.model.PropertyMetaData


            this.propertyMetaData = propertyMetaData;
            this.listener = listener;
        }

        public Iterable<? extends Node> getCommentText() {
            PropertyMetaData overriddenProperty = propertyMetaData.getOverriddenProperty();
            if (overriddenProperty == null) {
                listener.warning("No inherited javadoc comment found.");
                return Arrays.asList(document.createTextNode("!!NO INHERITED DOC COMMENT!!"));
            }
            return parse(overriddenProperty, listener).getDocbook();
View Full Code Here


            List<Element> cells = children(row, "td");
            if (cells.size() != header.size()) {
                throw new RuntimeException(String.format("Expected %s <td> elements in <tr>, found: %s", header.size(), tr));
            }
            String propName = cells.get(0).getTextContent().trim();
            PropertyMetaData property = classDoc.getClassMetaData().findProperty(propName);
            if (property == null) {
                throw new RuntimeException(String.format("No metadata for property '%s.%s'. Available properties: %s", classDoc.getName(), propName, classDoc.getClassMetaData().getPropertyNames()));
            }

            Map<String, ExtraAttributeDoc> additionalValues = new LinkedHashMap<String, ExtraAttributeDoc>();
View Full Code Here

        LinkRenderer linkRenderer = new LinkRenderer(doc, model);
        for (Map.Entry<String, ClassDoc> entry : extensionDoc.getExtensionClasses().entrySet()) {
            String id = entry.getKey();
            ClassDoc type = entry.getValue();
            PropertyMetaData propertyMetaData = new PropertyMetaData(id, extensionDoc.getTargetClass().getClassMetaData());
            propertyMetaData.setType(new TypeMetaData(type.getName()));

            Element para = doc.createElement("para");
            para.appendChild(doc.createTextNode("The "));
            para.appendChild(linkRenderer.link(propertyMetaData.getType(), listener));
            para.appendChild(doc.createTextNode(String.format(" added by the %s plugin.", extensionDoc.getPluginId())));

            PropertyDoc propertyDoc = new PropertyDoc(propertyMetaData, Collections.singletonList(para), Collections.<ExtraAttributeDoc>emptyList());
            extensionDoc.getExtraProperties().add(propertyDoc);

            para = doc.createElement("para");
            para.appendChild(doc.createTextNode("Configures the "));
            para.appendChild(linkRenderer.link(propertyMetaData.getType(), listener));
            para.appendChild(doc.createTextNode(String.format(" added by the %s plugin.", extensionDoc.getPluginId())));

            MethodMetaData methodMetaData = new MethodMetaData(id, extensionDoc.getTargetClass().getClassMetaData());
            methodMetaData.addParameter("configClosure", new TypeMetaData(Closure.class.getName()));
            MethodDoc methodDoc = new MethodDoc(methodMetaData, Collections.singletonList(para));
            extensionDoc.getExtraBlocks().add(new BlockDoc(methodDoc, propertyDoc, propertyMetaData.getType(), false));
        }
    }
View Full Code Here

TOP

Related Classes of org.gradle.build.docs.dsl.source.model.PropertyMetaData

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.