summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Daarstad <tomas.daarstad@tieto.com>2012-04-04 08:51:07 +0200
committerTomas Daarstad <tomas.daarstad@tieto.com>2012-04-04 08:51:37 +0200
commitf617a647fbd4222812b99b42d84acf233d4f92b5 (patch)
treebcc4d9df19a3ebc83e817261ab86abcb7e59fb18
parentc7a39fc0e13b518c5cd723438db5b65781b222f1 (diff)
parentd085a3348edd693e49dab3c0c5a0e94d50930c85 (diff)
Integration release of NQt GerritRC-V2.2.1-INT-018
Fixed JIRA issues: 167 Fixed gerrit email verification link requires insecure login 195 Added support for European style dates 220 Added a check to prevent NumberFormatException 270 Fixed review database update from StagingApprove 335 Fixed automatic update of reviewer list 340 Don't send mail for publishing comments for stage approved 347 Fixed late removal of review approvals 348 Fixed cherry pick footer settings 350 Consider sanity review column 352 Fix typo in project config's topic review checkbox label 355 Hide review panel also on diff and topic pages 357 Add support for public anonymous access to gerrit 366 Improved code to get TopicScreen 372 Validate topic current change set 375 Topic permalink copy to clipboard corrected 381 Do not permit trailing slash when pushing 382 Integration release of NQt Gerrit 382 Added a check to prevent NullPointerException Added a check to prevent ArrayIndexOutOfBoundsException 385 Keep highlight on review request 389 Set patch approval changeOpen to false 411 Updated to use current patch id in loadFileList method. 456 Remove leading and trailing whitespace in username when creating a request 462 Updated for eclipse 3.7, m2e and fixed the full name of the MAVEN2_CLASSPATH_CONTAINER 468 Fixed the Review score put on wrong change Change-Id: Ieff0a5c4483b141a662d6c5721f673f1c84bd51f
-rw-r--r--gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java69
1 files changed, 46 insertions, 23 deletions
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java
index ca3bb40d2a..c61ff1ea0c 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeTable.java
@@ -240,10 +240,10 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
}
table.setWidget(row, C_SUBJECT, new TableChangeLink(s, c));
table.setWidget(row, C_OWNER, link(c.getOwner()));
- table.setWidget(row, C_PROJECT, new ProjectLink(c.getProject().getKey(), c
- .getStatus()));
- table.setWidget(row, C_BRANCH, new BranchTopicLink(c.getProject().getKey(), c
- .getStatus(), c.getBranch(), c.getTopic(), c.getTopicId()));
+ table.setWidget(row, C_PROJECT,
+ new ProjectLink(c.getProject().getKey(), c.getStatus()));
+ table.setWidget(row, C_BRANCH, new BranchTopicLink(c.getProject().getKey(),
+ c.getStatus(), c.getBranch(), c.getTopic(), c.getTopicId()));
table.setText(row, C_LAST_UPDATE, shortFormat(c.getLastUpdatedOn()));
setRowItem(row, c);
}
@@ -328,7 +328,8 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
boolean displayPersonNameInReviewCategory = false;
if (Gerrit.isSignedIn()) {
- AccountGeneralPreferences prefs = Gerrit.getUserAccount().getGeneralPreferences();
+ AccountGeneralPreferences prefs =
+ Gerrit.getUserAccount().getGeneralPreferences();
if (prefs.isDisplayPersonNameInReviewCategory()) {
displayPersonNameInReviewCategory = true;
@@ -419,25 +420,46 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
for (int row = dataBegin; row < dataBegin + rows; row++) {
final ChangeInfo c = getRowItem(row);
if (ids.containsKey(c.getId())) {
- displayApprovals(row, ids.get(c.getId()), aic, highlightUnreviewed);
+ displayApprovals(row, ids.get(c.getId()), aic, highlightUnreviewed);
}
}
// ChangeSetsBlock widget
- Widget csb =
- getParent().getParent().getParent().getParent().getParent()
- .getParent().getParent().getParent();
-
+ Widget csb = null;
// TopicScreen widget
- Widget w =
- getParent().getParent().getParent().getParent().getParent()
- .getParent().getParent().getParent().getParent().getParent()
- .getParent();
-
- if (w instanceof TopicScreen) {
- ChangeSetsBlock cb = new ChangeSetsBlock((TopicScreen) w);
- cb = (ChangeSetsBlock) csb;
- cb.updateButtons();
+ Widget w = null;
+
+ try {
+
+ // Get the ChangeSetsBlock widget
+ // break when the widget is found or null
+ Widget csbParent = getParent();
+ while (csbParent.getParent() != null) {
+ csbParent = csbParent.getParent();
+ if (csbParent instanceof ChangeSetsBlock) {
+ csb = csbParent;
+ break;
+ }
+ }
+
+ // Get the TopicScreen widget
+ // break when the widget is found or null
+ Widget parent = getParent();
+ while (parent.getParent() != null) {
+ parent = parent.getParent();
+ if (parent instanceof TopicScreen) {
+ w = parent;
+ break;
+ }
+ }
+
+ if (w != null && csb != null) {
+ ChangeSetsBlock cb = new ChangeSetsBlock((TopicScreen) w);
+ cb = (ChangeSetsBlock) csb;
+ cb.updateButtons();
+ }
+
+ } catch (Exception unimportant) {
}
}
};
@@ -446,6 +468,7 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
/**
* Get the changeSet reviews
+ *
* @return true if no false exist in list
*/
public boolean getChangeSetIsReviewed() {
@@ -548,12 +571,12 @@ public class ChangeTable extends NavigationTable<ChangeInfo> {
case NONE:
break;
case USER:
- PatchUtil.DETAIL_SVC.userApprovals(cids, ownerId, parent
- .approvalFormatter(dataBegin, rows, true));
+ PatchUtil.DETAIL_SVC.userApprovals(cids, ownerId,
+ parent.approvalFormatter(dataBegin, rows, true));
break;
case STRONGEST:
- PatchUtil.DETAIL_SVC.strongestApprovals(cids, parent
- .approvalFormatter(dataBegin, rows, false));
+ PatchUtil.DETAIL_SVC.strongestApprovals(cids,
+ parent.approvalFormatter(dataBegin, rows, false));
break;
}
}