コード例 #1
0
 protected List<String> fetchCandidates(String buffer) {
   List<String> candidates = new ArrayList<String>();
   try {
     ctx.parseCommandLine(buffer);
   } catch (CommandFormatException e) {
     //            System.out.println(ctx.getPrefixFormatter().format(ctx.getPrefix()) + ", '" +
     // buffer + "'");
     //            e.printStackTrace();
     return Collections.emptyList();
   }
   completer.complete(ctx, buffer, 0, candidates);
   return candidates;
 }
コード例 #2
0
 protected void init() {
   ctx = new MockCommandContext();
   ctx.setOperationCandidatesProvider(new MockOperationCandidatesProvider(root));
   completer = new OperationRequestCompleter();
 }