Code example for CompletionInfo

Methods: getPositiongetText

0
		public boolean commitCompletion(CompletionInfo text) {
			if(Utility.isDebuggingFromCash()) { 
				log("commitCompletion=" + text);
			} 
			try { 
				mCommitText = text.getText();
				addCommitText(new CommitText(text.getText(), text.getPosition()));
				return super.commitCompletion(text);
			} finally { 
				mComposingText = "";
				getEditable().clear();
			} 
		} 
 
		@Override 
		public boolean commitText(CharSequence text, int newCursorPosition) {
			if(Utility.isDebuggingFromCash()) { 
				log("commitText=" + text + "," + newCursorPosition);
				log("--1--=" + Selection.getSelectionStart(text));
				log("--2--=" + Selection.getSelectionEnd(text));