diff options
Diffstat (limited to 'gerrit-gwtui/src/main/java/com/google')
3 files changed, 15 insertions, 0 deletions
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java index 93e8deb44a..dbbc9c3fa9 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.java @@ -31,6 +31,7 @@ public interface PatchConstants extends Constants { String patchHistoryTitle(); String disabledOnLargeFiles(); + String intralineFailure(); String upToChange(); String linePrev(); diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties index 90def1d307..590007dc06 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchConstants.properties @@ -13,6 +13,7 @@ patchHeaderOld = Old Version patchHeaderNew = New Version patchHistoryTitle = Patch History disabledOnLargeFiles = Disabled on very large source files. +intralineFailure = Intraline difference not available due to server error. upToChange = Up to change linePrev = Previous line diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java index 812a74ee72..cbe037b7ee 100644 --- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java +++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/patches/PatchScreen.java @@ -15,6 +15,7 @@ package com.google.gerrit.client.patches; import com.google.gerrit.client.Dispatcher; +import com.google.gerrit.client.ErrorDialog; import com.google.gerrit.client.Gerrit; import com.google.gerrit.client.RpcStatus; import com.google.gerrit.client.changes.CommitMessageBlock; @@ -140,6 +141,7 @@ public abstract class PatchScreen extends Screen implements /** Keys that cause an action on this screen */ private KeyCommandSet keysNavigation; private HandlerRegistration regNavigation; + private boolean intralineFailure; /** * How this patch should be displayed in the patch screen. @@ -461,6 +463,17 @@ public abstract class PatchScreen extends Screen implements settingsPanel.getReviewedCheckBox().setValue(true); setReviewedByCurrentUser(true /* reviewed */); } + + intralineFailure = isFirst && script.hasIntralineFailure(); + } + + @Override + public void onShowView() { + super.onShowView(); + if (intralineFailure) { + intralineFailure = false; + new ErrorDialog(PatchUtil.C.intralineFailure()).show(); + } } private void showPatch(final boolean showPatch) { |