forked from 4D-JP/code-audit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparse_method_attributes.txt
42 lines (36 loc) · 1.06 KB
/
parse_method_attributes.txt
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
METHOD GET PATHS(Path project method;$methods)
$props:=New collection
C_OBJECT($attributes)
$names:=New collection
For ($i;1;Size of array($methods))
$method:=$methods{$i}
METHOD GET ATTRIBUTES($method;$attributes;*)
If (Current method path#$method)
$attributes.path:=$method
$props.push($attributes)
Else
$name:=""
For each ($name;$attributes)
$names.push($name)
End for each
End if
CLEAR VARIABLE($attributes)
End for
$counts:=New collection
For each ($name;$names)
$count:=New collection
Case of
: ($name="preemptive")
$count.push($name)
$count.push($props.countValues("capable";$name))
$count.push($props.countValues("indifferent";$name))
$count.push($props.countValues("incapable";$name))
$counts.push($count.join("\t";ck ignore null or empty))
else
$count.push($name)
$count.push($props.countValues(True;$name))
$count.push($props.length-($count[$count.length-1]))
$counts.push($count.join("\t";ck ignore null or empty))
End case
End for each
SET TEXT TO PASTEBOARD($counts.join("\r";ck ignore null or empty))