@Override public int complete(Session session, CommandLine commandLine, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); try { for (String connectionFactory : jmsService.connectionFactoryFileNames()) { delegate.getStrings().add(connectionFactory.replace("connectionfactory-", "").replace(".xml", "")); } } catch (Exception e) { // nothing to do } return delegate.complete(session, commandLine, candidates); }
@Override public int complete(String buffer, int cursor, List<String> candidates) { StringsCompleter delegate = new StringsCompleter(); try { for (String connectionFactory : jmsService.connectionFactoryFileNames()) { delegate.getStrings().add(connectionFactory.replace("connectionfactory-", "").replace(".xml", "")); } } catch (Exception e) { // nothing to do } return delegate.complete(buffer, cursor, candidates); }