Changeset 731 for trunk/java-utils/src
- Timestamp:
- 08/31/12 12:03:53 (12 years ago)
- Location:
- trunk/java-utils/src/main/java/de/ugoe/cs/util/console
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java
r718 r731 297 297 return commandArray; 298 298 } 299 300 /** 301 * <p> 302 * Get a copy of the currently registered command packages. 303 * </p> 304 * 305 * @return currently registered command packages 306 */ 307 public List<String> getCommandPackages() { 308 List<String> commandPackageListCopy = new ArrayList<String>(commandPackageList); 309 commandPackageListCopy.add(0, defaultPackage); 310 return commandPackageListCopy; 311 } 299 312 } -
trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommands.java
r664 r731 27 27 Command[] commands = CommandExecuter.getInstance().getAvailableCommands(); 28 28 29 for (Command command : commands) { 30 Console.println(command.help()); 29 List<String> commandPackages = CommandExecuter.getInstance().getCommandPackages(); 30 31 for( String commandPackage : commandPackages ) { 32 Console.println(commandPackage); 33 for (Command command : commands) { 34 if( commandPackage.equals(command.getClass().getPackage().getName())) { 35 Console.println(" " + command.help()); 36 } 37 } 31 38 } 32 39 }
Note: See TracChangeset
for help on using the changeset viewer.