Bugzilla – Attachment 2 Details for
Bug 12
Better tracing output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch against previous one, add indenting to output
indent.diff (text/plain), 2.87 KB, created by
Sven Gothel
on 2003-06-21 15:47:00 CEST
(
hide
)
Description:
Patch against previous one, add indenting to output
Filename:
MIME Type:
Creator:
Sven Gothel
Created:
2003-06-21 15:47:00 CEST
Size:
2.87 KB
patch
obsolete
>--- orig/BuildComposablePipeline.java 2003-06-21 18:56:35.000000000 +0200 >+++ new/BuildComposablePipeline.java 2003-06-22 00:40:05.000000000 +0200 >@@ -466,6 +466,7 @@ > protected void postMethodEmissionHook(PrintWriter output) > { > output.println("private PrintStream " + getOutputStreamName() + ";"); >+ output.println("private int indent = 0;"); > output.println("protected String dumpArray(Object obj)"); > output.println("{"); > output.println(" StringBuffer sb = new StringBuffer(\"[\");"); >@@ -481,11 +482,24 @@ > output.println(" sb.append(']');"); > output.println(" return sb.toString();"); > output.println("}"); >- >+ output.println("protected void print(String str)"); >+ output.println("{"); >+ output.println(" "+getOutputStreamName()+".print(str);"); >+ output.println("}"); >+ output.println("protected void println(String str)"); >+ output.println("{"); >+ output.println(" "+getOutputStreamName()+".println(str);"); >+ output.println("}"); >+ output.println("protected void printIndent()"); >+ output.println("{"); >+ output.println(" for( int i =0; i < indent; i++) {"+getOutputStreamName()+".print(' ');}"); >+ output.println("}"); > } > > > >+ >+ > protected void emitClassDocComment(PrintWriter output) > { > output.println("/** <P> Composable pipline which wraps an underlying {@link GL} implementation,"); >@@ -501,8 +515,17 @@ > protected void preDownstreamCallHook(PrintWriter output, Method m) > { > Class[] params = m.getParameterTypes(); >+ if ( m.getName().equals("glEnd") || m.getName().equals("glEndList")) >+ { >+ output.println("indent-=2;"); >+ output.println(" printIndent();"); >+ } >+ else >+ { >+ output.println("printIndent();"); >+ } > >- output.print(getOutputStreamName() + ".print(\"" + m.getName() + "(\""); >+ output.print(" print(\"" + m.getName() + "(\""); > for ( int i =0; i < params.length; i++ ) > { > if ( params[i].isArray() ) >@@ -514,6 +537,10 @@ > } > output.println("+\")\");"); > output.print(" "); >+ if ( m.getName().equals("glBegin")|| m.getName().equals("glNewList")) { >+ output.println("indent+=2;"); >+ output.print(" "); >+ } > } > > protected void postDownstreamCallHook(PrintWriter output, Method m) >@@ -521,11 +548,11 @@ > Class ret = m.getReturnType(); > if ( ret != Void.TYPE ) > { >- output.println(" "+getOutputStreamName() + ".println(\" = \"+_res);"); >+ output.println(" println(\" = \"+_res);"); > } > else > { >- output.println(" "+getOutputStreamName() + ".println();"); >+ output.println(" println(\"\");"); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 12
:
1
| 2