Java Doc for SimpleInteractionsModel.java in  » IDE » DrJava » edu » rice » cs » drjava » model » repl » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE » DrJava » edu.rice.cs.drjava.model.repl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.rice.cs.drjava.model.repl.InteractionsModel
      edu.rice.cs.drjava.model.repl.SimpleInteractionsModel

SimpleInteractionsModel
public class SimpleInteractionsModel extends InteractionsModel (Code)
A simple implementation of InteractionsModel, which uses a DynamicJavaAdapter directly (in the same JVM) to interpret code. It can be used in a standalone interface, such as edu.rice.cs.drjava.ui.SimpleInteractionsWindow.
version:
   $Id: SimpleInteractionsModel.java 4255 2007-08-28 19:17:37Z mgricken $


Field Summary
final protected static  intWRITE_DELAY
    
protected  JavaInterpreter_interpreter
     An interpreter to evaluate interactions.

Constructor Summary
public  SimpleInteractionsModel()
     Creates a new InteractionsModel using a InteractionsDJDocument.
public  SimpleInteractionsModel(InteractionsDJDocument document)
     Creates a new InteractionsModel with the given document adapter.

Method Summary
protected  void_interpret(String toEval)
     Interprets the given command.
protected  void_interpreterResetFailed(Throwable t)
     Any extra action to perform (beyond notifying listeners) when the interpreter fails to reset.
protected  void_notifyInteractionEnded()
     Notifies listeners that an interaction has ended.
protected  void_notifyInteractionIncomplete()
     Notifies listeners that the interperaction was incomplete.
protected  void_notifyInteractionStarted()
     Notifies listeners that an interaction has started.
protected  void_notifyInterpreterExited(int status)
     Notifies listeners that the interpreter has exited unexpectedly.
public  void_notifyInterpreterReady(File wd)
     Notifies listeners that the interpreter is ready.
protected  void_notifyInterpreterResetFailed(Throwable t)
     Notifies listeners that the interpreter reset failed.
protected  void_notifyInterpreterResetting()
     Notifies listeners that the interpreter is resetting.
protected  void_notifySlaveJVMUsed()
     Notifies listeners that the slave JVM has been used.
protected  void_notifySyntaxErrorOccurred(int offset, int length)
     Notifies listeners that an interaction contained a syntax error.
protected  void_resetInterpreter(File wd)
     Resets the Java interpreter.
public  voidaddBuildDirectoryClassPath(File path)
     Adds the given path to the interpreter's classpath.
public  voidaddExternalFilesClassPath(File path)
     Adds the given path to the interpreter's classpath.
public  voidaddExtraClassPath(File path)
     Adds the given path to the interpreter's classpath.
public  voidaddProjectClassPath(File path)
     Adds the given path to the interpreter's classpath.
public  voidaddProjectFilesClassPath(File path)
     Adds the given path to the interpreter's classpath.
public  voiddefineConstant(String name, Object value)
     Defines a final variable in the interpreter to the given value.
public  voiddefineVariable(String name, Object value)
     Defines a variable in the interpreter to the given value.
public  ConsoleDocumentgetConsoleDocument()
    
public  StringgetVariableClassName(String var)
     Gets the class name of a variable in the current interpreter.
public  StringgetVariableToString(String var)
     Gets the string representation of the value of a variable in the current interpreter.
public  voidsetInterpreterPrivateAccessible(boolean accessible)
     Sets whether protected and private variables and methods can be accessed from within the interpreter.

Field Detail
WRITE_DELAY
final protected static int WRITE_DELAY(Code)
Milliseconds to wait after each println



_interpreter
protected JavaInterpreter _interpreter(Code)
An interpreter to evaluate interactions.




Constructor Detail
SimpleInteractionsModel
public SimpleInteractionsModel()(Code)
Creates a new InteractionsModel using a InteractionsDJDocument.



SimpleInteractionsModel
public SimpleInteractionsModel(InteractionsDJDocument document)(Code)
Creates a new InteractionsModel with the given document adapter.
Parameters:
  document - Toolkit-independent document adapter




Method Detail
_interpret
protected void _interpret(String toEval)(Code)
Interprets the given command.
Parameters:
  toEval - command to be evaluated



_interpreterResetFailed
protected void _interpreterResetFailed(Throwable t)(Code)
Any extra action to perform (beyond notifying listeners) when the interpreter fails to reset.
Parameters:
  t - The Throwable thrown by System.exit



