// Select contents in between parentheses (excluding parentheses) // Author: AhLeung Cheng https://www.google.com/+AhLeungCheng // GNU General Public License textArea.selectBlock(); if (textArea.getSelectionCount()==0) return; s = textArea.getSelection(0); textArea.setCaretPosition(s.getEnd()-1); textArea.setSelection(new Selection.Range(s.getStart()+1, s.getEnd()-1)); // deselect the parentheses