@Override
public void onResponseReceived(String contents)
{
indicator.onCompleted();
final ViewFilePanel viewFilePanel = pViewFilePanel.get();
viewFilePanel.setSaveFileAsHandler(
new ViewFilePanel.SaveFileAsHandler()
{
@Override
public void onSaveFileAs(FileSystemItem source,
FileSystemItem destination,
ProgressIndicator indicator)
{
strategy_.saveFileAs(event.getRevision(),
source.getPath(),
destination.getPath(),
indicator);
}
});
viewFilePanel.getToolbar().addRightWidget(
new ToolbarButton(
"Show History",
commands.goToWorkingDir().getImageResource(),
new ClickHandler() {
@Override
public void onClick(ClickEvent event)
{
view_.getFileFilter().setValue(
viewFilePanel.getTargetFile());
viewFilePanel.close();
}
}));
viewFilePanel.showFile(
event.getFilename() + " @ " + event.getRevision(),
FileSystemItem.createFile(event.getFilename()),
contents);
}