diff: cleanup

This commit is contained in:
Aleksey Pivovarov
2015-07-15 20:30:51 +03:00
parent 619a6012da
commit 956acd4625
@@ -160,14 +160,14 @@ public class DiffDrawUtil {
}
//
// Colors
// Impl
//
@NotNull
public static TextAttributes getTextAttributes(@NotNull final TextDiffType type,
@Nullable final Editor editor,
final boolean ignored,
final boolean showStripes) {
private static TextAttributes getTextAttributes(@NotNull final TextDiffType type,
@Nullable final Editor editor,
final boolean ignored,
final boolean showStripes) {
return new TextAttributes() {
@Override
public Color getBackgroundColor() {
@@ -182,8 +182,8 @@ public class DiffDrawUtil {
}
@NotNull
public static TextAttributes getStripeTextAttributes(@NotNull final TextDiffType type,
@NotNull final Editor editor) {
private static TextAttributes getStripeTextAttributes(@NotNull final TextDiffType type,
@NotNull final Editor editor) {
return new TextAttributes() {
@Override
public Color getErrorStripeColor() {
@@ -192,6 +192,17 @@ public class DiffDrawUtil {
};
}
private static void installGutterRenderer(@NotNull RangeHighlighter highlighter,
@NotNull TextDiffType type,
boolean ignoredFoldingOutline) {
highlighter.setLineMarkerRenderer(new DiffLineMarkerRenderer(type, ignoredFoldingOutline));
}
private static void installEmptyRangeRenderer(@NotNull RangeHighlighter highlighter,
@NotNull TextDiffType type) {
highlighter.setCustomRenderer(new DiffEmptyHighlighterRenderer(type));
}
//
// Highlighters
//
@@ -240,21 +251,6 @@ public class DiffDrawUtil {
return highlighter;
}
public static void installGutterRenderer(@NotNull RangeHighlighter highlighter,
@NotNull TextDiffType type) {
installGutterRenderer(highlighter, type, false);
}
public static void installGutterRenderer(@NotNull RangeHighlighter highlighter,
@NotNull TextDiffType type,
boolean ignoredFoldingOutline) {
highlighter.setLineMarkerRenderer(new DiffLineMarkerRenderer(type, ignoredFoldingOutline));
}
public static void installEmptyRangeRenderer(@NotNull RangeHighlighter highlighter, @NotNull TextDiffType type) {
highlighter.setCustomRenderer(new DiffEmptyHighlighterRenderer(type));
}
@NotNull
public static RangeHighlighter createLineMarker(@NotNull Editor editor, int line, @NotNull final TextDiffType type,
@NotNull final SeparatorPlacement placement) {