jTracer  1.03
Stack trace visualization tool
void org.libcsdbg.jtracer.TracePane.append ( String  trace)

Append a trace using the syntax highlighter.

Parameters
[in]tracethe complete trace text

Definition at line 132 of file TracePane.java.

Referenced by org.libcsdbg.jtracer.TracePane.append(), and org.libcsdbg.jtracer.TracePane.appendln().

133  {
134  /* Delimiters */
135  String expr = "[\\s\\{\\}\\(\\)\\*&,:<>]+";
136 
137  Pattern regexp = Pattern.compile(expr);
138  Matcher parser = regexp.matcher(trace);
139 
140  /* Parse the trace and append it word-by-word doing syntax highlighting */
141  int offset = 0;
142  String prev = null;
143  while (parser.find()) {
144  String grp = parser.group();
145  String token = trace.substring(offset, parser.start());
146  offset = parser.end();
147 
148  append(token, prev, grp);
149  append(grp, "delimiter");
150  prev = grp;
151  }
152 
153  if (offset < trace.length() - 1)
154  append(trace.substring(offset), prev, null);
155  }
void append(String trace)
Append a trace using the syntax highlighter.
Definition: TracePane.java:132

+ Here is the caller graph for this function: