Révision 3418
TXM/trunk/org.txm.analec.rcp/src/org/txm/macro/urs/exploit/UnitsListMacro.groovy (revision 3418) | ||
---|---|---|
73 | 73 |
def CQI = CQPSearchEngine.getCqiClient() |
74 | 74 |
|
75 | 75 |
if (outputFile != null) { |
76 |
println "Writing to $outputFile"
|
|
76 |
println "Outputing to $outputFile"
|
|
77 | 77 |
outStream = new PrintStream(outputFile) |
78 | 78 |
} else { |
79 | 79 |
outStream = System.out |
... | ... | |
124 | 124 |
def n = 1 |
125 | 125 |
|
126 | 126 |
outStream << "#\tstart\tend\tform" |
127 |
selectedUnits[0].getProps().keySet().sort().each { outStream << "\t"+it } |
|
127 |
def keys = selectedUnits[0].getProps().keySet().sort() |
|
128 |
keys.each { outStream << "\t"+it } |
|
128 | 129 |
outStream << "\n" |
129 | 130 |
|
130 | 131 |
for (def unit : selectedUnits) { |
... | ... | |
135 | 136 |
def props = unit.getProps() |
136 | 137 |
|
137 | 138 |
outStream << sprintf("%d\t%d\t%d\t%s", n, unit.getDeb(), unit.getFin(), form) |
138 |
props.sort()*.value.each { outStream << "\t"+it } |
|
139 |
for (def k : keys) { |
|
140 |
if (props.get(k) == null) { |
|
141 |
outStream << "\t" |
|
142 |
} else { |
|
143 |
outStream << "\t"+props.get(k) |
|
144 |
} |
|
145 |
|
|
146 |
} |
|
139 | 147 |
outStream << "\n" |
140 | 148 |
|
141 | 149 |
n++ |
Formats disponibles : Unified diff