diff --git a/Documentation/dev-plugins.txt b/Documentation/dev-plugins.txt index abb332e7c8..501f9869a2 100644 --- a/Documentation/dev-plugins.txt +++ b/Documentation/dev-plugins.txt @@ -1065,6 +1065,9 @@ Panel will be shown below the change info block. + The link:rest-api-changes.html#change-info[ChangeInfo] entity for the current change. ++ +The link:rest-api-changes.html#revision-info[RevisionInfo] entity for +the current patch set. * Project Info Screen: ** `GerritUiExtensionPoint.PROJECT_INFO_SCREEN_TOP`: diff --git a/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/GerritUiExtensionPoint.java b/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/GerritUiExtensionPoint.java index 61f73c0ccc..9dcb111b04 100644 --- a/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/GerritUiExtensionPoint.java +++ b/gerrit-gwtui-common/src/main/java/com/google/gerrit/client/GerritUiExtensionPoint.java @@ -34,6 +34,6 @@ public enum GerritUiExtensionPoint { PROJECT_INFO_SCREEN_TOP, PROJECT_INFO_SCREEN_BOTTOM; public enum Key { - ACCOUNT_INFO, CHANGE_INFO, PROJECT_NAME + ACCOUNT_INFO, CHANGE_INFO, PROJECT_NAME, REVISION_INFO } } diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java index 49c94c4895..00a9c70342 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen.java @@ -278,8 +278,7 @@ public class ChangeScreen extends Screen { @Override public void onSuccess(ChangeInfo info) { info.init(); - addExtensionPoints(info); - initCurrentRevision(info); + addExtensionPoints(info, initCurrentRevision(info)); loadConfigInfo(info, base); } })); @@ -324,22 +323,23 @@ public class ChangeScreen extends Screen { return resolveRevisionToDisplay(info); } - private void addExtensionPoints(ChangeInfo change) { + private void addExtensionPoints(ChangeInfo change, RevisionInfo rev) { addExtensionPoint(GerritUiExtensionPoint.CHANGE_SCREEN_HEADER, - headerExtension, change); + headerExtension, change, rev); addExtensionPoint(GerritUiExtensionPoint.CHANGE_SCREEN_HEADER_RIGHT_OF_BUTTONS, - headerExtensionMiddle, change); + headerExtensionMiddle, change, rev); addExtensionPoint(GerritUiExtensionPoint.CHANGE_SCREEN_HEADER_RIGHT_OF_POP_DOWNS, - headerExtensionRight, change); + headerExtensionRight, change, rev); addExtensionPoint( GerritUiExtensionPoint.CHANGE_SCREEN_BELOW_CHANGE_INFO_BLOCK, - changeExtension, change); + changeExtension, change, rev); } private void addExtensionPoint(GerritUiExtensionPoint extensionPoint, - Panel p, ChangeInfo change) { + Panel p, ChangeInfo change, RevisionInfo rev) { ExtensionPanel extensionPanel = new ExtensionPanel(extensionPoint); extensionPanel.putObject(GerritUiExtensionPoint.Key.CHANGE_INFO, change); + extensionPanel.putObject(GerritUiExtensionPoint.Key.REVISION_INFO, rev); p.add(extensionPanel); }