void () { String text = "package org;\r" + "\r" + "public class TestClass {\r" + "\r" + " int field;\r" + "\r" + " public int getField() {\r" + " return field;\r" + " }\r" + "}"; initWithCustomLineSeparators(text); int selectionStart = text.indexOf("public int"); int selectionEnd = text.indexOf('}