Search in sources :

Example 1 with LoggingCommandLineConverter

use of org.gradle.internal.logging.LoggingCommandLineConverter in project gradle by gradle.

the class SetupTab method getLogLevelWrappers.

/**
     * This creates an array of wrapper objects suitable for passing to the constructor of the log level combo box.
     */
private Vector<LogLevelWrapper> getLogLevelWrappers() {
    Collection<LogLevel> collection = new LoggingCommandLineConverter().getLogLevels();
    Vector<LogLevelWrapper> wrappers = new Vector<LogLevelWrapper>();
    Iterator<LogLevel> iterator = collection.iterator();
    while (iterator.hasNext()) {
        LogLevel level = iterator.next();
        wrappers.add(new LogLevelWrapper(level));
    }
    Collections.sort(wrappers, new Comparator<LogLevelWrapper>() {

        public int compare(LogLevelWrapper o1, LogLevelWrapper o2) {
            return o1.toString().compareToIgnoreCase(o2.toString());
        }
    });
    return wrappers;
}
Also used : LoggingCommandLineConverter(org.gradle.internal.logging.LoggingCommandLineConverter) LogLevel(org.gradle.api.logging.LogLevel)

Aggregations

LogLevel (org.gradle.api.logging.LogLevel)1 LoggingCommandLineConverter (org.gradle.internal.logging.LoggingCommandLineConverter)1