### Eclipse Workspace Patch 1.0 #P org.eclipse.swt.tools Index: Sleak/org/eclipse/swt/tools/internal/Sleak.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt.tools/Sleak/org/eclipse/swt/tools/internal/Sleak.java,v retrieving revision 1.8 diff -u -r1.8 Sleak.java --- Sleak/org/eclipse/swt/tools/internal/Sleak.java 5 Sep 2008 14:02:30 -0000 1.8 +++ Sleak/org/eclipse/swt/tools/internal/Sleak.java 11 Mar 2009 11:38:52 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 IBM Corporation and others. + * Copyright (c) 2007, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,6 +13,7 @@ import org.eclipse.swt.*; import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; + import java.io.*; /** @@ -27,7 +28,7 @@ Shell shell; List list; Canvas canvas; - Button start, stop, check; + Button start, stop, check, print; Text text; Label label; @@ -99,6 +100,14 @@ refreshDifference (); } }); + print = new Button (shell, SWT.PUSH); + print.setText ("Print"); + print.setToolTipText ("Prints stack traces to standard output"); + print.addListener (SWT.Selection, new Listener () { + public void handleEvent(Event event) { + exportDifference (); + } + }); label = new Label (shell, SWT.BORDER); label.setText ("0 object(s)"); shell.addListener (SWT.Resize, new Listener () { @@ -185,6 +194,14 @@ layout (); } +void exportDifference () { + for (int i=0; i