joeq.Util.IO
Class SourceLister

java.lang.Object
  extended by joeq.Util.IO.SourceLister

public class SourceLister
extends java.lang.Object

SourceLister Maintains a set of source directories and lists source code around a given ProgramLocation.

Author:
Godmar Back

Field Summary
static int defaultLinesAfter
           
static int defaultLinesBefore
           
static java.lang.String[] defaultSrcDirs
           
 
Constructor Summary
SourceLister()
          Create a new source lister with the default path and before/after lines.
SourceLister(java.lang.String[] srcDirs)
          Create a new source lister with the specified paths and before/after lines.
 
Method Summary
 java.lang.String list(ProgramLocation pl)
          Try to find source for this location and return a section of the source file formatted for display.
 java.lang.String list(ProgramLocation pl, boolean withnumbers, int linesBefore, int linesAfter)
           
 java.lang.String list(ProgramLocation pl, boolean withnumbers, int linesBefore, int linesAfter, java.lang.String comment)
           
 java.lang.String list(ProgramLocation pl, java.lang.String comment)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultSrcDirs

public static java.lang.String[] defaultSrcDirs

defaultLinesBefore

public static int defaultLinesBefore

defaultLinesAfter

public static int defaultLinesAfter
Constructor Detail

SourceLister

public SourceLister()
Create a new source lister with the default path and before/after lines.


SourceLister

public SourceLister(java.lang.String[] srcDirs)
Create a new source lister with the specified paths and before/after lines.

Method Detail

list

public java.lang.String list(ProgramLocation pl)
Try to find source for this location and return a section of the source file formatted for display.


list

public java.lang.String list(ProgramLocation pl,
                             java.lang.String comment)

list

public java.lang.String list(ProgramLocation pl,
                             boolean withnumbers,
                             int linesBefore,
                             int linesAfter)

list

public java.lang.String list(ProgramLocation pl,
                             boolean withnumbers,
                             int linesBefore,
                             int linesAfter,
                             java.lang.String comment)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object