public void visibleAreaChanged(final VisibleAreaEvent event) {
sendCaretPosition(event.getEditor(), true);
}
private void sendCaretPosition(Editor editor, boolean following) {
FactoryImpl iFactory = (FactoryImpl) context.iFactory;
Document document = editor.getDocument();
String path = iFactory.getPathForDoc(document);
if (path == null) {
return;
}
ArrayList<ArrayList<Integer>> rangesWithCaret = new ArrayList<ArrayList<Integer>>(ranges.size() + 1);