MCPcopy Index your code
hub / github.com/beanshell/beanshell / enter

Method enter

src/bsh/util/AWTConsole.java:193–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

191 }
192
193 private void enter() {
194 String s;
195 if ( line.length() == 0 ) // special hack for empty return!
196 s = ";\n";
197 else {
198 s = line +"\n";
199 history.addElement( line.toString() );
200 }
201 line.setLength( 0 );
202 histLine = 0;
203 append("\n");
204 textLength = getText().length(); // sync for safety
205 acceptLine( s );
206
207 setCaretPosition( textLength );
208 }
209
210 /*
211 Here's the really disguisting hack.

Callers 1

typeMethod · 0.95

Calls 5

acceptLineMethod · 0.95
setCaretPositionMethod · 0.95
appendMethod · 0.80
getTextMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected