Example usage for com.intellij.openapi.diff DiffContent getFile

List of usage examples for com.intellij.openapi.diff DiffContent getFile

Introduction

In this page you can find the example usage for com.intellij.openapi.diff DiffContent getFile.

Prototype

@Nullable
public abstract VirtualFile getFile();

Source Link

Usage

From source file:com.urswolfer.intellij.plugin.gerrit.ui.diff.CustomizableFrameDiffTool.java

License:Apache License

public static boolean canShowDiff(DiffRequest data) {
    DiffContent[] contents = data.getContents();
    if (contents.length != 2)
        return false;
    for (DiffContent content : contents) {
        if (content.isBinary())
            return false;
        VirtualFile file = content.getFile();
        if (file != null && file.isDirectory())
            return false;
    }//  w ww.  ja  v a2s  .  c  o m
    return true;
}