Search in sources :

Example 1 with FetchInfo

use of com.google.gerrit.client.info.ChangeInfo.FetchInfo in project gerrit by GerritCodeReview.

the class DownloadBox method renderCommands.

private void renderCommands() {
    commandTable.removeAllRows();
    if (scheme.getItemCount() > 0) {
        FetchInfo fetchInfo = fetch.get(scheme.getValue(scheme.getSelectedIndex()));
        for (String commandName : fetchInfo.commands().sortedKeys()) {
            CopyableLabel copyLabel = new CopyableLabel(fetchInfo.command(commandName));
            copyLabel.setStyleName(Gerrit.RESOURCES.css().downloadBoxCopyLabel());
            insertCommand(commandName, copyLabel);
        }
    }
    if (change.revision(revision).commit().parents().length() == 1) {
        insertPatch();
    }
    insertArchive();
    insertCommand(null, scheme);
}
Also used : FetchInfo(com.google.gerrit.client.info.ChangeInfo.FetchInfo) CopyableLabel(com.google.gwtexpui.clippy.client.CopyableLabel)

Aggregations

FetchInfo (com.google.gerrit.client.info.ChangeInfo.FetchInfo)1 CopyableLabel (com.google.gwtexpui.clippy.client.CopyableLabel)1