_notifyInteractionEnded
protected void _notifyInteractionEnded()(Code)
Notifies listeners that an interaction has ended.



_notifyInteractionIncomplete
protected void _notifyInteractionIncomplete()(Code)
Notifies listeners that the interperaction was incomplete.



_notifyInteractionStarted
protected void _notifyInteractionStarted()(Code)
Notifies listeners that an interaction has started.



_notifyInterpreterExited
protected void _notifyInterpreterExited(int status)(Code)
Notifies listeners that the interpreter has exited unexpectedly.
Parameters:
  status - Status code of the dead process



_notifyInterpreterReady
public void _notifyInterpreterReady(File wd)(Code)
Notifies listeners that the interpreter is ready.



_notifyInterpreterResetFailed
protected void _notifyInterpreterResetFailed(Throwable t)(Code)
Notifies listeners that the interpreter reset failed.



_notifyInterpreterResetting
protected void _notifyInterpreterResetting()(Code)
Notifies listeners that the interpreter is resetting.



_notifySlaveJVMUsed
protected void _notifySlaveJVMUsed()(Code)
Notifies listeners that the slave JVM has been used.



_notifySyntaxErrorOccurred
protected void _notifySyntaxErrorOccurred(int offset, int length)(Code)
Notifies listeners that an interaction contained a syntax error.



_resetInterpreter
protected void _resetInterpreter(File wd)(Code)
Resets the Java interpreter.



addBuildDirectoryClassPath
public void addBuildDirectoryClassPath(File path)(Code)
Adds the given path to the interpreter's classpath.
Parameters:
  path - Path to add



addExternalFilesClassPath
public void addExternalFilesClassPath(File path)(Code)
Adds the given path to the interpreter's classpath.
Parameters:
  path - Path to add



addExtraClassPath
public void addExtraClassPath(File path)(Code)
Adds the given path to the interpreter's classpath.
Parameters:
  path - Path to add



addProjectClassPath
public void addProjectClassPath(File path)(Code)
Adds the given path to the interpreter's classpath.
Parameters:
  path - Path to add



addProjectFilesClassPath
public void addProjectFilesClassPath(File path)(Code)
Adds the given path to the interpreter's classpath.
Parameters:
  path - Path to add



defineConstant
public void defineConstant(String name, Object value)(Code)
Defines a final variable in the interpreter to the given value.



defineVariable
public void defineVariable(String name, Object value)(Code)
Defines a variable in the interpreter to the given value.



getConsoleDocument
public ConsoleDocument getConsoleDocument()(Code)
Returns null because console tab document is not supported in this model



getVariableClassName
public String getVariableClassName(String var)(Code)
Gets the class name of a variable in the current interpreter.
Parameters:
  var - the name of the variable



getVariableToString
public String getVariableToString(String var)(Code)
Gets the string representation of the value of a variable in the current interpreter.
Parameters:
  var - the name of the variable



setInterpreterPrivateAccessible
public void setInterpreterPrivateAccessible(boolean accessible)(Code)
Sets whether protected and private variables and methods can be accessed from within the interpreter.



Fields inherited from edu.rice.cs.drjava.model.repl.InteractionsModel
final public static String BANNER_PREFIX(Code)(Java Doc)
final protected ConsoleDocumentInterface _adapter(Code)(Java Doc)
final protected InteractionsDocument _document(Code)(Java Doc)
protected volatile InputListener _inputListener(Code)(Java Doc)
protected volatile Pair<String, String> _lastError(Code)(Java Doc)
final public static String _newLine(Code)(Java Doc)
final protected InteractionsEventNotifier _notifier(Code)(Java Doc)
protected volatile Pair<String, String> _secondToLastError(Code)(Java Doc)
protected volatile boolean _waitingForFirstInterpreter(Code)(Java Doc)
protected volatile File _workingDirectory(Code)(Java Doc)
final public Object _writerLock(Code)(Java Doc)

