From: <ha...@us...> - 2006-10-06 16:31:31
|
Revision: 5841 http://svn.sourceforge.net/jmol/?rev=5841&view=rev Author: hansonr Date: 2006-10-06 09:31:25 -0700 (Fri, 06 Oct 2006) Log Message: ----------- history/error bug fix for application console Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-06 16:25:08 UTC (rev 5840) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-06 16:31:25 UTC (rev 5841) @@ -123,6 +123,7 @@ } public void sendConsoleMessage(String strStatus) { + System.out.println("send console iserror="+isError+" " +strStatus); if (strStatus == null) { console.clearContent(); console.outputStatus(""); @@ -131,11 +132,12 @@ setError(true); } else if (!isError) { console.outputStatus(strStatus); + setError(false); } - setError(false); } public void notifyScriptTermination(String strMsg, int msWalltime) { + System.out.println("send notifyterm iserror="+isError+" " +strMsg); if (strMsg != null && strMsg.indexOf("ERROR") >= 0) { console.outputError(strMsg); } @@ -370,6 +372,7 @@ */ void recallCommand(boolean up) { String cmd = viewer.getSetHistory(up ? -1 : 1); + System.out.println(viewer.getSetHistory(Integer.MAX_VALUE)+"\nthis command:" + cmd); if (cmd == null) return; try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-06 18:38:09
|
Revision: 5842 http://svn.sourceforge.net/jmol/?rev=5842&view=rev Author: hansonr Date: 2006-10-06 11:34:33 -0700 (Fri, 06 Oct 2006) Log Message: ----------- debug comments out Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-06 16:31:25 UTC (rev 5841) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-06 18:34:33 UTC (rev 5842) @@ -123,7 +123,6 @@ } public void sendConsoleMessage(String strStatus) { - System.out.println("send console iserror="+isError+" " +strStatus); if (strStatus == null) { console.clearContent(); console.outputStatus(""); @@ -137,7 +136,6 @@ } public void notifyScriptTermination(String strMsg, int msWalltime) { - System.out.println("send notifyterm iserror="+isError+" " +strMsg); if (strMsg != null && strMsg.indexOf("ERROR") >= 0) { console.outputError(strMsg); } @@ -372,7 +370,6 @@ */ void recallCommand(boolean up) { String cmd = viewer.getSetHistory(up ? -1 : 1); - System.out.println(viewer.getSetHistory(Integer.MAX_VALUE)+"\nthis command:" + cmd); if (cmd == null) return; try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-10 02:50:51
|
Revision: 5888 http://svn.sourceforge.net/jmol/?rev=5888&view=rev Author: hansonr Date: 2006-10-09 19:50:46 -0700 (Mon, 09 Oct 2006) Log Message: ----------- minor fix for application console -- still not quite perfect, but serviceable Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-10 02:20:20 UTC (rev 5887) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-10 02:50:46 UTC (rev 5888) @@ -118,8 +118,8 @@ boolean isError = false; void setError(boolean TF) { isError = TF; - if (isError) - console.recallCommand(true); + //if (isError) + //console.recallCommand(true); } public void sendConsoleMessage(String strStatus) { @@ -128,10 +128,9 @@ console.outputStatus(""); } else if (strStatus.indexOf("ERROR:") >= 0) { console.outputError(strStatus); - setError(true); + isError = true; } else if (!isError) { console.outputStatus(strStatus); - setError(false); } } @@ -370,8 +369,11 @@ */ void recallCommand(boolean up) { String cmd = viewer.getSetHistory(up ? -1 : 1); - if (cmd == null) + if (cmd == null) { + appendNewline(); + setPrompt(); return; + } try { if (cmd.endsWith(CommandHistory.ERROR_FLAG)) { cmd = cmd.substring(0, cmd.indexOf(CommandHistory.ERROR_FLAG)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2006-10-10 02:54:22
|
Revision: 5889 http://svn.sourceforge.net/jmol/?rev=5889&view=rev Author: hansonr Date: 2006-10-09 19:54:14 -0700 (Mon, 09 Oct 2006) Log Message: ----------- Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-10 02:50:46 UTC (rev 5888) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2006-10-10 02:54:14 UTC (rev 5889) @@ -370,8 +370,11 @@ void recallCommand(boolean up) { String cmd = viewer.getSetHistory(up ? -1 : 1); if (cmd == null) { - appendNewline(); - setPrompt(); + String str = getText(); + if (str.lastIndexOf("$") != str.length() - 2) { + appendNewline(); + setPrompt(); + } return; } try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2007-02-26 21:30:51
|
Revision: 6945 http://svn.sourceforge.net/jmol/?rev=6945&view=rev Author: hansonr Date: 2007-02-26 13:30:47 -0800 (Mon, 26 Feb 2007) Log Message: ----------- Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-02-26 21:26:20 UTC (rev 6944) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-02-26 21:30:47 UTC (rev 6945) @@ -221,6 +221,7 @@ if (state == null) return; state += CommandHistory.NOHISTORYATALL_FLAG; + setError(false); viewer.evalStringQuiet(state); undoPointer = ptr; //for (int i =0; i < MAXUNDO; i++) @@ -246,7 +247,6 @@ void executeCommand(String strCommand) { boolean doWait; - setError(false); console.appendNewline(); console.setPrompt(); if (strCommand.length() == 0) { @@ -254,9 +254,10 @@ return; } - if (strCommand.charAt(0) != '!') { + if (strCommand.charAt(0) != '!' && !isError) { undoSave(); } + setError(false); undoSaved = false; String strErrorMessage = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2007-02-28 07:06:24
|
Revision: 6992 http://svn.sourceforge.net/jmol/?rev=6992&view=rev Author: hansonr Date: 2007-02-27 23:06:23 -0800 (Tue, 27 Feb 2007) Log Message: ----------- wording Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-02-28 06:20:31 UTC (rev 6991) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-02-28 07:06:23 UTC (rev 6992) @@ -291,7 +291,7 @@ boolean isScriptExecuting = viewer.isScriptExecuting(); strErrorMessage = ""; if (viewer.checkHalt(strCommand)) - strErrorMessage = (isScriptExecuting ? "string execution halted with " + strErrorMessage = (isScriptExecuting ? "script execution halted with " + strCommand : "no script was executing"); //the problem is that scriptCheck is synchronized, so these might get backed up. if (strErrorMessage.length() > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2007-03-22 13:34:54
|
Revision: 7202 http://svn.sourceforge.net/jmol/?rev=7202&view=rev Author: hansonr Date: 2007-03-22 06:34:53 -0700 (Thu, 22 Mar 2007) Log Message: ----------- app WAIT changed to WAITTEST Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-03-22 13:33:31 UTC (rev 7201) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-03-22 13:34:53 UTC (rev 7202) @@ -261,7 +261,7 @@ undoSaved = false; String strErrorMessage = null; - doWait = (strCommand.indexOf("WAIT ") == 0); + doWait = (strCommand.indexOf("WAITTEST ") == 0); if (doWait) { //for testing, mainly // demonstrates using the statusManager system. runButton.setEnabled(false); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2007-03-22 13:35:35
|
Revision: 7203 http://svn.sourceforge.net/jmol/?rev=7203&view=rev Author: hansonr Date: 2007-03-22 06:35:34 -0700 (Thu, 22 Mar 2007) Log Message: ----------- Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-03-22 13:34:53 UTC (rev 7202) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-03-22 13:35:34 UTC (rev 7203) @@ -263,7 +263,7 @@ String strErrorMessage = null; doWait = (strCommand.indexOf("WAITTEST ") == 0); if (doWait) { //for testing, mainly - // demonstrates using the statusManager system. + // demonstrates using the statusManager system; probably hangs application. runButton.setEnabled(false); haltButton.setEnabled(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2007-05-07 03:12:41
|
Revision: 7609 http://svn.sourceforge.net/jmol/?rev=7609&view=rev Author: hansonr Date: 2007-05-06 20:12:40 -0700 (Sun, 06 May 2007) Log Message: ----------- 11.1.33 better error message in app Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-05-07 03:11:31 UTC (rev 7608) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2007-05-07 03:12:40 UTC (rev 7609) @@ -174,7 +174,7 @@ try { executeCommand(strCommand); } catch (Exception ie) { - Logger.debug("execution command interrupted!"+ie); + Logger.error("execution command interrupted!",ie); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-04-28 08:22:47
|
Revision: 9333 http://jmol.svn.sourceforge.net/jmol/?rev=9333&view=rev Author: hansonr Date: 2008-04-28 01:22:46 -0700 (Mon, 28 Apr 2008) Log Message: ----------- 11.5.32 VERSION -- load FILTER # application only: command undo disabled automatically if saving takes more than one second # flag is "set undo TRUE/FALSE" # Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2008-04-28 08:22:05 UTC (rev 9332) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2008-04-28 08:22:46 UTC (rev 9333) @@ -234,6 +234,8 @@ void undoRedo(boolean isRedo) { // pointer is always left at the undo slot when a command is given // redo at CURRENT pointer position + if (!viewer.getBooleanProperty("undo")) + return; if (!undoSaved) undoSave(); String state = undoStack[undoPointer]; @@ -255,6 +257,8 @@ } void undoSave() { + if (!viewer.getBooleanProperty("undo")) + return; //shift stack if full undoPointer++; if (undoPointer == MAXUNDO) { @@ -265,9 +269,16 @@ //delete redo items, since they will no longer be valid for (int i = undoPointer; i < MAXUNDO; i++) undoStack[i] = null; - + Logger.startTimer(); undoStack[undoPointer] = (String) viewer.getProperty("readable", "stateInfo", null); + if (Logger.checkTimer(null) > 1000) { + viewer.setBooleanProperty("undo", false); + Logger.info("command processing slow; undo disabled"); + for (int i = 0; i < MAXUNDO; i++) + undoStack[i] = ""; + undoPointer = 0; + } undoSaved = true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ha...@us...> - 2008-05-04 13:08:55
|
Revision: 9360 http://jmol.svn.sourceforge.net/jmol/?rev=9360&view=rev Author: hansonr Date: 2008-05-04 06:08:53 -0700 (Sun, 04 May 2008) Log Message: ----------- version=11.5.35_dev load FILTER; application UNDO/REDO # bug fix: load FILTER not saved in state # bug fix: application -- undo/redo buttons not disabling # new feature: ZAP clears undo stack Modified Paths: -------------- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java Modified: trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java =================================================================== --- trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2008-05-04 13:08:18 UTC (rev 9359) +++ trunk/Jmol/src/org/openscience/jmol/app/ScriptWindow.java 2008-05-04 13:08:53 UTC (rev 9360) @@ -267,8 +267,8 @@ viewer.evalStringQuiet(state); undoPointer = ptr; } - for (int i =0; i < 10; i++) - System.out.println("stack: " + undoPointer + " / " + i + " " +(undoStack[i] == null ? 0 : undoStack[i].length())); + //for (int i =0; i < 10; i++) + //System.out.println("stack: " + undoPointer + " / " + i + " " +(undoStack[i] == null ? 0 : undoStack[i].length())); undoSetEnabled(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |