Changeset 664 for trunk


Ignore:
Timestamp:
08/28/12 13:33:23 (12 years ago)
Author:
sherbold
Message:
  • modified Command.help(): the help now returns a string with its usage instead of writing directly to the console
  • modified listCommands: now writes the help string of each command instead of just the name; this way, the parameters are displayed directly
  • moved listCommands from quest-ui-core to java-utils
Location:
trunk
Files:
1 deleted
46 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/java-utils-test/src/test/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommandsTest.java

    r663 r664  
    44// Creation  : 2012 by pharms 
    55// Copyright : Patrick Harms, 2012 
    6 package de.ugoe.cs.quest.ui.commands; 
     6package de.ugoe.cs.util.console.defaultcommands; 
    77 
    88import static org.junit.Assert.*; 
     
    1616import de.ugoe.cs.util.console.CommandExecuter; 
    1717import de.ugoe.cs.util.console.Console; 
     18import de.ugoe.cs.util.console.defaultcommands.CMDlistCommands; 
    1819import de.ugoe.cs.util.console.listener.IOutputListener; 
    1920 
  • trunk/java-utils-test/src/test/java/de/ugoe/cs/util/console/mock/commands/CMDmockCommand.java

    r319 r664  
    2323 
    2424        @Override 
    25         public void help() { 
    26                 Console.println("mock command: help"); 
     25        public String help() { 
     26                return "mock command: help"; 
    2727        } 
    2828 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/Command.java

    r175 r664  
    2727        /** 
    2828         * <p> 
    29          * Sends information about how to use a command to the console. 
     29         * Returns a string the contains information about how to use the command. 
    3030         * </p> 
     31         * @return help string 
    3132         */ 
    32         public void help(); 
     33        public String help(); 
    3334} 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/CommandExecuter.java

    r661 r664  
    1010import java.util.ArrayList; 
    1111import java.util.Arrays; 
     12import java.util.Collections; 
     13import java.util.Comparator; 
    1214import java.util.Enumeration; 
    1315import java.util.List; 
     
    138140            } 
    139141            catch (InvalidParameterException e) { 
    140                 cmd.help(); 
     142                Console.println("Usage: " + cmd.help()); 
    141143            } 
    142144        } 
     
    181183     * @return an array containing the names of the available commands. 
    182184     */ 
    183     public String[] getAvailableCommands() { 
    184         List<String> commands = new ArrayList<String>(); 
     185    public Command[] getAvailableCommands() { 
     186        List<Command> commands = new ArrayList<Command>(); 
    185187        List<String> packages = new ArrayList<String>(); 
    186188        packages.addAll(commandPackageList); 
     
    251253        } 
    252254         
     255        Collections.sort(classNames, new Comparator<String>() { 
     256            @Override 
     257            public int compare(String arg1, String arg2) { 
     258                String str1 = arg1.substring(arg1.lastIndexOf('.') + cmdPrefix.length() + 1); 
     259                String str2 = arg2.substring(arg2.lastIndexOf('.') + cmdPrefix.length() + 1); 
     260                return str1.compareTo(str2); 
     261            } 
     262             
     263        }); 
    253264        for (String className : classNames) { 
    254265            String commandStr = 
     
    261272                // class may still be inner classes. Therefore load the command, to 
    262273                // see if it is really available and a command. 
    263                 if (loadCMD(className) != null) { 
    264                     commands.add(commandStr); 
     274                Command cmd = loadCMD(className); 
     275                if (cmd != null) { 
     276                    commands.add(cmd); 
    265277                } 
    266278            } 
    267279        } 
    268280         
    269         String[] commandArray = commands.toArray(new String[commands.size()]); 
    270         Arrays.sort(commandArray); 
     281        Command[] commandArray = commands.toArray(new Command[commands.size()]); 
    271282        return commandArray; 
    272283    } 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexec.java

    r639 r664  
    6363         */ 
    6464        @Override 
    65         public void help() { 
    66                 Console.println("Usage: exec <filename>"); 
     65        public String help() { 
     66                return "exec <filename>"; 
    6767        } 
    6868} 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDexit.java

    r175 r664  
    44 
    55import de.ugoe.cs.util.console.Command; 
    6 import de.ugoe.cs.util.console.Console; 
    76 
    87/** 
     
    2221         */ 
    2322        @Override 
    24         public void help() { 
    25                 Console.println("Usage: exit"); 
     23        public String help() { 
     24                return "exit"; 
    2625        } 
    2726 
  • trunk/java-utils/src/main/java/de/ugoe/cs/util/console/defaultcommands/CMDlistCommands.java

    r663 r664  
    11 
    2 package de.ugoe.cs.quest.ui.commands; 
     2package de.ugoe.cs.util.console.defaultcommands; 
    33 
    44import java.util.List; 
     
    2525    @Override 
    2626    public void run(List<Object> parameters) { 
    27         String[] commands = CommandExecuter.getInstance().getAvailableCommands(); 
     27        Command[] commands = CommandExecuter.getInstance().getAvailableCommands(); 
    2828 
    29         for (String command : commands) { 
    30             Console.println(command); 
     29        for (Command command : commands) { 
     30            Console.println(command.help()); 
    3131        } 
    3232    } 
     
    3838     */ 
    3939    @Override 
    40     public void help() { 
    41         Console.println("Usage: listCommands"); 
     40    public String help() { 
     41        return "listCommands"; 
    4242    } 
    4343 
  • trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/commands/CMDefgTestCasesToSequences.java

    r639 r664  
    7878         */ 
    7979        @Override 
    80         public void help() { 
    81                 Console.println("Usage: efgTestCasesToSequences <folder> <sequencesName> {<efgFileName>}"); 
     80        public String help() { 
     81                return "efgTestCasesToSequences <folder> <sequencesName> {<efgFileName>}"; 
    8282        } 
    8383 
  • trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/commands/CMDefgToDFA.java

    r434 r664  
    88import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton; 
    99import de.ugoe.cs.util.console.Command; 
    10 import de.ugoe.cs.util.console.Console; 
    1110 
    1211/** 
     
    4948         */ 
    5049        @Override 
    51         public void help() { 
    52                 Console.println("Usage: efgToDFA <filename> <modelname>"); 
     50        public String help() { 
     51                return "efgToDFA <filename> <modelname>"; 
    5352        } 
    5453 
  • trunk/quest-plugin-guitar/src/main/java/de/ugoe/cs/quest/plugin/guitar/commands/CMDefgToMM.java

    r434 r664  
    88import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel; 
    99import de.ugoe.cs.util.console.Command; 
    10 import de.ugoe.cs.util.console.Console; 
    1110 
    1211/** 
     
    4948         */ 
    5049        @Override 
    51         public void help() { 
    52                 Console.println("Usage: efgToMM <filename> <modelname>"); 
     50        public String help() { 
     51                return "efgToMM <filename> <modelname>"; 
    5352        } 
    5453 
  • trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/commands/CMDparseDirJFC.java

    r655 r664  
    7676     */ 
    7777    @Override 
    78     public void help() { 
    79         Console.println("Usage: parseDirJFC <path> {<sequencesName>}"); 
     78    public String help() { 
     79        return "parseDirJFC <path> {<sequencesName>}"; 
    8080    } 
    8181 
  • trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/commands/CMDparseJFC.java

    r573 r664  
    1010import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    1111import de.ugoe.cs.util.console.Command; 
    12 import de.ugoe.cs.util.console.Console; 
    1312 
    1413/** 
     
    5857         */ 
    5958        @Override 
    60         public void help() { 
    61                 Console.println("Usage: parseJFC <filename> {<sequencesName>}"); 
     59        public String help() { 
     60                return "parseJFC <filename> {<sequencesName>}"; 
    6261        } 
    6362 
  • trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/commands/CMDpreprocessDirJFC.java

    r639 r664  
    114114         */ 
    115115        @Override 
    116         public void help() { 
    117                 Console.println("Usage: preprocessDirJFC <sourcePath> <targetPath>"); 
     116        public String help() { 
     117                return "preprocessDirJFC <sourcePath> <targetPath>"; 
    118118        } 
    119119 
  • trunk/quest-plugin-jfc/src/main/java/de/ugoe/cs/quest/plugin/jfc/commands/CMDpreprocessJFC.java

    r641 r664  
    9292         */ 
    9393        @Override 
    94         public void help() { 
    95                 Console.println("Usage: preprocessJFC <sourceFile> <targetFile>"); 
     94        public String help() { 
     95                return "preprocessJFC <sourceFile> <targetFile>"; 
    9696        } 
    9797 
  • trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/commands/CMDconvertDirToXml.java

    r434 r664  
    2626         */ 
    2727        @Override 
    28         public void help() { 
    29                 Console.println("Usage: convertToXml <sourceFolder> <targetFile> {<base64>}"); 
     28        public String help() { 
     29                return "convertDirToXml <sourceFolder> <targetFile> {<base64>}"; 
    3030        } 
    3131 
  • trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/commands/CMDconvertToXml.java

    r434 r664  
    2626         */ 
    2727        @Override 
    28         public void help() { 
    29                 Console.println("Usage: convertToXml <sourceFile> <targetFile> {<base64>}"); 
     28        public String help() { 
     29                return "convertToXml <sourceFile> <targetFile> {<base64>}"; 
    3030        } 
    3131 
  • trunk/quest-plugin-mfc/src/main/java/de/ugoe/cs/quest/plugin/mfc/commands/CMDparseXML.java

    r655 r664  
    1111import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    1212import de.ugoe.cs.util.console.Command; 
    13 import de.ugoe.cs.util.console.Console; 
    1413 
    1514/** 
     
    2928     */ 
    3029    @Override 
    31     public void help() { 
    32         Console.println("Usage: parseXML <filename> {<sequencesName>} {<countMessageOccurences>}"); 
     30    public String help() { 
     31        return "parseXML <filename> {<sequencesName>} {<countMessageOccurences>}"; 
    3332    } 
    3433 
  • trunk/quest-plugin-php/src/main/java/de/ugoe/cs/quest/plugin/php/commands/CMDloadWebSequences.java

    r554 r664  
    111111         */ 
    112112        @Override 
    113         public void help() { 
    114                 Console.println("Usage: loadWebSequences <filename> <sequencesName> {<serverUrl>} {<timeout> <minSessionLength> <maxSessionLength>} {<generateFrequentUsers> <frequentUserThreshold>}"); 
     113        public String help() { 
     114                return "loadWebSequences <filename> <sequencesName> {<serverUrl>} {<timeout> <minSessionLength> <maxSessionLength>} {<generateFrequentUsers> <frequentUserThreshold>}"; 
    115115        } 
    116116 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDcalcCoverage.java

    r547 r664  
    135135         */ 
    136136        @Override 
    137         public void help() { 
    138                 Console.println("Usage: calcCoverage <modelname> <observedSequences> [sequenceNames] <minCovLength> <maxCovLength>"); 
     137        public String help() { 
     138                return "calcCoverage <modelname> <observedSequences> [sequenceNames] <minCovLength> <maxCovLength>"; 
    139139        } 
    140140 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDcalcEntropy.java

    r434 r664  
    2626         */ 
    2727        @Override 
    28         public void help() { 
    29                 Console.println("Usage: calcEntropy <modelname>"); 
     28        public String help() { 
     29                return "calcEntropy <modelname>"; 
    3030        } 
    3131 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDdeleteObject.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109 
    1110/** 
     
    2524         */ 
    2625        @Override 
    27         public void help() { 
    28                 Console.println("Usage: deleteObject <objectname>"); 
     26        public String help() { 
     27                return "deleteObject <objectname>"; 
    2928        } 
    3029 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDflattenModel.java

    r434 r664  
    1010import de.ugoe.cs.quest.usageprofiles.ModelFlattener; 
    1111import de.ugoe.cs.util.console.Command; 
    12 import de.ugoe.cs.util.console.Console; 
    1312 
    1413/** 
     
    6766         */ 
    6867        @Override 
    69         public void help() { 
    70                 Console.println("Usage: flattenModel <modelname> <modelname_flattened>"); 
     68        public String help() { 
     69                return "flattenModel <modelname> <modelname_flattened>"; 
    7170        } 
    7271} 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateFixedLengthSequences.java

    r547 r664  
    8383         */ 
    8484        @Override 
    85         public void help() { 
    86                 Console.println("Usage: generateFixedLengthSequences <modelname> <sequencesName> <minlenght> <maxlength> {<all>} {<numSequences>} {<validEnd>}"); 
     85        public String help() { 
     86                return "generateFixedLengthSequences <modelname> <sequencesName> <minlenght> <maxlength> {<all>} {<numSequences>} {<validEnd>}"; 
    8787        } 
    8888 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateGreedy.java

    r639 r664  
    174174         */ 
    175175        @Override 
    176         public void help() { 
    177                 Console.println("generateGreedy <modelname> <sequencesName> <minLength> <maxLength> <coverageDepth> <desiredCoverage> {<validEnd>}"); 
     176        public String help() { 
     177                return "generateGreedy <modelname> <sequencesName> <minLength> <maxLength> <coverageDepth> <desiredCoverage> {<validEnd>}"; 
    178178        } 
    179179 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateHybrid.java

    r547 r664  
    9292         */ 
    9393        @Override 
    94         public void help() { 
    95                 Console.println("Usage: generateHybrid <modelname> <sequencesName> <lenght> <maxlengthAll> <numSequences> {<validEnd>}"); 
     94        public String help() { 
     95                return "generateHybrid <modelname> <sequencesName> <lenght> <maxlengthAll> <numSequences> {<validEnd>}"; 
    9696        } 
    9797 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateRandomReplay.java

    r641 r664  
    3030         */ 
    3131        @Override 
    32         public void help() { 
    33                 Console.println("Usage: generateRandomReplay <modelName> <filename> {<numSessions>}"); 
     32        public String help() { 
     33                return "generateRandomReplay <modelName> <filename> {<numSessions>}"; 
    3434        } 
    3535 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateRandomSequences.java

    r547 r664  
    8989         */ 
    9090        @Override 
    91         public void help() { 
    92                 Console.println("Usage: generateRandomSequenecs <modelName> <sequencesName> <numSessions> <minLength> <maxLength> {<maxIter>} {<validEnd>}"); 
     91        public String help() { 
     92                return "generateRandomSequenecs <modelName> <sequencesName> <numSessions> <minLength> <maxLength> {<maxIter>} {<validEnd>}"; 
    9393        } 
    9494 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDgenerateReplayfile.java

    r547 r664  
    1111import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    1212import de.ugoe.cs.util.console.Command; 
    13 import de.ugoe.cs.util.console.Console; 
    1413 
    1514/** 
     
    2928         */ 
    3029        @Override 
    31         public void help() { 
    32                 Console.println("Usage: generateReplayfile <filename> <sequences>"); 
     30        public String help() { 
     31                return "generateReplayfile <filename> <sequences>"; 
    3332        } 
    3433 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDlistSymbols.java

    r434 r664  
    6767         */ 
    6868        @Override 
    69         public void help() { 
    70                 Console.println("Usage: listStates <modelName> {<sort>}"); 
     69        public String help() { 
     70                return "listStates <modelName> {<sort>}"; 
    7171        } 
    7272 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDload.java

    r434 r664  
    5555         */ 
    5656        @Override 
    57         public void help() { 
    58                 Console.println("Usage: load <filename>"); 
     57        public String help() { 
     58                return "load <filename>"; 
    5959        } 
    6060 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDloadObject.java

    r434 r664  
    6363         */ 
    6464        @Override 
    65         public void help() { 
    66                 Console.println("Usage: loadObject <filename> <objectName>"); 
     65        public String help() { 
     66                return "loadObject <filename> <objectName>"; 
    6767        } 
    6868 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDmodelSize.java

    r434 r664  
    5757         */ 
    5858        @Override 
    59         public void help() { 
    60                 Console.println("Usage: modelSize <modelName>"); 
     59        public String help() { 
     60                return "modelSize <modelName>"; 
    6161        } 
    6262 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDprintDot.java

    r434 r664  
    2727         */ 
    2828        @Override 
    29         public void help() { 
    30                 Console.println("Usage: printDot <modelname>"); 
     29        public String help() { 
     30                return "printDot <modelname>"; 
    3131        } 
    3232 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDprintTrieDot.java

    r434 r664  
    2828         */ 
    2929        @Override 
    30         public void help() { 
    31                 Console.println("Usage: printTreeDot <modelname>"); 
     30        public String help() { 
     31                return "printTreeDot <modelname>"; 
    3232        } 
    3333 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDsave.java

    r434 r664  
    5353         */ 
    5454        @Override 
    55         public void help() { 
    56                 Console.println("Usage: save <filename>"); 
     55        public String help() { 
     56                return "save <filename>"; 
    5757        } 
    5858 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDsaveObject.java

    r434 r664  
    6464         */ 
    6565        @Override 
    66         public void help() { 
    67                 Console.println("Usage: saveObject <filename> <objectName>"); 
     66        public String help() { 
     67                return "saveObject <filename> <objectName>"; 
    6868        } 
    6969 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDsequenceStatistics.java

    r547 r664  
    7777         */ 
    7878        @Override 
    79         public void help() { 
    80                 Console.println("Usage: sequenceStatistics <sequencesName>"); 
     79        public String help() { 
     80                return "sequenceStatistics <sequencesName>"; 
    8181        } 
    8282 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDshowMarkovModel.java

    r434 r664  
    1616import de.ugoe.cs.quest.usageprofiles.FirstOrderMarkovModel.MarkovEdge; 
    1717import de.ugoe.cs.util.console.Command; 
    18 import de.ugoe.cs.util.console.Console; 
     18import edu.uci.ics.jung.algorithms.layout.ISOMLayout; 
    1919import edu.uci.ics.jung.algorithms.layout.Layout; 
    20 import edu.uci.ics.jung.algorithms.layout.ISOMLayout; 
    2120import edu.uci.ics.jung.graph.Graph; 
    2221import edu.uci.ics.jung.visualization.BasicVisualizationServer; 
     
    4039         */ 
    4140        @Override 
    42         public void help() { 
    43                 Console.println("Usage: showMarkovModel <modelName> {<showNodeNames>}"); 
     41        public String help() { 
     42                return "showMarkovModel <modelName> {<showNodeNames>}"; 
    4443        } 
    4544 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDshowTimer.java

    r639 r664  
    5555         */ 
    5656        @Override 
    57         public void help() { 
    58                 Console.println("Usage: showTimer <timerName>"); 
     57        public String help() { 
     58                return "showTimer <timerName>"; 
    5959        } 
    6060 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDshowTrie.java

    r434 r664  
    1414import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    1515import de.ugoe.cs.quest.usageprofiles.Trie; 
    16 import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    1716import de.ugoe.cs.quest.usageprofiles.Trie.Edge; 
    1817import de.ugoe.cs.quest.usageprofiles.Trie.TrieVertex; 
     18import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    1919import de.ugoe.cs.util.console.Command; 
    20 import de.ugoe.cs.util.console.Console; 
    2120import edu.uci.ics.jung.algorithms.layout.Layout; 
    2221import edu.uci.ics.jung.algorithms.layout.TreeLayout; 
     
    4241         */ 
    4342        @Override 
    44         public void help() { 
    45                 Console.println("Usage: showTrie <modelName>"); 
     43        public String help() { 
     44                return "showTrie <modelName>"; 
    4645        } 
    4746 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDstartFileListener.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109import de.ugoe.cs.util.console.FileOutputListener; 
    1110 
     
    4746         */ 
    4847        @Override 
    49         public void help() { 
    50                 Console.println("Usage: startFileListener <filename>"); 
     48        public String help() { 
     49                return "startFileListener <filename>"; 
    5150        } 
    5251 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDstartTimer.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109 
    1110/** 
     
    4443         */ 
    4544        @Override 
    46         public void help() { 
    47                 Console.println("Usage: startTimer <timerName>"); 
     45        public String help() { 
     46                return "startTimer <timerName>"; 
    4847        } 
    4948 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDstopFileListener.java

    r434 r664  
    77import de.ugoe.cs.quest.ui.GlobalDataContainer; 
    88import de.ugoe.cs.util.console.Command; 
    9 import de.ugoe.cs.util.console.Console; 
    109import de.ugoe.cs.util.console.FileOutputListener; 
    1110 
     
    4443 
    4544        @Override 
    46         public void help() { 
    47                 Console.println("Command: stopFileListener <filename>"); 
     45        public String help() { 
     46                return "stopFileListener <filename>"; 
    4847 
    4948        } 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDtrainDFA.java

    r434 r664  
    66import de.ugoe.cs.quest.usageprofiles.DeterministicFiniteAutomaton; 
    77import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    8 import de.ugoe.cs.util.console.Console; 
    98 
    109/** 
     
    2423         */ 
    2524        @Override 
    26         public void help() { 
    27                 Console.println("Usage: trainDFA <modelName> <sequencesName>"); 
     25        public String help() { 
     26                return "trainDFA <modelName> <sequencesName>"; 
    2827        } 
    2928 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDtrainMarkovModel.java

    r434 r664  
    77import de.ugoe.cs.quest.usageprofiles.HighOrderMarkovModel; 
    88import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    9 import de.ugoe.cs.util.console.Console; 
    109 
    1110/** 
     
    3231         */ 
    3332        @Override 
    34         public void help() { 
    35                 Console.println("Usage: trainMarkovModel <modelName> <sequencesName> {<order>}"); 
     33        public String help() { 
     34                return "trainMarkovModel <modelName> <sequencesName> {<order>}"; 
    3635        } 
    3736 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDtrainPPM.java

    r434 r664  
    66import de.ugoe.cs.quest.usageprofiles.PredictionByPartialMatch; 
    77import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    8 import de.ugoe.cs.util.console.Console; 
    98 
    109/** 
     
    4544         */ 
    4645        @Override 
    47         public void help() { 
    48                 Console.println("Usage: trainPPM <modelName> <sequencesName> <probEscape> <maxOrder> {<minOrder>}"); 
     46        public String help() { 
     47                return "trainPPM <modelName> <sequencesName> <probEscape> <maxOrder> {<minOrder>}"; 
    4948        } 
    5049 
  • trunk/quest-ui-core/src/main/java/de/ugoe/cs/quest/ui/commands/CMDupdateModel.java

    r547 r664  
    1111import de.ugoe.cs.quest.usageprofiles.TrieBasedModel; 
    1212import de.ugoe.cs.util.console.Command; 
    13 import de.ugoe.cs.util.console.Console; 
    1413 
    1514/** 
     
    7473         */ 
    7574        @Override 
    76         public void help() { 
    77                 Console.println("Usage: updateModel <modelname> <sequencesName>"); 
     75        public String help() { 
     76                return "updateModel <modelname> <sequencesName>"; 
    7877        } 
    7978 
  • trunk/quest-ui-swt/src/main/java/de/ugoe/cs/quest/ui/swt/commands/CMDshowSequences.java

    r655 r664  
    1212import de.ugoe.cs.quest.ui.swt.SequencesDialog; 
    1313import de.ugoe.cs.util.console.Command; 
    14 import de.ugoe.cs.util.console.Console; 
    1514 
    1615/** 
     
    2928     */ 
    3029    @Override 
    31     public void help() { 
    32         Console.println("Usage: showSequences <sequencesName>"); 
     30    public String help() { 
     31        return "showSequences <sequencesName>"; 
    3332    } 
    3433 
Note: See TracChangeset for help on using the changeset viewer.