Search in sources :

Example 1 with ObservableTreeSet

use of com.eden.orchid.utilities.ObservableTreeSet in project Orchid by JavaEden.

the class ListResourceSourcesTask method run.

@Override
public void run() {
    Clog.logger(OrchidTasks.loggerKey, "" + "#{ $0 | fg('cyan') }[Priority]#{$0 |reset}" + "#{ $0 | fg('magenta') }[Source]#{$0 |reset}" + "");
    Clog.logger(OrchidTasks.loggerKey, "------------------------------------------------------------------------------------");
    Clog.logger(OrchidTasks.loggerKey, "------------------------------------------------------------------------------------");
    for (OrchidResourceSource source : new ObservableTreeSet<>(sources)) {
        String message;
        if (source.getPriority() < 0) {
            message = "#{ $0 | fg('red') }[#{$1}][#{$2}]";
            message += "(inactive)#{$0 |reset}";
        } else {
            message = "#{ $0 | fg('cyan') }[#{$1}]#{$0 |reset}";
            message += "#{ $0 | fg('magenta') }[#{$2}]#{$0 |reset}";
        }
        Clog.logger(OrchidTasks.loggerKey, message, new Object[] { source.getPriority(), source.getClass().getName() });
    }
}
Also used : ObservableTreeSet(com.eden.orchid.utilities.ObservableTreeSet) OrchidResourceSource(com.eden.orchid.api.resources.resourceSource.OrchidResourceSource)

Aggregations

OrchidResourceSource (com.eden.orchid.api.resources.resourceSource.OrchidResourceSource)1 ObservableTreeSet (com.eden.orchid.utilities.ObservableTreeSet)1