Commits

sk  committed 30b86e8

Trying to fix inspecting class. However so far it is not very reliable.

  • Participants
  • Parent commits 9539919

Comments (0)

Files changed (1)

File src/org/lispdev/swank/LispImplementation.java

     }
   }
 
+  /*
+  -->(:emacs-rex (swank:init-inspector "(swank:get-repl-result #10r1)" ) nil :repl-thread 3)
+  <--(:return (:ok (:title "#<(SIMPLE-ARRAY CHARACTER (4)) {B05859F}>" :id 8 :content (("Dimensions" ": " (:value "(4)" 0) "
+  " "Element type" ": " (:value "CHARACTER" 1) "
+  " "Total size" ": " (:value "4" 2) "
+  " "Adjustable" ": " (:value "NIL" 3) "
+  " "Contents:" "
+  " "0" ": " (:value "#\\t" 4) "
+  " "1" ": " (:value "#\\h" 5) "
+  " "2" ": " (:value "#\\i" 6) "
+  " "3" ": " (:value "#\\s" 7) "
+  ") 34 0 34))) 3)
+
+
+  <--(:presentation-start 3 nil)
+  <--(:write-string "#<SYSTEM NEW-LISP2 {2479B229}>")
+  <--(:presentation-end 3 nil)
+  -->(:emacs-rex (swank:init-inspector "(swank:get-repl-result #10r3)" ) nil :repl-thread 7)
+  <--(:return (:ok (:title "#<ASDF:SYSTEM {2479B229}>" :id 30 :content
+          (("Class: " (:value "#<STANDARD-CLASS ASDF:SYSTEM>" 0) "
+  " "--------------------" "
+  " "All Slots:" "
+  " (:value "AUTHOR" 1) "                 " " = " "#<unbound>" " " (:action "[set value]" 0) "
+  " (:value "COMPONENTS" 2) "             " " = " (:value "(#<ASDF:CL-SOURCE-FILE \"defpackage\" {24B56949}> #<ASDF:CL-SOURCE-FILE \"main\" {24B56EA1}>)" 3) " " (:action "[set value]" 1) " " (:action "[make unbound]" 2) "
+  " (:value "DEFAULT-COMPONENT-CLASS" 4) "" " = " (:value "NIL" 5) " " (:action "[set value]" 3) " " (:action "[make unbound]" 4) "
+  " (:value "DESCRIPTION" 6) "            " " = " "#<unbound>" " " (:action "[set value]" 5) "
+  " (:value "DO-FIRST" 7) "               " " = " (:value "((ASDF:COMPILE-OP (ASDF:LOAD-OP)))" 8) " " (:action "[set value]" 6) " " (:action "[make unbound]" 7) "
+  " (:value "IF-COMPONENT-DEP-FAILS" 9) " " " = " (:value ":FAIL" 10) " " (:action "[set value]" 8) " " (:action "[make unbound]" 9) "
+  " (:value "IN-ORDER-TO" 11) "            " " = " (:value "NIL" 12) " " (:action "[set value]" 10) " " (:action "[make unbound]" 11) "
+  " (:value "INLINE-METHODS" 13) "         " " = " (:value "NIL" 14) " " (:action "[set value]" 12) " " (:action "[make unbound]" 13) "
+  " (:value "LICENCE" 15) "                " " = " "#<unbound>" " " (:action "[set value]" 14) "
+  " (:value "LONG-DESCRIPTION" 16) "       " " = " "#<unbound>" " " (:action "[set value]" 15) "
+  " (:value "MAINTAINER" 17) "             " " = " "#<unbound>" " " (:action "[set value]" 16) "
+  " (:value "NAME" 18) "                   " " = " (:value "\"new-lisp2\"" 19) " " (:action "[set value]" 17) " " (:action "[make unbound]" 18) "
+  " (:value "OPERATION-TIMES" 20) "        " " = " (:value "#<HASH-TABLE :TEST EQL :COUNT 2 {2479B469}>" 21) " " (:action "[set value]" 19) " " (:action "[make unbound]" 20) "
+  " (:value "PARENT" 22) "                 " " = " (:value "NIL" 23) " " (:action "[set value]" 21) " " (:action "[make unbound]" 22) "
+  " (:value "PROPERTIES" 24) "             " " = " (:value "NIL" 25) " " (:action "[set value]" 23) " " (:action "[make unbound]" 24) "
+  " (:value "RELATIVE-PATHNAME" 26) "      " " = " (:value "#P\"D:\\\\projects\\\\lispdev\\\\runtime-lispdev\\\\new-lisp2\\\\\"" 27) " " (:action "[set value]" 25) " " (:action "[make unbound]" 26) "
+  " (:value "VERSION" 28) "                " " = " (:value "\"0.1\"" 29) " " (:action "[set value]" 27) " " (:action "[make unbound]" 28) "
+  ") 150 0 150))) 7)
+
+   */
   /**
    * @param target
    * @param parent variable containing other variables described in n
     InspectInfo res = new InspectInfo(n.getf(":title").value,
         n.getf(":title").value);
     LispNode c = n.getf(":content").get(0);
+    if( "Class: ".equalsIgnoreCase(c.get(0).value) )
+    {
+      try
+      {
+        res.content.add(new LispVariable(target,
+            (LispValue)parent.getValue(),"Class",
+            c.get(1).getf(":value").value,
+            new InspectNthPart(target, c.get(1).get(2).value)));
+      }
+      catch(DebugException e)
+      {
+        Log.logException("", e);
+      }
+      for( int i = 2; i < c.getParamsCount(); ++i )
+      {
+        if( c.get(i).value.equals(" = ") )
+        {
+          try
+          {
+            res.content.add(new LispVariable(target,
+                (LispValue)parent.getValue(),c.get(i-2).getf(":value").value,
+                (c.get(i+1).isString ? c.get(i+1).value
+                                     : c.get(i+1).getf(":value").value),
+                new InspectNthPart(target, c.get(i+1).get(2).value)));
+          }
+          catch(DebugException e)
+          {
+            Log.logException("", e);
+          }
+        }
+      }
+      return res;
+    }
+
     for(int j = 1; j < c.getParamsCount(); ++j )
     {
       if( c.get(j).value.startsWith(":") )
         }
         catch(DebugException e)
         {
-          e.printStackTrace();
+          Log.logException("", e);
         }
       }
     }
   " "3" ": " (:value "#\\s" 7) "
   ") 34 0 34))) 3)
 
+
+  <--(:presentation-start 3 nil)
+  <--(:write-string "#<SYSTEM NEW-LISP2 {2479B229}>")
+  <--(:presentation-end 3 nil)
+  -->(:emacs-rex (swank:init-inspector "(swank:get-repl-result #10r3)" ) nil :repl-thread 7)
+  <--(:return (:ok (:title "#<ASDF:SYSTEM {2479B229}>" :id 30 :content (("Class: " (:value "#<STANDARD-CLASS ASDF:SYSTEM>" 0) "
+  " "--------------------" "
+  " "All Slots:" "
+  " (:value "AUTHOR" 1) "                 " " = " "#<unbound>" " " (:action "[set value]" 0) "
+  " (:value "COMPONENTS" 2) "             " " = " (:value "(#<ASDF:CL-SOURCE-FILE \"defpackage\" {24B56949}> #<ASDF:CL-SOURCE-FILE \"main\" {24B56EA1}>)" 3) " " (:action "[set value]" 1) " " (:action "[make unbound]" 2) "
+  " (:value "DEFAULT-COMPONENT-CLASS" 4) "" " = " (:value "NIL" 5) " " (:action "[set value]" 3) " " (:action "[make unbound]" 4) "
+  " (:value "DESCRIPTION" 6) "            " " = " "#<unbound>" " " (:action "[set value]" 5) "
+  " (:value "DO-FIRST" 7) "               " " = " (:value "((ASDF:COMPILE-OP (ASDF:LOAD-OP)))" 8) " " (:action "[set value]" 6) " " (:action "[make unbound]" 7) "
+  " (:value "IF-COMPONENT-DEP-FAILS" 9) " " " = " (:value ":FAIL" 10) " " (:action "[set value]" 8) " " (:action "[make unbound]" 9) "
+  " (:value "IN-ORDER-TO" 11) "            " " = " (:value "NIL" 12) " " (:action "[set value]" 10) " " (:action "[make unbound]" 11) "
+  " (:value "INLINE-METHODS" 13) "         " " = " (:value "NIL" 14) " " (:action "[set value]" 12) " " (:action "[make unbound]" 13) "
+  " (:value "LICENCE" 15) "                " " = " "#<unbound>" " " (:action "[set value]" 14) "
+  " (:value "LONG-DESCRIPTION" 16) "       " " = " "#<unbound>" " " (:action "[set value]" 15) "
+  " (:value "MAINTAINER" 17) "             " " = " "#<unbound>" " " (:action "[set value]" 16) "
+  " (:value "NAME" 18) "                   " " = " (:value "\"new-lisp2\"" 19) " " (:action "[set value]" 17) " " (:action "[make unbound]" 18) "
+  " (:value "OPERATION-TIMES" 20) "        " " = " (:value "#<HASH-TABLE :TEST EQL :COUNT 2 {2479B469}>" 21) " " (:action "[set value]" 19) " " (:action "[make unbound]" 20) "
+  " (:value "PARENT" 22) "                 " " = " (:value "NIL" 23) " " (:action "[set value]" 21) " " (:action "[make unbound]" 22) "
+  " (:value "PROPERTIES" 24) "             " " = " (:value "NIL" 25) " " (:action "[set value]" 23) " " (:action "[make unbound]" 24) "
+  " (:value "RELATIVE-PATHNAME" 26) "      " " = " (:value "#P\"D:\\\\projects\\\\lispdev\\\\runtime-lispdev\\\\new-lisp2\\\\\"" 27) " " (:action "[set value]" 25) " " (:action "[make unbound]" 26) "
+  " (:value "VERSION" 28) "                " " = " (:value "\"0.1\"" 29) " " (:action "[set value]" 27) " " (:action "[make unbound]" 28) "
+  ") 150 0 150))) 7)
+
    */
   public LispVariable inspectReplResult(final LispDebugTarget target,
       final String name, final IPartitionData data)