Methods inherited from edu.rice.cs.drjava.model.repl.InteractionsModel
protected void _createNewDebugPort() throws IOException(Code)(Java Doc)
protected static String _deleteSemiColon(String s)(Code)(Java Doc)
protected ArrayList<String> _getHistoryText(FileOpenSelector selector) throws IOException, OperationCanceledException(Code)(Java Doc)
public void _interactionIsOver()(Code)(Java Doc)
abstract protected void _interpret(String toEval)(Code)(Java Doc)
abstract protected void _interpreterResetFailed(Throwable t)(Code)(Java Doc)
abstract protected void _notifyInteractionEnded()(Code)(Java Doc)
abstract protected void _notifyInteractionIncomplete()(Code)(Java Doc)
abstract protected void _notifyInteractionStarted()(Code)(Java Doc)
abstract protected void _notifyInterpreterExited(int status)(Code)(Java Doc)
abstract public void _notifyInterpreterReady(File wd)(Code)(Java Doc)
abstract protected void _notifyInterpreterResetFailed(Throwable t)(Code)(Java Doc)
abstract protected void _notifyInterpreterResetting()(Code)(Java Doc)
abstract protected void _notifySlaveJVMUsed()(Code)(Java Doc)
abstract protected void _notifySyntaxErrorOccurred(int offset, int length)(Code)(Java Doc)
protected ArrayList<String> _removeSeparators(String text)(Code)(Java Doc)
abstract protected void _resetInterpreter(File wd)(Code)(Java Doc)
protected static String _testClassCall(String s)(Code)(Java Doc)
public void _writerDelay()(Code)(Java Doc)
abstract public void addBuildDirectoryClassPath(File f)(Code)(Java Doc)
abstract public void addExternalFilesClassPath(File f)(Code)(Java Doc)
abstract public void addExtraClassPath(File f)(Code)(Java Doc)
public void addListener(InteractionsListener listener)(Code)(Java Doc)
public void addNewLine()(Code)(Java Doc)
abstract public void addProjectClassPath(File f)(Code)(Java Doc)
abstract public void addProjectFilesClassPath(File f)(Code)(Java Doc)
public void append(String s, String styleName)(Code)(Java Doc)
public void changeInputListener(InputListener oldListener, InputListener newListener)(Code)(Java Doc)
public String getBanner()(Code)(Java Doc)
public static String getBanner(File wd)(Code)(Java Doc)
abstract public ConsoleDocument getConsoleDocument()(Code)(Java Doc)
public String getConsoleInput()(Code)(Java Doc)
public int getDebugPort() throws IOException(Code)(Java Doc)
public InteractionsDocument getDocument()(Code)(Java Doc)
public Pair<String, String> getLastError()(Code)(Java Doc)
public Pair<String, String> getSecondToLastError()(Code)(Java Doc)
public String getStartUpBanner()(Code)(Java Doc)
abstract public String getVariableClassName(String var)(Code)(Java Doc)
abstract public String getVariableToString(String var)(Code)(Java Doc)
public File getWorkingDirectory()(Code)(Java Doc)
public void interactionContinues()(Code)(Java Doc)
final public void interpret(String toEval)(Code)(Java Doc)
public void interpretCurrentInteraction()(Code)(Java Doc)
public void interpreterReady(File wd)(Code)(Java Doc)
public void interpreterResetFailed(Throwable t)(Code)(Java Doc)
public void interpreterResetting()(Code)(Java Doc)
public void loadHistory(FileOpenSelector selector) throws IOException(Code)(Java Doc)
public InteractionsScriptModel loadHistoryAsScript(FileOpenSelector selector) throws IOException, OperationCanceledException(Code)(Java Doc)
public void removeAllInteractionListeners()(Code)(Java Doc)
public String removeLastFromHistory()(Code)(Java Doc)
public void removeListener(InteractionsListener listener)(Code)(Java Doc)
public void replCalledSystemExit(int status)(Code)(Java Doc)
public void replReturnedResult(String result, String style)(Code)(Java Doc)
public void replReturnedSyntaxError(String errorMessage, String interaction, int startRow, int startCol, int endRow, int endCol)(Code)(Java Doc)
public void replReturnedVoid()(Code)(Java Doc)
public void replSystemErrPrint(String s)(Code)(Java Doc)
public void replSystemOutPrint(String s)(Code)(Java Doc)
public void replThrewException(String exceptionClass, String message, String stackTrace, String shortMessage)(Code)(Java Doc)
final public void resetInterpreter(File wd)(Code)(Java Doc)
public void resetLastErrors()(Code)(Java Doc)
public void setDebugPort(int port)(Code)(Java Doc)
public void setInputListener(InputListener listener)(Code)(Java Doc)
public void setWaitingForFirstInterpreter(boolean waiting)(Code)(Java Doc)
public void slaveJVMUsed()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.