use of com.google.gwt.user.cellview.client.AbstractHasData in project rstudio by rstudio.
the class HistoryAsyncDataProvider method onRangeChanged.
@Override
public void onRangeChanged(final HasData<CommitInfo> display) {
final Range rng = display.getVisibleRange();
final int start = rng.getStart();
final int length = rng.getLength();
if (length == 0)
return;
getHistory(rev_, fileFilter_.getValue(), start, length, searchText_.getValue(), new SimpleRequestCallback<RpcObjectList<CommitInfo>>("Error Fetching History") {
@Override
public void onResponseReceived(RpcObjectList<CommitInfo> response) {
super.onResponseReceived(response);
if (response.length() < length)
updateRowCount(start + response.length(), true);
updateRowData(start, response.toArrayList());
}
@Override
public void onError(ServerError error) {
if (display instanceof AbstractHasData) {
display.setVisibleRangeAndClearData(new Range(start, 0), true);
}
if (strategy_.getShowHistoryErrors())
super.onError(error);
else
Debug.logError(error);
}
});
}
Aggregations