Example usage for org.apache.commons.vfs.util Os OS_FAMILY_WINDOWS

List of usage examples for org.apache.commons.vfs.util Os OS_FAMILY_WINDOWS

Introduction

In this page you can find the example usage for org.apache.commons.vfs.util Os OS_FAMILY_WINDOWS.

Prototype

OsFamily OS_FAMILY_WINDOWS

To view the source code for org.apache.commons.vfs.util Os OS_FAMILY_WINDOWS.

Click Source Link

Document

All Windows based OSes.

Usage

From source file:org.sonatype.gshell.commands.vfs.EditCommand.java

private String getDefaultEditor() {
    if (Os.isFamily(Os.OS_FAMILY_WINDOWS)) {
        return "NOTEPAD";
    } else if (Os.isFamily(Os.OS_FAMILY_UNIX)) {
        if (System.getenv("DISPLAY") != null) {
            String tmp = System.getenv("XEDITOR");
            if (tmp != null) {
                return tmp;
            }/*from w ww  . j a  v  a  2  s  .co m*/
        }

        String tmp = System.getenv("EDITOR");
        if (tmp != null) {
            return tmp;
        }

    }

    throw new RuntimeException("Unable to determine the default editor command");
}