Search in sources :

Example 1 with MergeTool

use of com.intellij.openapi.diff.impl.mergeTool.MergeTool in project intellij-community by JetBrains.

the class DiffManagerImpl method getDiffTool.

@Override
public DiffTool getDiffTool() {
    DiffTool[] standardTools;
    // there is inner check in multiple tool for external viewers as well
    if (!ENABLE_FILES.value(myProperties) || !ENABLE_FOLDERS.value(myProperties) || !ENABLE_MERGE.value(myProperties)) {
        DiffTool[] embeddableTools = { INTERNAL_DIFF, new MergeTool(), BinaryDiffTool.INSTANCE };
        standardTools = new DiffTool[] { ExtCompareFolders.INSTANCE, ExtCompareFiles.INSTANCE, ExtMergeFiles.INSTANCE, new MultiLevelDiffTool(Arrays.asList(embeddableTools)), INTERNAL_DIFF, new MergeTool(), BinaryDiffTool.INSTANCE };
    } else {
        standardTools = new DiffTool[] { ExtCompareFolders.INSTANCE, ExtCompareFiles.INSTANCE, ExtMergeFiles.INSTANCE, INTERNAL_DIFF, new MergeTool(), BinaryDiffTool.INSTANCE };
    }
    if (myAdditionTools.isEmpty()) {
        return new CompositeDiffTool(standardTools);
    } else {
        List<DiffTool> allTools = new ArrayList<>(myAdditionTools);
        ContainerUtil.addAll(allTools, standardTools);
        return new CompositeDiffTool(allTools);
    }
}
Also used : ArrayList(java.util.ArrayList) DiffTool(com.intellij.openapi.diff.DiffTool) MergeTool(com.intellij.openapi.diff.impl.mergeTool.MergeTool)

Aggregations

DiffTool (com.intellij.openapi.diff.DiffTool)1 MergeTool (com.intellij.openapi.diff.impl.mergeTool.MergeTool)1 ArrayList (java.util.ArrayList)1