1
1
#import ipdb
2
+ import textwrap
2
3
from . import rdf_utils
3
4
from . import fstriplestore
4
5
from . import wb_stack
5
6
from . import obj_tracking
6
7
from . import obj_utils
7
- from . import rdf_utils
8
8
9
9
method_counter = 0 # NB: should be better way to count method calls
10
10
class MethodCallRDF (rdf_utils .RDFRep ):
@@ -29,24 +29,28 @@ def dump_rdf_method_call_in(self):
29
29
ts .dump_triple (self .uri , "<method-stack-trace>" , '"' + wb_stack .wb_stack .to_string () + '"' )
30
30
31
31
method_display_args = []
32
+ more_args = False
32
33
for p_name , p in self .front .args_l :
33
34
if isinstance (p , obj_utils .ObjState ):
34
- method_display_args .append ("<b>" + p_name + "</b>" )
35
+ method_display_args .append (p_name )
35
36
else :
36
- method_display_args .append (
37
- p_name
38
- + " = "
39
- + str (p ).replace ("<" , "<" ).replace (">" , ">" )
40
- )
37
+ more_args = True
38
+ if 0 :
39
+ method_display_args .append (
40
+ p_name
41
+ + " = "
42
+ + str (p ).replace ("<" , "<" ).replace (">" , ">" )
43
+ )
44
+
45
+ if more_args :
46
+ method_display_args .append ("..." )
41
47
42
- method_display_s = fstriplestore .to_base64 (
43
- "<i>"
44
- + self .front .method_name
45
- + "</i>"
46
- + " ("
47
- + ", " .join (method_display_args )
48
- + ")"
49
- )
48
+ method_display_s = "" .join ([self .front .method_name ,
49
+ "(" ,
50
+ ", " .join (method_display_args ),
51
+ ")" ])
52
+ method_display_s = "<br/>" .join (textwrap .wrap (method_display_s , width = 35 ))
53
+ method_display_s = fstriplestore .to_base64 (method_display_s )
50
54
ts .dump_triple (self .uri , "<method-display>" , '"' + method_display_s + '"' )
51
55
52
56
# ipdb.set_trace()
0 commit comments