Search in sources :

Example 1 with DiffIgnoredRangeProvider

use of com.intellij.diff.lang.DiffIgnoredRangeProvider in project intellij-community by JetBrains.

the class SmartTextDiffProvider method create.

@Nullable
public static TwosideTextDiffProvider create(@Nullable Project project, @NotNull ContentDiffRequest request, @NotNull TextDiffSettings settings, @NotNull Runnable rediff, @NotNull Disposable disposable) {
    DiffContent content1 = Side.LEFT.select(request.getContents());
    DiffContent content2 = Side.RIGHT.select(request.getContents());
    DiffIgnoredRangeProvider ignoredRangeProvider = getIgnoredRangeProvider(project, content1, content2);
    if (ignoredRangeProvider == null)
        return null;
    return new SmartTextDiffProvider(project, content1, content2, settings, rediff, disposable, ignoredRangeProvider);
}
Also used : DiffIgnoredRangeProvider(com.intellij.diff.lang.DiffIgnoredRangeProvider) DiffContent(com.intellij.diff.contents.DiffContent) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with DiffIgnoredRangeProvider

use of com.intellij.diff.lang.DiffIgnoredRangeProvider in project intellij-community by JetBrains.

the class SmartTextDiffProvider method createNoIgnore.

@Nullable
public static TwosideTextDiffProvider.NoIgnore createNoIgnore(@Nullable Project project, @NotNull ContentDiffRequest request, @NotNull TextDiffSettings settings, @NotNull Runnable rediff, @NotNull Disposable disposable) {
    DiffContent content1 = Side.LEFT.select(request.getContents());
    DiffContent content2 = Side.RIGHT.select(request.getContents());
    DiffIgnoredRangeProvider ignoredRangeProvider = getIgnoredRangeProvider(project, content1, content2);
    if (ignoredRangeProvider == null)
        return null;
    return new SmartTextDiffProvider.NoIgnore(project, content1, content2, settings, rediff, disposable, ignoredRangeProvider);
}
Also used : DiffIgnoredRangeProvider(com.intellij.diff.lang.DiffIgnoredRangeProvider) DiffContent(com.intellij.diff.contents.DiffContent) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

DiffContent (com.intellij.diff.contents.DiffContent)2 DiffIgnoredRangeProvider (com.intellij.diff.lang.DiffIgnoredRangeProvider)2 Nullable (org.jetbrains.annotations.Nullable)2