|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.view.JSwatView | +--com.bluemarsh.jswat.view.BasicView | +--com.bluemarsh.jswat.view.SourceView
Defines the SourceView class which will be responsible for displaying the source file on the screen. This class displays a row header down the left side of the source view, indicating the line numbers. A popup menu is attached to the view for managing breakpoints.
Field Summary | |
protected com.bluemarsh.jswat.view.BreakpointDrawLayer |
breakpointDrawLayer
Gutter draw layer for showing breakpoint locations and states. |
protected java.util.List |
classLines
Classlines of the parsed source file. |
protected char[] |
contentWithTabs
Original view content, with any tab characters. |
protected JavaDrawLayer |
javaDrawLayer
Draw layer responsible for colorizing Java code. |
protected Session |
owningSession
Session to which we belong. |
protected SourceViewPopup |
popupMenu
Popup menu for managing breakpoints. |
protected int |
tabSize
Width of tabs in characters. |
protected javax.swing.JScrollPane |
viewScroller
Scrollable component for text component. |
Fields inherited from class com.bluemarsh.jswat.view.BasicView |
lineHighlighter, logCategory, textComponent, viewContent, viewTitle |
Constructor Summary | |
SourceView(java.lang.String name)
Creates a SourceView object. |
Method Summary | |
void |
activate(Session session)
Called when the Session is about to begin an active debugging session. |
void |
close(Session session)
Called when the Session is about to close down. |
void |
configurationChanged()
Called then the prefernces change. |
void |
contextChanged(ContextChangeEvent cce)
Invoked when the current context has changed. |
void |
deactivate(Session session)
Called when the Session is about to end an active debugging session. |
javax.swing.JComponent |
getUI()
Returns a reference to the UI component. |
void |
init(Session session)
Called after the Session has added this listener to the Session listener list. |
protected boolean |
matches(com.sun.jdi.Location location)
Check if the Location is in the same source file as the file we are displaying. |
protected void |
parseClassDefs()
Reads the class definition information from the source file using the JavaParser class. |
boolean |
refresh(java.io.InputStream input,
int line)
Read the input stream text into the text component. |
protected void |
setPreferences()
Called to update this view's preferences, either when this object is constructed or when the preferences change. |
protected void |
setTextContent()
Set the content of the text component using the text defined by viewContent . |
Methods inherited from class com.bluemarsh.jswat.view.BasicView |
findString, foundString, getLineEndOffset, getLineOfOffset, getLineStartOffset, removeHighlight, scrollToLine, showHighlight |
Methods inherited from class com.bluemarsh.jswat.view.JSwatView |
refresh |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.JScrollPane viewScroller
protected SourceViewPopup popupMenu
protected Session owningSession
init()
.protected int tabSize
protected java.util.List classLines
protected JavaDrawLayer javaDrawLayer
protected com.bluemarsh.jswat.view.BreakpointDrawLayer breakpointDrawLayer
protected char[] contentWithTabs
Constructor Detail |
public SourceView(java.lang.String name)
name
- name of the file to display.Method Detail |
public void activate(Session session)
activate
in interface SessionListener
session
- Session being activated.public void close(Session session)
close
in interface SessionListener
session
- Session being closed.public void configurationChanged()
configurationChanged
in interface com.bluemarsh.config.ConfigureListener
public void contextChanged(ContextChangeEvent cce)
contextChanged
in interface ContextListener
cce
- context change eventpublic void deactivate(Session session)
deactivate
in interface SessionListener
session
- Session being deactivated.public javax.swing.JComponent getUI()
getUI
in class JSwatView
public void init(Session session)
init
in interface SessionListener
session
- Session adding this listener.protected boolean matches(com.sun.jdi.Location location)
location
- Location to check.protected void parseClassDefs()
public boolean refresh(java.io.InputStream input, int line)
input
- input stream providing source.line
- line to make visible.protected void setPreferences()
protected void setTextContent()
viewContent
. This implementation applies styles
to the Java source to colorize it syntactically.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |