use of org.rstudio.studio.client.workbench.views.source.events.RecordNavigationPositionHandler in project rstudio by rstudio.
the class TextEditingTarget method addRecordNavigationPositionHandler.
public static void addRecordNavigationPositionHandler(ArrayList<HandlerRegistration> releaseOnDismiss, final DocDisplay docDisplay, final EventBus events, final EditingTarget target) {
releaseOnDismiss.add(docDisplay.addRecordNavigationPositionHandler(new RecordNavigationPositionHandler() {
@Override
public void onRecordNavigationPosition(RecordNavigationPositionEvent event) {
SourcePosition pos = SourcePosition.create(target.getContext(), event.getPosition().getRow(), event.getPosition().getColumn(), docDisplay.getScrollTop());
events.fireEvent(new SourceNavigationEvent(SourceNavigation.create(target.getId(), target.getPath(), pos)));
}
}));
}
Aggregations