Commits

Paul Nathan  committed 801345e

Add TODOs for problem areas of the code.

  • Participants
  • Parent commits 2689331

Comments (0)

Files changed (21)

File HISTORICAL.md

   lisp-unit testing framework", since it is not included with lispdev
   at this moment.
 * Once the project is created, select it and from context menu select
-  "Load In -> sbcl". This should start lisp, load swank, connect
+"Load In -> sbcl". This should start lisp, load swank, connect
   lispdev to swank, start REPL, and, finally, load the project.
 
 Cusp notes by tj

File org.lispdev.console/src/org/lispdev/console/ConsoleInputTrigger.java

 
     if( pd == null )
     {
+       // TODO: Strip this all out. Or not.
       //repl.getTextWidget().
       //repl.getTextWidget().getCaretOffset()
       //repl.getTextWidget().print(printer, options)

File org.lispdev.console/src/org/lispdev/console/LispConsoleViewer.java

 import org.lispdev.log.Log;
 import org.lispdev.log.Trace;
 
+//TODO: Cleanse the documentation
+//TODO: Understand why text selection is implemented by hand here.
 /**
  * <p>Console-like viewer with facilities to implement lisp repl similar to
  * slime-repl.</p>

File org.lispdev.console/src/org/lispdev/console/PartitionData.java

  * @author sk
  *
  */
+
+//TODO: determine if we need a partition interface...
 public class PartitionData implements IPartitionData
 {
   public int start;

File org.lispdev.editor/src/org/lispdev/editor/EditorPlugin.java

   class AstCache extends LinkedHashMap<IDocument, TreeRoot>
   {
     private static final long serialVersionUID = 7606500805493229529L;
+    
+    // TODO: Understand why this number is chosen.
     /**
      * maximum number of ASTs to keep
      */
     {
       return null;
     }
+    
     TreeRoot res = astMap.get(doc);
     if(res == null)
     {
       if( Trace.DEBUG.enabled )
         Trace.DEBUG.trace("End parse");
     }
+    
     return res;
   }
 
 
   /**
    * TODO: set keywords from preferences.
+   * TODO2: Set keywords as "ANSI CL", CLTL2, etc in a dropdown?
    */
   private void initKeywords()
   {
       keywords.add(s);
     }
   }
-
   private ColorManager colorManager;
 
   public ColorManager getColorManager()

File org.lispdev.editor/src/org/lispdev/editor/LispMarkers.java

 import org.lispdev.parser.ParseError;
 import org.lispdev.parser.nodes.TreeRoot;
 
+//TODO: What is a marker? Why are we using *strings*?
 public class LispMarkers
 {
   static final String MARKER = "org.lispdev.marker";

File org.lispdev.editor/src/org/lispdev/editor/LispOutlinePage.java

         return element.toString();
       }
 
+      //TODO: Why are these functions empty?
       @Override
       public void addListener(ILabelProviderListener listener)
       {

File org.lispdev.editor/src/org/lispdev/editor/LispScanner.java

     return (currentToken == null ? -1 : Math.max(currentToken.offset(),fOffset));
   }
 
+  //TODO: Rename or document this function.
   private String printToken1(String txt)
   {
     StringBuilder sb = new StringBuilder();

File org.lispdev.editor/src/org/lispdev/editor/MarkerAnnotationHover.java

 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.ui.texteditor.MarkerAnnotation;
 
+//TODO: Determine the license state of this code.
+
 /**
  * Pretty much all this does is display tooltips for the error and warning
  * markers.

File org.lispdev.editor/src/org/lispdev/editor/SexpHighlighter.java

 import org.lispdev.preferences.ItemListener;
 import org.lispdev.preferences.PreferenceItem;
 
+//TODO: Understand why this pattern of adding yourself exists.
+// Who depends upon who? Isn't there a controlled way of managing hooks?
+
 public class SexpHighlighter
 implements KeyListener, MouseListener, ItemListener
 {
 
   }
 
+  // TODO: Refactor keyPressed and keyReleased.
+  
   @Override
   public void keyPressed(KeyEvent e)
   {// only need to update highlighting for key events that might move us into a

File org.lispdev.editor/src/org/lispdev/editor/actions/LispAction.java

 import org.eclipse.ui.IEditorPart;
 import org.lispdev.editor.LispEditor;
 
+//TODO: Fold this IndentAction and LispAction into the same class. No one except IndentAction references LispAction
 public class LispAction extends Action implements IEditorActionDelegate
 {
   protected LispEditor editor;

File org.lispdev.editor/src/org/lispdev/editor/autoedits/AllAutoEdits.java

   // this function is called when an editor is created
   public static IAutoEditStrategy[] get()
   {
+     // TODO: Pull in jasko.tim.lisp's PairAutoEdit.
+     // TODO: Also, see about turning CustomAutoEdit into something sane.
     return new IAutoEditStrategy[]{new IndentOnTab(),
         new IndentOnEnter()};//, new PairAutoEdit(), new CustomAutoEdit()};
   }

File org.lispdev.editor/src/org/lispdev/editor/autoedits/IndentOnTab.java

     return;
   }
 
+  // TODO: Factor this to be polymorphic?
   @Override
   public void customizeDocumentCommand(IDocument d, DocumentCommand c)
   {

File org.lispdev.main/src/org/lispdev/main/DeleteCompilerOutputs.java

 import org.lispdev.swank.BaseLocalLispLaunchDelegate;
 import org.lispdev.swank.SwankPlugin;
 
+//TODO: document what gets deleted and why.
 public class DeleteCompilerOutputs implements IObjectActionDelegate
 {
   private IStructuredSelection selection;

File org.lispdev.main/src/org/lispdev/main/LispProjectDecorator.java

     {
       if( p.getNature(LispNature.ID) != null )
       {
+         // TOOO: Determine what's happening here.
 //        LispProcess pr = LispPlugin.get().getActiveProcess(p);
 //        decoration.addSuffix(" ["+(pr == null ? "" : pr.getLabel())+"]");
       }

File org.lispdev.main/src/org/lispdev/main/LoadFileAction.java

     }
   }
 
+  // TODO: rename or describe to describe what this means.
   private void loadIn(IStructuredSelection files,
       final ILaunchConfiguration pr)
   {

File org.lispdev.main/src/org/lispdev/main/LoadProjectAction.java

     }
     project = null;
     file = null;
+    
+    // TODO: Again with the manual polymorphism.
+    
     if( selection instanceof IStructuredSelection )
     {
       Object obj = ((IStructuredSelection)selection).getFirstElement();

File org.lispdev.parser/src/org/lispdev/parser/nodes/Hidden.java

 /**
  * Hidden node contains space characters and comments (but not outline comments)
  */
+// TODO: Rename to HiddenNode
 public class Hidden extends Node
 {
   private ArrayList<Token> tokens;

File org.lispdev.parser/src/org/lispdev/parser/tokens/TokenMLC.java

 /**
  * Multi line comment
  */
+// TODO: RENAME THIS GUY to MultiLineCommentToken
 public class TokenMLC extends Token
 {
   public TokenMLC(int offset, String text, ParseError error, int EOLcount)

File org.lispdev.parser/src/org/lispdev/parser/tokens/TokenSLC.java

 /**
  * Single line comment
  */
+//TODO: RENAME THIS GUY to SingleLineCommentToken
 public class TokenSLC extends Token
 {
   final int lvl; // number of ; in front

File org.lispdev.replview/src/org/lispdev/replview/ReplConsolePage.java

     public void run(String msg, int offset, PartitionData pd, VerifyEvent event)
     {
       enterTrigger.setDoIt(false);
+      // TODO: Why clear it one place and not the other?
       enterTrigger.setStateMask(SWT.SHIFT);
       eval(msg);
     }
   public void createControl(Composite parent)
   {
     repl = new Repl(process.getLaunch().getLaunchConfiguration(),console);
+    //TODO: Why the /*comp*/ ?
     replConsole = new LispConsoleViewer(parent/*comp*/, new VerticalRuler(10),
         SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.LEFT | SWT.BORDER,
         new IVariableResolver(){
 
     enterTrigger.addInputListener(repl);
     replConsole.getTextWidget().addVerifyKeyListener(enterTrigger);
+    //TODO: This is incorrect. A common lisp prompt should be (format nil "~a>" package-name) 
     replConsole.setPrompt(
         new Prompt("[CL-USER]>",PROMPT_CONTEXT,"CL-USER",
             ReplViewPlugin.get().getPromptColor(),null,SWT.BOLD,false));