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

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

Introduction

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

Prototype

void show(DiffRequest request);

Source Link

Document

Opens window to compare contents.

Usage

From source file:jetbrains.communicator.idea.DiffWindowOpener.java

License:Apache License

public void showDiff() {
    DiffTool diffTool = DiffManager.getInstance().getIdeaDiffTool();
    SimpleDiffRequest diffRequest = new SimpleDiffRequest(myProject, "Diff for " + myVFile.getDisplayName());
    diffRequest.addHint(DiffTool.HINT_SHOW_NOT_MODAL_DIALOG);

    Document localDocument = FileDocumentManager.getInstance().getDocument(myVirtualFile);

    diffRequest.setContentTitles("My Version", myRemoteUser.getDisplayName() + "'s Version");
    diffRequest.setContents(new DocumentContent(localDocument), new SimpleContent(myRemoteText));

    diffTool.show(diffRequest);
}