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

Append a single trace token.

Parameters
[in]tokenthe token
[in]prevthe previous (left) delimiter
[in]nextthe next (right) delimiter

Definition at line 167 of file TracePane.java.

References org.libcsdbg.jtracer.TracePane.append(), and org.libcsdbg.jtracer.Highlighter.lookup().

168  {
169  Highlighter h = new Highlighter();
170  String num = "(0x)?\\p{XDigit}+$";
171 
172  /* Highlight decimal and hex numbers */
173  if (token.matches(num))
174  append(token, "number");
175 
176  /* Highlight file names */
177  else if (h.lookup(token, "extension", true))
178  append(token, "file");
179 
180  /* Highlight C++ integral types */
181  else if (h.lookup(token, "type", false))
182  append(token, "type");
183 
184  /* Highlight C++ keywords (apart those for integral types) */
185  else if (h.lookup(token, "keyword", false))
186  append(token, "keyword");
187 
188  /* Highlight C++ namespaces and classes */
189  else if (next.equals("::"))
190  append(token, "scope");
191 
192  /* Highlight function names */
193  else if (next.equals("(") || next.equals("<") || next.startsWith("\n"))
194  append(token, "function");
195 
196  else
197  append(token, "plain");
198  }
void append(String trace)
Append a trace using the syntax highlighter.
Definition: TracePane.java:132

+ Here is the call graph for this function: