buildframework/helium/doc/api_rst/target-dependencies.dot.ftl
changeset 620 ad8ffc8e1982
parent 588 c7c26511138f
equal deleted inserted replaced
585:238f4cb8391f 620:ad8ffc8e1982
       
     1 <#--
       
     2 ============================================================================ 
       
     3 Name        : 
       
     4 Part of     : Helium 
       
     5 
       
     6 Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     7 All rights reserved.
       
     8 This component and the accompanying materials are made available
       
     9 under the terms of the License "Eclipse Public License v1.0"
       
    10 which accompanies this distribution, and is available
       
    11 at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    12 
       
    13 Initial Contributors:
       
    14 Nokia Corporation - initial contribution.
       
    15 
       
    16 Contributors:
       
    17 
       
    18 Description:
       
    19 
       
    20 ============================================================================
       
    21 -->
       
    22 <#list doc.antDatabase.project as project>
       
    23 <#list project.target as target>
       
    24 <@pp.changeOutputFile name="target-${target.name}.dot" />
       
    25 
       
    26 strict digraph G {
       
    27     rankdir=LR;
       
    28     rotate=180;
       
    29     ordering=out;
       
    30 <#assign currentTarget = target.name>
       
    31 
       
    32 <#macro targetFunc targetMain caller>
       
    33 <#-- Define the targets that call this target. -->
       
    34 <#if caller == 0>
       
    35     "${targetMain.name}" [fontcolor=blue,fontsize=12,shape=box,style=filled,href="project-${targetMain?parent.name}.html#${targetMain.name}"];
       
    36     <#list doc.antDatabase.project.target as callingTarget>
       
    37         <#list callingTarget.dependency as dependency>
       
    38             <#if targetMain.name == dependency>
       
    39                 <#if callingTarget.name != currentTarget>
       
    40                     "${callingTarget.name}" [fontcolor=brown,fontsize=12,shape=box,href="project-${callingTarget?parent.name}.html#${callingTarget.name}"];
       
    41                 </#if>
       
    42                 <#if dependency.@type == "direct">
       
    43                     "${callingTarget.name}" -> "${targetMain.name}" [color=navyblue,fontsize=12];
       
    44                 </#if>
       
    45                 <#if dependency.@type == "exec">
       
    46                     "${callingTarget.name}" -> "${targetMain.name}" [color=limegreen,fontsize=12];
       
    47                 </#if>
       
    48             </#if>
       
    49         </#list>
       
    50     </#list>
       
    51 </#if>
       
    52 <#if caller == 1>
       
    53     "${targetMain.name}" [fontcolor=brown,fontsize=12,shape=box,href="project-${targetMain?parent.name}.html#${targetMain.name}"];
       
    54 </#if>
       
    55 
       
    56 <#if targetMain.dependency?size == 1>
       
    57     <#list targetMain.dependency as dependency>
       
    58     "${dependency}" [fontcolor=brown,fontsize=12,shape=box,href="project-${targetMain?parent.name}.html#${dependency}"];
       
    59     </#list>
       
    60 </#if>
       
    61 
       
    62 <#assign depTotal=targetMain.dependency?size>
       
    63 <#assign depLastIndex=targetMain.dependency?size-1>
       
    64 
       
    65 <#if depTotal &gt; 1>
       
    66     <#list 0..depLastIndex as index>
       
    67         <#if targetMain.dependency[index].@type == "direct">
       
    68         "${targetMain.name}" -> "${targetMain.dependency[index]}" [color=navyblue,label="${index+1}",fontsize=12];
       
    69         </#if>
       
    70         <#if targetMain.dependency[index].@type == "exec">
       
    71         "${targetMain.name}" -> "${targetMain.dependency[index]}" [color=limegreen,label="${index+1}",fontsize=12];
       
    72         </#if>
       
    73         <#list doc.antDatabase.project.target as targetDep>
       
    74             <#if targetDep.name == targetMain.dependency[index]>
       
    75             <@targetFunc targetMain=targetDep caller=1 />
       
    76             </#if>
       
    77         </#list>
       
    78     </#list>
       
    79 </#if>
       
    80 
       
    81 <#attempt>
       
    82 <#if depTotal == 1>
       
    83     <#if targetMain.dependency.@type == "direct">
       
    84     "${targetMain.name}" -> "${targetMain.dependency[depTotal-1]}" [color=navyblue];
       
    85     </#if>
       
    86     <#if targetMain.dependency.@type == "exec">
       
    87     "${targetMain.name}" -> "${targetMain.dependency[depTotal-1]}" [color=limegreen];
       
    88     </#if>
       
    89     <#list doc.antDatabase.project.target as targetDep>
       
    90         <#if targetDep.name == targetMain.dependency>
       
    91         <@targetFunc targetMain=targetDep caller=1 />
       
    92         </#if>
       
    93     </#list>
       
    94 </#if>
       
    95 <#recover>
       
    96 
       
    97 </#attempt>
       
    98 
       
    99 </#macro>
       
   100 
       
   101 <@targetFunc targetMain=target caller=0 />
       
   102 }
       
   103 </#list>
       
   104 </#list>
       
   105