mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diff: cleanup
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user