use of org.rstudio.studio.client.workbench.views.source.events.RecordNavigationPositionEvent 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)));
}
}));
}
use of org.rstudio.studio.client.workbench.views.source.events.RecordNavigationPositionEvent in project rstudio by rstudio.
the class AceEditor method fireRecordNavigationPosition.
private void fireRecordNavigationPosition(Position pos) {
SourcePosition srcPos = SourcePosition.create(pos.getRow(), pos.getColumn());
fireEvent(new RecordNavigationPositionEvent(srcPos));
}
Aggregations