public static void success(final ShellPrintWriter writer, final String message) { writer.print(ShellColor.GREEN, "***SUCCESS*** "); writer.println(message); }
public static void info(final ShellPrintWriter writer, final String message) { writer.print(ShellColor.YELLOW, "***INFO*** "); writer.println(message); }
public static void error(final ShellPrintWriter writer, final String message) { writer.print(ShellColor.RED, "***ERROR*** "); writer.println(message); }
public static void warn(final ShellPrintWriter writer, final String message) { writer.print(ShellColor.MAGENTA, "***WARNING*** "); writer.println(message); } }
@DefaultCommand public void listProperties() { Map<String, Object> properties = forge.getProperties(); for (Entry<String, Object> entry : properties.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); writer.print(key + "="); if (value != null) { writer.print(value.toString()); } writer.println(); } } }
@DefaultCommand public void listProperties() { Iterator<?> properties = config.getKeys(); while (properties.hasNext()) { Object key = properties.next(); if (key != null) { writer.print(ShellColor.BOLD, key.toString()); writer.print("="); for (ConfigurationScope scope : ConfigurationScope.values()) { Configuration scoped = config.getScopedConfiguration(scope); if (scoped != null) { Object value = scoped.getProperty(key.toString()); writer.print(ShellColor.YELLOW, scope.name() + ": "); if (value != null) { writer.print("[" + value.toString() + "] "); } else writer.print("[] "); } } writer.println(); } } }