Changeset 118


Ignore:
Timestamp:
10/13/02 14:02:55 (21 years ago)
Author:
piso
Message:

protected void enter(final String s) is now private.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/Shell.java

    r112 r118  
    33 *
    44 * Copyright (C) 1998-2002 Peter Graves
    5  * $Id: Shell.java,v 1.6 2002-10-12 00:06:39 piso Exp $
     5 * $Id: Shell.java,v 1.7 2002-10-13 14:02:55 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    376376    }
    377377
    378     protected void enter(final String s)
     378    private void enter()
     379    {
     380        if (!checkProcess())
     381            return;
     382        final Editor editor = Editor.currentEditor();
     383        final Line dotLine = editor.getDotLine();
     384        if (posEndOfOutput == null) {
     385            // Ignore input before first prompt is displayed.
     386            dotLine.setText("");
     387            return;
     388        }
     389        if (posEndOfOutput.getLine() == dotLine) {
     390            if (posEndOfOutput.getOffset() < dotLine.length())
     391                input = dotLine.getText().substring(posEndOfOutput.getOffset());
     392            else
     393                input = "";
     394        } else {
     395            // We're not at the end of the buffer.
     396            input = stripPrompt(dotLine.getText());
     397        }
     398        enter(input);
     399    }
     400
     401    private void enter(final String s)
    379402    {
    380403        if (s.length() != 0) {
     
    441464            Log.error(e);
    442465        }
    443     }
    444 
    445     private void enter()
    446     {
    447         if (!checkProcess())
    448             return;
    449         final Editor editor = Editor.currentEditor();
    450         final Line dotLine = editor.getDotLine();
    451         if (posEndOfOutput == null) {
    452             // Ignore input before first prompt is displayed.
    453             dotLine.setText("");
    454             return;
    455         }
    456         if (posEndOfOutput.getLine() == dotLine) {
    457             if (posEndOfOutput.getOffset() < dotLine.length())
    458                 input = dotLine.getText().substring(posEndOfOutput.getOffset());
    459             else
    460                 input = "";
    461         } else {
    462             // We're not at the end of the buffer.
    463             input = stripPrompt(dotLine.getText());
    464         }
    465         enter(input);
    466466    }
    467467
Note: See TracChangeset for help on using the changeset viewer.