From: Julio G. <ju...@us...> - 2004-10-01 16:42:03
|
Update of /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/services/trace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13526/src/org/smartfrog/services/trace Modified Files: SFTraceDisplay.java components.sf Log Message: Step through lifecycle deployment :-) Index: SFTraceDisplay.java =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/services/trace/SFTraceDisplay.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SFTraceDisplay.java 15 Apr 2004 16:23:33 -0000 1.3 --- SFTraceDisplay.java 1 Oct 2004 16:41:41 -0000 1.4 *************** *** 37,40 **** --- 37,43 ---- import org.smartfrog.sfcore.common.Logger; + import java.awt.Component; + import javax.swing.JOptionPane; + /** * Implements the display for the trace component. *************** *** 100,103 **** --- 103,109 ---- display.mainToolBar.add(this.refresh); display.showToolbar(true); + boolean stepTraceBoolean = false; + stepTraceBoolean = sfResolve("stepTrace",stepTraceBoolean, false); + if (stepTraceBoolean) stepTrace = 0; else stepTrace =1; //end panelTree example } *************** *** 139,142 **** --- 145,149 ---- // We print in the output ((TraceTreePanel) panelTree).add(msg); + if (stepTrace == 0) getUserConfirmation(this.display, msg); } *************** *** 184,186 **** --- 191,216 ---- //SFTraceDisplay SFTraceDisplay1 = new SFTraceDisplay(); } + + static int stepTrace = 0; + // static Object[] options = {"NEXT", "Finish"}; + /** + * Asks the user confirmation + * + *@param cp Component + *@param message Message + *@return The user confirmation value + */ + public static boolean getUserConfirmation(Component cp, String message) { + message=message.replace(',','\n'); + stepTrace = JOptionPane.showConfirmDialog(cp, message, + "Please confirm...", JOptionPane.YES_NO_OPTION); + + if (stepTrace == 0) { + return true; + } else { + return false; + } + } + + } Index: components.sf =================================================================== RCS file: /cvsroot/smartfrog/core/smartfrog/src/org/smartfrog/services/trace/components.sf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** components.sf 8 Sep 2004 14:42:27 -0000 1.2 --- components.sf 1 Oct 2004 16:41:41 -0000 1.3 *************** *** 34,38 **** // set to false if you want to switch date, process and host displays off the messages verbose true; ! // future improvement: output per Hook, no need for now. //outputMsg LAZY PARENT:display; // for printing Trace messages! --- 34,38 ---- // set to false if you want to switch date, process and host displays off the messages verbose true; ! // future improvement: output per Hook, no need for now. //outputMsg LAZY PARENT:display; // for printing Trace messages! *************** *** 71,74 **** --- 71,75 ---- redirectStd false; //Redirect System.out,.in,.err screenEditable false; //Editable? + stepTrace true; // Should ask for confirmation before stepping through? } // end TraceDisplay |