Example usage for com.intellij.openapi.diff DiffTool HINT_DO_NOT_IGNORE_WHITESPACES

List of usage examples for com.intellij.openapi.diff DiffTool HINT_DO_NOT_IGNORE_WHITESPACES

Introduction

In this page you can find the example usage for com.intellij.openapi.diff DiffTool HINT_DO_NOT_IGNORE_WHITESPACES.

Prototype

Object HINT_DO_NOT_IGNORE_WHITESPACES

To view the source code for com.intellij.openapi.diff DiffTool HINT_DO_NOT_IGNORE_WHITESPACES.

Click Source Link

Usage

From source file:com.intellij.execution.testframework.stacktrace.DiffHyperlink.java

License:Apache License

public void openDiff(final Project project) {
    String expectedTitle = ExecutionBundle.message("diff.content.expected.title");
    final DiffContent expectedContent;
    final VirtualFile vFile;
    if (myFilePath != null && (vFile = LocalFileSystem.getInstance().findFileByPath(myFilePath)) != null) {
        expectedContent = DiffContent.fromFile(project, vFile);
        expectedTitle += " (" + vFile.getPresentableUrl() + ")";
    } else/*  w w  w.  j  a  v a2  s.  c  o m*/
        expectedContent = new SimpleContent(myExpected);
    final SimpleDiffRequest diffData = new SimpleDiffRequest(project, getTitle());
    diffData.setContents(expectedContent, new SimpleContent(myActual));
    diffData.setContentTitles(expectedTitle, ExecutionBundle.message("diff.content.actual.title"));
    diffData.addHint(DiffTool.HINT_SHOW_FRAME);
    diffData.addHint(DiffTool.HINT_DO_NOT_IGNORE_WHITESPACES);
    diffData.setGroupKey("#com.intellij.execution.junit2.states.ComparisonFailureState$DiffDialog");
    DiffManager.getInstance().getIdeaDiffTool().show(diffData);
}