use of org.rstudio.studio.client.common.synctex.events.SynctexViewPdfEvent in project rstudio by rstudio.
the class Synctex method doForwardSearch.
private void doForwardSearch(String rootDocument, JavaScriptObject sourceLocationObject) {
SourceLocation sourceLocation = sourceLocationObject.cast();
final ProgressIndicator indicator = getSyncProgress();
server_.synctexForwardSearch(rootDocument, sourceLocation, new ServerRequestCallback<PdfLocation>() {
@Override
public void onResponseReceived(PdfLocation location) {
indicator.onCompleted();
if (location != null)
eventBus_.fireEvent(new SynctexViewPdfEvent(location));
}
@Override
public void onError(ServerError error) {
indicator.onError(error.getUserMessage());
}
});
}
Aggregations