static class PlainTextLineSelectioner extends BasicSelectioner {
public boolean canSelect(PsiElement e) {
return e instanceof PsiPlainText || e instanceof XmlToken && ((XmlToken)e).getTokenType() == XmlTokenType.XML_DATA_CHARACTERS;
}
public List<TextRange> select(PsiElement e, CharSequence editorText, int cursorOffset, Editor editor) {
<BUG>List<TextRange> result = new ArrayList<TextRange>();</BUG>
int start = cursorOffset;
while (start > 0 && editorText.charAt(start - 1) != '\n' && editorText.charAt(start - 1) != '\r') start--;
int end = cursorOffset;
while (end < editorText.length() && editorText.charAt(end) != '\n' && editorText.charAt(end) != '\r') end++;
final TextRange range = new TextRange(start, end);
<BUG>if (!e.getParent().getTextRange().contains(range)) return null;
result.add(range);</BUG>
return result;

static class PlainTextLineSelectioner extends BasicSelectioner {
public boolean canSelect(PsiElement e) {
return e instanceof PsiPlainText || e instanceof XmlToken && ((XmlToken)e).getTokenType() == XmlTokenType.XML_DATA_CHARACTERS;
}
public List<TextRange> select(PsiElement e, CharSequence editorText, int cursorOffset, Editor editor) {
int start = cursorOffset;
while (start > 0 && editorText.charAt(start - 1) != '\n' && editorText.charAt(start - 1) != '\r') start--;
int end = cursorOffset;
while (end < editorText.length() && editorText.charAt(end) != '\n' && editorText.charAt(end) != '\r') end++;
final TextRange range = new TextRange(start, end);
if (!e.getParent().getTextRange().contains(range)) return null;
List<TextRange> result = new ArrayList<TextRange>();
result.add(range);
return result;
