use of org.rstudio.core.client.widget.ProgressIndicator in project rstudio by rstudio.
the class ViewFilePanel method showFile.
public void showFile(final FileSystemItem file, String encoding) {
final ProgressIndicator indicator = new GlobalProgressDelayer(globalDisplay_, 300, "Loading file contents").getIndicator();
server_.getFileContents(file.getPath(), encoding, new ServerRequestCallback<String>() {
@Override
public void onResponseReceived(String contents) {
indicator.onCompleted();
showFile(file.getPath(), file, contents);
}
@Override
public void onError(ServerError error) {
indicator.onError(error.getUserMessage());
}
});
}
Aggregations