Skip to main content
summaryrefslogtreecommitdiffstats
blob: 70a2c8cd9e0aaf6a552569046eeec3143deb2f60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<%@taglib prefix="ws" id="org.eclipse.jet.workspaceTags" %>
<%-- Main entry point for org.eclipse.jet.transforms.tagfactory --%>

<c:setVariable var="plugin" select="/plugin"/>
<%-- 
TODO: traverse input model, performing calculations and storing 
the results as model annotations via c:set tag 
--%>
<c:iterate select="$plugin/extension[@point='org.eclipse.jet.tagLibraries']" var="extension">
    <c:iterate select="$extension/tagLibrary[@tagFactory]" var="tagLibrary">
        <c:setVariable var="ordinal" select="1"/>
        <c:set select="$tagLibrary" name="numTags"><c:get select="count($tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)])"/></c:set>
        <c:set select="$tagLibrary" name="pkgFactory"><c:get select="packageName($tagLibrary/@tagFactory)"/></c:set>
        <c:set select="$tagLibrary" name="clsFactory"><c:get select="className($tagLibrary/@tagFactory)"/></c:set>
        <c:iterate select="$tagLibrary/*['Tag' = substring(local-name(), string-length(local-name()) - 2, 3)]" var="tag">
            <c:set select="$tag" name="ordinal"><c:get select="$ordinal"/></c:set>
            <c:setVariable var="ordinal" select="$ordinal + 1"/>
        </c:iterate>
    </c:iterate>
</c:iterate>


<%--
TODO: traverse annotated model, performing text generation actions 
such as ws:file, ws:folder and ws:project 
--%>
<c:iterate select="$plugin/extension[@point='org.eclipse.jet.tagLibraries']" var="extension">
    <c:iterate select="$extension/tagLibrary[@tagFactory]" var="tagLibrary">
        <java:class srcFolder="{$org.eclipse.jet.resource.project.name}/src"
                    package="{$tagLibrary/@pkgFactory}"
                    name="{$tagLibrary/@clsFactory}"
                    template="templates/tagLibrary/tagFactory.java.jet"/>
    </c:iterate>
</c:iterate>
   

<%-- For debug purposes, dump the annotated input model in 
   the root of the project containing the original input model.
   
   Note that model formatting may not be identical, and that in
   the case of non-XML input models, the dump may look quite different.
   
<ws:file template="templates/dump.jet" path="{$org.eclipse.jet.resource.project.name}/dump.xml"/>
--%>

Back to the top