changeset 60:66be6a990713

new eclipsetools target, fix of new exception stacktrace info.
author Frank Benoit <benoit@tionex.de>
date Mon, 30 Mar 2009 14:46:59 +0200
parents 7e0547d89731
children 5ce9278ca82c
files base/src/java/lang/exceptions.d org.eclipse.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.d rakefile
diffstat 3 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/base/src/java/lang/exceptions.d	Mon Mar 30 12:09:37 2009 +0200
+++ b/base/src/java/lang/exceptions.d	Mon Mar 30 14:46:59 2009 +0200
@@ -144,8 +144,8 @@
     while( exception !is null ){
         dg( exception.file, exception.line, "Exception in {}({}): {}", exception.file, exception.line, exception.msg );
         if( exception.info !is null ){
-            foreach( msg; exception.info ){
-                dg( exception.file, exception.line, "trc {}", msg );
+            foreach( frame; exception.info ){
+                dg( exception.file, exception.line, "trc {} {}", frame.file, frame.line );
             }
         }
         exception = exception.next;
@@ -156,9 +156,9 @@
     auto e = new Exception( null );
     int idx = 0;
     const start = 3;
-    foreach( msg; e.info ){
+    foreach( frame; e.info ){
         if( idx >= start && idx < start+deepth ) {
-            getDwtLogger().trace( __FILE__, __LINE__, "{}: {}", prefix, msg );
+            getDwtLogger().trace( __FILE__, __LINE__, "{} {}: {}", prefix, frame.file, frame.line );
         }
         idx++;
     }
--- a/org.eclipse.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.d	Mon Mar 30 12:09:37 2009 +0200
+++ b/org.eclipse.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.d	Mon Mar 30 14:46:59 2009 +0200
@@ -233,8 +233,8 @@
     if (index is -1) return;
     if (check.getSelection ()) {
         char[] txt = "Stacktrace info (if missing you need stacktrace support for your program):\n";
-        foreach( line; errors[index].info ){
-            txt ~= line ~ \n;
+        foreach( frame; errors[index].info ){
+            txt ~= Format("{}:{}\n", frame.file, frame.line );
         }
         text.setText (txt);
         text.setVisible (true);
--- a/rakefile	Mon Mar 30 12:09:37 2009 +0200
+++ b/rakefile	Mon Mar 30 14:46:59 2009 +0200
@@ -323,6 +323,11 @@
     buildTree( "org.eclipse.jface", "src", "res" )
 end
 
+desc "Build Eclipse Tools"
+task :eclipsetools do
+    buildTree( "org.eclipse.tools", "Sleak", "res" )
+end
+
 desc "Build JFace.Text"
 task :jfacetext do
     buildTree( "org.eclipse.text", "src", "res" )