joeq.Util.IO
Class SourceLister

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

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

Field Detail

defaultSrcDirs

public static 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(String[] srcDirs)
Create a new source lister with the specified paths and before/after lines.

Method Detail

list

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


list

public String list(ProgramLocation pl,
                   String comment)

list

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

list

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2008 John Whaley. All Rights Reserved.