|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bluemarsh.jswat.ui.BasicUIAdapter | +--com.bluemarsh.jswat.ui.ConsoleAdapter
Class ConsoleAdapter connects the Session with the user interface
of JSwat. It builds out the major interface components, connects
them to the Session and managers, and handles some user input.
This subclass of the UIAdapter
class builds out a
console interface, which runs entirely based on stdout
and stdin
.
Inner Class Summary | |
protected class |
ConsoleAdapter.ConsoleInputAdapter
Class ConsoleInputAdapter adapts the standard input stream to the CommandManager. |
Field Summary | |
protected Session |
ourSession
Session we are associated with. |
protected com.bluemarsh.jswat.ui.ConsoleOutputAdapter |
outputAdapter
Handles the output from the debuggee VM. |
protected com.bluemarsh.jswat.ui.ConsoleOutputStream |
outputStream
This output stream supports printing the command prompt. |
protected Log |
statusLog
Log to which messages are printed. |
Fields inherited from class com.bluemarsh.jswat.ui.BasicUIAdapter |
propertyTable |
Constructor Summary | |
ConsoleAdapter(Session session)
Constructs a ConsoleAdapter, connected to the given Session. |
Method Summary | |
void |
buildInterface()
Construct the appropriate user interface and connect all the pieces together. |
boolean |
canFindString()
Indicate if this interface adapter has the ability to find a string in the currently selected source view. |
boolean |
canShowFile()
Indicate if this interface adapter has the ability to show source files in a manner appropriate for the user to read. |
boolean |
canShowStatus()
Indicate if this interface adapter has the ability to show the status in a manner appropriate for the user to view. |
void |
destroyInterface()
Deconstruct the user interface such that all components are made invisible and prepared for non-use. |
void |
exit()
This is called when there are no more open Sessions. |
boolean |
findString(java.lang.String query,
boolean ignoreCase)
Search for the given string in the currently selected source view. |
JSwatView |
getSelectedView()
Retrieves the currently active view in JSwat. |
void |
initComplete()
Called when the Session initialization has completed. |
void |
refreshDisplay()
Refresh the display to reflect changes in the program. |
void |
saveSettings()
Save any settings to the appropriate places, the program is about the terminate. |
boolean |
showFile(java.io.File file,
int line)
Show the given file in the appropriate view and make the given line visible in that view. |
void |
showStatus(java.lang.String status)
Show a status message in a reasonable location. |
Methods inherited from class com.bluemarsh.jswat.ui.BasicUIAdapter |
getProperty, setProperty |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Session ourSession
protected Log statusLog
protected com.bluemarsh.jswat.ui.ConsoleOutputStream outputStream
protected com.bluemarsh.jswat.ui.ConsoleOutputAdapter outputAdapter
Constructor Detail |
public ConsoleAdapter(Session session)
session
- Session we are associated with.Method Detail |
public void buildInterface()
buildInterface
in class BasicUIAdapter
public boolean canFindString()
canFindString
in class BasicUIAdapter
public boolean canShowFile()
canShowFile
in class BasicUIAdapter
public boolean canShowStatus()
canShowStatus
in class BasicUIAdapter
public void destroyInterface()
destroyInterface
in class BasicUIAdapter
public void exit()
exit
in class BasicUIAdapter
public boolean findString(java.lang.String query, boolean ignoreCase) throws NoOpenViewException
UnsupportedOperationException
since the console adapter does not support views.findString
in class BasicUIAdapter
query
- string to look for.ignoreCase
- true to ignore case.public JSwatView getSelectedView()
UnsupportedOperationException
since the console
adapter does not support views.getSelectedView
in class BasicUIAdapter
public void initComplete()
initComplete
in class BasicUIAdapter
public void refreshDisplay()
refreshDisplay
in class BasicUIAdapter
public void saveSettings()
saveSettings
in class BasicUIAdapter
public boolean showFile(java.io.File file, int line)
showFile
in class BasicUIAdapter
file
- file to be displayed.line
- line to be made visible.public void showStatus(java.lang.String status)
showStatus
in class BasicUIAdapter
status
- message to be shown to the user.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |