public CommandInterpreter(Environment env, boolean echo) {
   this.env = env;
   this.echo = echo;
   this.runtime = env.getExecutionManager();
   this.context = env.getContextManager();
   this.classManager = env.getClassManager();
   this.sourceManager = env.getSourceManager();
 }
Exemple #2
0
  public StackTraceTool(Environment env) {

    super(new BorderLayout());

    this.env = env;
    this.runtime = env.getExecutionManager();
    this.context = env.getContextManager();

    stackModel = new DefaultListModel(); // empty

    list = new JList(stackModel);
    list.setCellRenderer(new StackFrameRenderer());

    JScrollPane listView = new JScrollPane(list);
    add(listView);

    // Create listener.
    StackTraceToolListener listener = new StackTraceToolListener();
    context.addContextListener(listener);
    list.addListSelectionListener(listener);

    // ### remove listeners on exit!
  }
 public SourceManager(Environment env, SearchPath sourcePath) {
   this.env = env;
   this.sourceList = new LinkedList<SourceModel>();
   this.sourcePath = sourcePath;
   env.getExecutionManager().addJDIListener(classListener);
 }