diff --git a/platform/diff-api/src/com/intellij/diff/comparison/ComparisonManager.java b/platform/diff-api/src/com/intellij/diff/comparison/ComparisonManager.java index 272a1f12f57f..db5bee21cf69 100644 --- a/platform/diff-api/src/com/intellij/diff/comparison/ComparisonManager.java +++ b/platform/diff-api/src/com/intellij/diff/comparison/ComparisonManager.java @@ -39,32 +39,32 @@ public abstract class ComparisonManager { public abstract List compareLines(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator); + @NotNull ProgressIndicator indicator) throws DiffTooBigException; @NotNull public abstract List compareLinesInner(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator); + @NotNull ProgressIndicator indicator) throws DiffTooBigException; @NotNull public abstract List compareLinesInner(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull List lineFragments, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator); + @NotNull ProgressIndicator indicator) throws DiffTooBigException; @NotNull public abstract List compareWords(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator); + @NotNull ProgressIndicator indicator) throws DiffTooBigException; @NotNull public abstract List compareChars(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator); + @NotNull ProgressIndicator indicator) throws DiffTooBigException; public abstract boolean isEquals(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy); diff --git a/platform/diff-impl/src/com/intellij/diff/comparison/ComparisonManagerImpl.java b/platform/diff-impl/src/com/intellij/diff/comparison/ComparisonManagerImpl.java index d9ae5a1acb01..27f619a2b844 100644 --- a/platform/diff-impl/src/com/intellij/diff/comparison/ComparisonManagerImpl.java +++ b/platform/diff-impl/src/com/intellij/diff/comparison/ComparisonManagerImpl.java @@ -41,7 +41,7 @@ public class ComparisonManagerImpl extends ComparisonManager { public List compareLines(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator) { + @NotNull ProgressIndicator indicator) throws DiffTooBigException { if (policy == ComparisonPolicy.IGNORE_WHITESPACES) { return ByLine.compare(text1, text2, policy, indicator); } @@ -54,7 +54,7 @@ public class ComparisonManagerImpl extends ComparisonManager { public List compareLinesInner(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator) { + @NotNull ProgressIndicator indicator) throws DiffTooBigException { List fragments = compareLines(text1, text2, policy, indicator); return compareLinesInner(text1, text2, fragments, policy, indicator); } @@ -64,7 +64,7 @@ public class ComparisonManagerImpl extends ComparisonManager { @NotNull CharSequence text2, @NotNull List lineFragments, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator) { + @NotNull ProgressIndicator indicator) throws DiffTooBigException { List fineFragments = new ArrayList(lineFragments.size()); int tooBigChunksCount = 0; @@ -128,7 +128,7 @@ public class ComparisonManagerImpl extends ComparisonManager { public List compareWords(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator) { + @NotNull ProgressIndicator indicator) throws DiffTooBigException { return ByWord.compare(text1, text2, policy, indicator); } @@ -136,7 +136,7 @@ public class ComparisonManagerImpl extends ComparisonManager { public List compareChars(@NotNull CharSequence text1, @NotNull CharSequence text2, @NotNull ComparisonPolicy policy, - @NotNull ProgressIndicator indicator) { + @NotNull ProgressIndicator indicator) throws DiffTooBigException { if (policy == ComparisonPolicy.IGNORE_WHITESPACES) { return convertIntoFragments(ByChar.compareIgnoreWhitespaces(text1, text2, indicator)); }