.getImage(ISharedImages.IMG_TOOL_BACK));
previousButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
task = new RunnableWithProgress("Loading trace results...") {
@Override
public void doAction() {
final int limit = Activator.getDefault().getPreferenceStore()
.getInt(PreferenceNames.TRACES_LOAD_LIMIT);
final long startIndex = Math.max(1L, index - limit);
final long endIndex = startIndex + limit - 1;
TraceBackend.getInstance().loadDataFromFile(startIndex, endIndex);
}
};
executeTask();
}
});
// "Next" button
nextButton = new Button(buttonsPanel, SWT.PUSH | SWT.CENTER);
nextButton.setToolTipText("Show next trace set");
nextButton.setImage(PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_TOOL_FORWARD));
nextButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(final SelectionEvent e) {
task = new RunnableWithProgress("Loading trace results...") {
@Override
public void doAction() {
final int limit = Activator.getDefault().getPreferenceStore()
.getInt(PreferenceNames.TRACES_LOAD_LIMIT);
final long endIndex = Math