int caretOffset = fTextEditor.getViewer().getTextWidget().getCaretOffset();
IDocument doc = fTextEditor.getDocument();
int line = doc.getLineOfOffset(caretOffset);
List<KLineType> lineTypes = page.getLineTypes();
for(; line>-1; line--) {
KLineType lt = lineTypes.get(line);
if (lt.toString().startsWith("H")) break;
}
if (line<0) return;
Header header = (Header) page.getPageObject(line);
// Set
IStructuredSelection selection = new StructuredSelection(header);