// Path: brjs-core/src/main/java/org/bladerunnerjs/plugin/commands/core/VersionCommand.java
// public class VersionCommand extends JSAPArgsParsingCommandPlugin
// {
// 	// Note: ASCII art created using http://patorjk.com/software/taag/#p=display&h=1&f=Ivrit&t=%20%20%20%20BladeRunnerJS%20%20%20%20
// 	private static final String ASCII_ART_RESOURCE_PATH = "org/bladerunnerjs/core/plugin/command/core/bladerunner-ascii-art.txt";
// 	
// 	private BRJS brjs;
// 
// 	private Logger logger;
// 	
// 	@Override
// 	protected void configureArgsParser(JSAP argsParser) throws JSAPException {
// 		// do nothing
// 	}
// 	
// 	@Override
// 	public void setBRJS(BRJS brjs)
// 	{	
// 		this.brjs = brjs;
// 		this.logger = brjs.logger(this.getClass());
// 	}
// 	
// 	@Override
// 	public String getCommandName()
// 	{
// 		return "version";
// 	}
// 
// 	@Override
// 	public String getCommandDescription()
// 	{
// 		return "Displays the BladeRunnerJS version.";
// 	}
// 	
// 	@Override
// 	protected int doCommand(JSAPResult parsedArgs) throws CommandArgumentsException, CommandOperationException {
// 		try (InputStream asciiArtInputStream = getClass().getClassLoader().getResourceAsStream( ASCII_ART_RESOURCE_PATH )) {
// 			StringWriter asciiArtWriter = new StringWriter();
// 			IOUtils.copy(asciiArtInputStream, asciiArtWriter, "UTF-8");
// 			
// 			logger.println( brjs.versionInfo().toString() );
// 			logger.println("");
// 			logger.println(asciiArtWriter.toString());
// 			logger.println("");
// 		}
// 		catch(IOException e) {
// 			throw new CommandOperationException("error reading ascii art resource file", e);
// 		}
// 		
// 		return 0;
// 	}
// }


import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.bladerunnerjs.api.BRJS;
import org.bladerunnerjs.api.plugin.CommandPlugin;
import org.bladerunnerjs.plugin.commands.core.HelpCommand;
import org.bladerunnerjs.plugin.commands.core.VersionCommand;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;
package org.bladerunnerjs.plugin.utility;





public class CommandList
{
	private List<CommandPlugin> coreCommands = new ArrayList<>();
	private List<CommandPlugin> pluginCommands;
	
	public CommandList(BRJS brjs, List<CommandPlugin> pluginCommands)
	{
		this.pluginCommands = pluginCommands;
		
		CommandPlugin helpCommand = new HelpCommand();
// Path: brjs-core/src/main/java/org/bladerunnerjs/plugin/commands/core/VersionCommand.java
// public class VersionCommand extends JSAPArgsParsingCommandPlugin
// {
// 	// Note: ASCII art created using http://patorjk.com/software/taag/#p=display&h=1&f=Ivrit&t=%20%20%20%20BladeRunnerJS%20%20%20%20
// 	private static final String ASCII_ART_RESOURCE_PATH = "org/bladerunnerjs/core/plugin/command/core/bladerunner-ascii-art.txt";
// 	
// 	private BRJS brjs;
// 
// 	private Logger logger;
// 	
// 	@Override
// 	protected void configureArgsParser(JSAP argsParser) throws JSAPException {
// 		// do nothing
// 	}
// 	
// 	@Override
// 	public void setBRJS(BRJS brjs)
// 	{	
// 		this.brjs = brjs;
// 		this.logger = brjs.logger(this.getClass());
// 	}
// 	
// 	@Override
// 	public String getCommandName()
// 	{
// 		return "version";
// 	}
// 
// 	@Override
// 	public String getCommandDescription()
// 	{
// 		return "Displays the BladeRunnerJS version.";
// 	}
// 	
// 	@Override
// 	protected int doCommand(JSAPResult parsedArgs) throws CommandArgumentsException, CommandOperationException {
// 		try (InputStream asciiArtInputStream = getClass().getClassLoader().getResourceAsStream( ASCII_ART_RESOURCE_PATH )) {
// 			StringWriter asciiArtWriter = new StringWriter();
// 			IOUtils.copy(asciiArtInputStream, asciiArtWriter, "UTF-8");
// 			
// 			logger.println( brjs.versionInfo().toString() );
// 			logger.println("");
// 			logger.println(asciiArtWriter.toString());
// 			logger.println("");
// 		}
// 		catch(IOException e) {
// 			throw new CommandOperationException("error reading ascii art resource file", e);
// 		}
// 		
// 		return 0;
// 	}
// }


// Path: brjs-core/src/main/java/org/bladerunnerjs/plugin/utility/CommandList.java
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import org.bladerunnerjs.api.BRJS;
import org.bladerunnerjs.api.plugin.CommandPlugin;
import org.bladerunnerjs.plugin.commands.core.HelpCommand;
import org.bladerunnerjs.plugin.commands.core.VersionCommand;
import com.google.common.base.Predicate;
import com.google.common.collect.Collections2;

package org.bladerunnerjs.plugin.utility;





public class CommandList
{
	private List<CommandPlugin> coreCommands = new ArrayList<>();
	private List<CommandPlugin> pluginCommands;
	
	public CommandList(BRJS brjs, List<CommandPlugin> pluginCommands)
	{
		this.pluginCommands = pluginCommands;
		
		CommandPlugin helpCommand = new HelpCommand();
		CommandPlugin versionCommand = new VersionCommand();