Example usage for java.nio.file NotDirectoryException printStackTrace

List of usage examples for java.nio.file NotDirectoryException printStackTrace

Introduction

In this page you can find the example usage for java.nio.file NotDirectoryException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:de.prozesskraft.pramp.parts.PrampPartUi1.java

/**
 * determines all processes of a specific domain
 * @return a list of all installed domains sorted in alphabetical order
 *//*from  w ww.  ja  va2s . com*/
public ArrayList<String> getInstalledProcessNames(String domainName) {
    ArrayList<String> processes = new ArrayList<String>();
    String directoryPath = this.domainMainDir + "/" + domainName;
    try {
        processes = getSubDirectories(directoryPath);
    } catch (NotDirectoryException e) {
        System.err.println("not a directory: " + directoryPath);
        e.printStackTrace();
    }

    // sortieren
    Collections.sort(processes);

    // zentrale daten setzen
    einstellungen.setProcesses((String[]) processes.toArray(new String[processes.size()]));

    //      // in combo_box einfuegen
    //      combo_versions.setItems((String[]) versions.toArray(new String[versions.size()]));
    //      combo_versions.select(versions.size()-1);
    //      
    return processes;
}

From source file:de.prozesskraft.pramp.parts.PrampPartUi1.java

/**
 * determines all domains// w w w  .  j a va  2  s . c om
 * @return a list of all installed domains sorted in alphabetical order
 */
private ArrayList<String> detInstalledDomainNames() {
    ArrayList<String> domains = new ArrayList<String>();
    String directoryPath = this.domainMainDir;
    try {
        domains = getSubDirectories(directoryPath);
    } catch (NotDirectoryException e) {
        System.err.println("not a directory: " + directoryPath);
        e.printStackTrace();
    }

    ArrayList<String> domainsFiltered = new ArrayList<String>();
    // alle domains mit vorangestelltem "_" herausfiltern
    for (String actDomain : domains) {
        if (!actDomain.matches("^_.*$")) {
            System.out.println("kein fuehrendes _ bei " + actDomain);
            domainsFiltered.add(actDomain);
        }
    }

    // sortieren
    Collections.sort(domainsFiltered);

    // zentrale daten setzen
    einstellungen.setDomains((String[]) domainsFiltered.toArray(new String[domainsFiltered.size()]));

    return domainsFiltered;
}