From bebde7a4e5dd428ff2d8c2f9881a02957af6fbf9 Mon Sep 17 00:00:00 2001 From: Alexander Kass Date: Tue, 17 Mar 2015 15:09:37 +0300 Subject: [PATCH] DBE: First version of table comparison --- .../com/intellij/diff/util/DiffDividerDrawUtil.java | 10 +++++----- .../src/com/intellij/diff/util/DiffDrawUtil.java | 6 +++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java b/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java index 64a8ba473a46..0666518443b6 100644 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java +++ b/platform/diff-impl/src/com/intellij/diff/util/DiffDividerDrawUtil.java @@ -231,7 +231,7 @@ public class DiffDividerDrawUtil { myColor = color; } - private void paint(Graphics2D g, int width, boolean paintBorder, boolean curve) { + public void paint(Graphics2D g, int width, boolean paintBorder, boolean curve) { // we need this shift, because editor background highlight is painted in range "Y(line) - 1 .. Y(line + 1) - 1" int startY1 = myStart1 - 1; int endY1 = myEnd1 - 1; @@ -249,7 +249,7 @@ public class DiffDividerDrawUtil { } } - private void paintOnScrollbar(Graphics2D g, int width) { + public void paintOnScrollbar(Graphics2D g, int width) { int startY = myStart1 - 1; int endY = myEnd1 - 1; int height = endY - startY; @@ -288,11 +288,11 @@ public class DiffDividerDrawUtil { myEnd2 = end2; } - private void paint(Graphics2D g, int width) { + public void paint(Graphics2D g, int width) { DiffDrawUtil.drawConnectorLineSeparator(g, 0, width, myStart1, myEnd1, myStart2, myEnd2); } - private void paintOnScrollbar(Graphics2D g, int width) { + public void paintOnScrollbar(Graphics2D g, int width) { DiffDrawUtil.drawConnectorLineSeparator(g, 0, width, myStart1, myEnd1, myStart1, myEnd1); } @@ -301,7 +301,7 @@ public class DiffDividerDrawUtil { } } - private static class Interval { + public static class Interval { public final int startLine; public final int endLine; diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffDrawUtil.java b/platform/diff-impl/src/com/intellij/diff/util/DiffDrawUtil.java index d763e54ce2f0..12ea0b3b038a 100644 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffDrawUtil.java +++ b/platform/diff-impl/src/com/intellij/diff/util/DiffDrawUtil.java @@ -42,7 +42,11 @@ public class DiffDrawUtil { @NotNull public static Color getDividerColor(@Nullable Editor editor) { - EditorColorsScheme scheme = editor != null ? editor.getColorsScheme() : EditorColorsManager.getInstance().getGlobalScheme(); + return getDividerColorFromScheme(editor != null ? editor.getColorsScheme() : EditorColorsManager.getInstance().getGlobalScheme()); + } + + @NotNull + public static Color getDividerColorFromScheme(@NotNull EditorColorsScheme scheme) { Color gutterBackground = scheme.getColor(EditorColors.GUTTER_BACKGROUND); if (gutterBackground == null) { gutterBackground = EditorColors.GUTTER_BACKGROUND.getDefaultColor();