openjava.debug.gui
Class ColoredSourceWriter

java.lang.Object
  |
  +--openjava.ptree.util.ParseTreeVisitor
        |
        +--openjava.ptree.util.SourceCodeWriter
              |
              +--openjava.debug.gui.ColoredSourceWriter

public class ColoredSourceWriter
extends SourceCodeWriter

The class ColoredSourceWriter is a Visitor role in the Visitor pattern and this also visits each child ParseTree object from left to right.

Since:
%SOFTWARE% 1.0
Version:
1.0
Author:
Michiaki Tatsubori
See Also:
ParseTree, ParseTreeVisitor

Nested Class Summary
(package private)  class ColoredSourceWriter.TextPanePrintWriter
           
 
Field Summary
(package private)  int callee_min
           
(package private)  SimpleAttributeSet calleeAttr
           
(package private)  int caller_min
           
(package private)  SimpleAttributeSet callerAttr
           
(package private)  DefaultStyledDocument doc
           
(package private)  SimpleAttributeSet lastAttr
           
static SimpleAttributeSet regularAttr
           
 
Fields inherited from class openjava.ptree.util.SourceCodeWriter
NEWLINE, out
 
Constructor Summary
ColoredSourceWriter(DefaultStyledDocument doc, int callee_min, int caller_min)
           
 
Method Summary
(package private)  SimpleAttributeSet beginColor(ParseTreeObject p)
           
(package private)  void endColor(SimpleAttributeSet back)
           
 void visit(AllocationExpression p)
           
 void visit(ArrayAccess p)
           
 void visit(ArrayAllocationExpression p)
           
 void visit(ArrayInitializer p)
           
 void visit(AssignmentExpression p)
           
 void visit(BinaryExpression p)
           
 void visit(Block p)
           
 void visit(BreakStatement p)
           
 void visit(CaseGroup p)
           
 void visit(CaseGroupList p)
           
 void visit(CaseLabel p)
           
 void visit(CaseLabelList p)
           
 void visit(CastExpression p)
           
 void visit(CatchBlock p)
           
 void visit(CatchList p)
           
 void visit(ClassDeclaration p)
           
 void visit(ClassDeclarationList p)
           
 void visit(ClassLiteral p)
           
 void visit(CompilationUnit p)
           
 void visit(ConditionalExpression p)
           
 void visit(ConstructorDeclaration p)
           
 void visit(ConstructorInvocation p)
           
 void visit(ContinueStatement p)
           
 void visit(DoWhileStatement p)
           
 void visit(EmptyStatement p)
           
 void visit(ExpressionList p)
           
 void visit(ExpressionStatement p)
           
 void visit(FieldAccess p)
           
 void visit(FieldDeclaration p)
           
 void visit(ForStatement p)
           
 void visit(IfStatement p)
           
 void visit(InstanceofExpression p)
           
 void visit(LabeledStatement p)
           
 void visit(Literal p)
           
 void visit(MemberDeclarationList p)
           
 void visit(MemberInitializer p)
           
 void visit(MethodCall p)
           
 void visit(MethodDeclaration p)
           
 void visit(ModifierList p)
           
 void visit(Parameter p)
           
 void visit(ParameterList p)
           
 void visit(ReturnStatement p)
           
 void visit(SelfAccess p)
           
 void visit(StatementList p)
           
 void visit(SwitchStatement p)
           
 void visit(SynchronizedStatement p)
           
 void visit(ThrowStatement p)
           
 void visit(TryStatement p)
           
 void visit(TypeName p)
          rough around innerclass
 void visit(UnaryExpression p)
           
 void visit(Variable p)
           
 void visit(VariableDeclaration p)
           
 void visit(VariableDeclarator p)
           
 void visit(WhileStatement p)
           
 
Methods inherited from class openjava.ptree.util.SourceCodeWriter
getDebugLevel, getNest, getTab, popNest, pushNest, setDebugLevel, setNest, setTab, visit, visit, visit, visit
 
Methods inherited from class openjava.ptree.util.ParseTreeVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regularAttr

public static SimpleAttributeSet regularAttr

calleeAttr

SimpleAttributeSet calleeAttr

callerAttr

SimpleAttributeSet callerAttr

callee_min

int callee_min

caller_min

int caller_min

doc

DefaultStyledDocument doc

lastAttr

SimpleAttributeSet lastAttr
Constructor Detail

ColoredSourceWriter

public ColoredSourceWriter(DefaultStyledDocument doc,
                           int callee_min,
                           int caller_min)
Method Detail

beginColor

SimpleAttributeSet beginColor(ParseTreeObject p)

endColor

void endColor(SimpleAttributeSet back)

visit

public void visit(AllocationExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ArrayAccess p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ArrayAllocationExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ArrayInitializer p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(AssignmentExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(BinaryExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(Block p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(BreakStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CaseGroup p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CaseGroupList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CaseLabel p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CaseLabelList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CastExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CatchBlock p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CatchList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ClassDeclaration p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ClassDeclarationList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ClassLiteral p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(CompilationUnit p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ConditionalExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ConstructorDeclaration p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ConstructorInvocation p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ContinueStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(DoWhileStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(EmptyStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ExpressionList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ExpressionStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(FieldAccess p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(FieldDeclaration p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ForStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(IfStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(InstanceofExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(LabeledStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(Literal p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(MemberDeclarationList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(MemberInitializer p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(MethodCall p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(MethodDeclaration p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ModifierList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(Parameter p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ParameterList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ReturnStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(SelfAccess p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(StatementList p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(SwitchStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(SynchronizedStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(ThrowStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(TryStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(TypeName p)
           throws ParseTreeException
Description copied from class: SourceCodeWriter
rough around innerclass

Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(UnaryExpression p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(Variable p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(VariableDeclaration p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(VariableDeclarator p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

visit

public void visit(WhileStatement p)
           throws ParseTreeException
Overrides:
visit in class SourceCodeWriter
ParseTreeException

SourceForge.net_Logo