Commits

Anonymous committed a2c2b68

Fixing load project action. Not done yet.

  • Participants
  • Parent commits 8fc0909

Comments (0)

Files changed (5)

src/org/lispdev/repl/AbstractRepl.java

       }
     }
     states.push(s);
+    Trace.DEBUG.trace("Repl is in state: " + String.valueOf(s));
     s.activate();
     applyState(s);
   }
   private void popState()
   {
     IState s = states.pop();
+    Trace.DEBUG.trace("Repl is in state: " + String.valueOf(s));
     if( s instanceof DebugState )
     {
       ((DebugState)s).deactivate();
   {
     if( states.isEmpty() )
     { // Shouldn't ever happen, but it has
-      states.push(new EvalState(this));
+      IState s = new EvalState(this);
+      states.push(s);
+      Trace.DEBUG.trace("Repl is in state: " + String.valueOf(s));
     }
     return states.peek();
 

src/org/lispdev/repl/DebugState.java

     return false;
   }
 
+  @Override
+  public String toString()
+  {
+    return "DebugState:"+ String.valueOf(debugInfo);
+  }
 }

src/org/lispdev/repl/EvalState.java

 package org.lispdev.repl;
 
+import org.lispdev.log.Log;
+import org.lispdev.log.Trace;
+
 public class EvalState implements IState
 {
   private final AbstractRepl repl;
   @Override
   public boolean handle(String command)
   {
-    System.out.println("--EvalStateHandle:"+command);
+    Trace.DEBUG.trace("EvalStateHandle:"+command);
     repl.saveCommandToHistory(command);
     if( !repl.swank.isConnected() )
     {
       int i1 = cleanCommand.indexOf(')');
       if( i0 < 0 || i1 < 0 )
       {
-        System.out.println("Bad format of in-package: " + cleanCommand);
+        Log.logWarning("Bad format of in-package: " + cleanCommand);
       }
       else
       {
     return false;
   }
 
+  @Override
+  public String toString()
+  {
+    return "EvalState";
+  }
 }

src/org/lispdev/repl/IState.java

    * @param command to be evaluated
    * @return true if REPL gets to the previous state after handling
    */
-  public boolean handle(String command);
+  boolean handle(String command);
 
-  public void activate();
+  void activate();
 }

src/org/lispdev/repl/ReadState.java

     return true;
   }
 
+  @Override
+  public String toString()
+  {
+    return "ReadState";
+  }
 }