Package org.apache.karaf.shell.support.completers

Examples of org.apache.karaf.shell.support.completers.StringsCompleter.complete()


                delegate.getStrings().add(repository.getName());
            }
        } catch (Exception e) {
            // Ignore
        }
        return delegate.complete(session, commandLine, candidates);
    }

}
View Full Code Here


                }
            }
        } catch (Exception e) {
            // Ignore
        }
        return delegate.complete(session, commandLine, candidates);
    }

    /**
     * Method for filtering features.
     *
 
View Full Code Here

        this.featuresService = featuresService;
    }

    public int complete(Session session, CommandLine commandLine, final List<String> candidates) {
        StringsCompleter delegate = new StringsCompleter(Arrays.asList(featuresService.getRepositoryNames()));
        return delegate.complete(session, commandLine, candidates);
    }

}
View Full Code Here

                delegate.getStrings().add(repository.getURI().toString());
            }
        } catch (Exception e) {
            // Ignore
        }
        return delegate.complete(session, commandLine, candidates);
    }

}
View Full Code Here

                delegate.getStrings().add(karName);
            }
        } catch (Exception e) {
            // ignore
        }
        return delegate.complete(session, commandLine, candidates);
    }
   
}
View Full Code Here

                delegate.getStrings().add(name);
            }
        } catch (Exception e) {
            // nothing to do
        }
        return delegate.complete(session, commandLine, candidates);
    }

    public JndiService getJndiService() {
        return jndiService;
    }
View Full Code Here

                        delegate.getStrings().add(reference.getProperty(Constants.SERVICE_ID).toString());
                    }
                }
            }
        }
        return delegate.complete(session, commandLine, candidates);
    }

    public BundleContext getBundleContext() {
        return bundleContext;
    }
View Full Code Here

                delegate.getStrings().add(context);
            }
        } catch (Exception e) {
            // nothing to do
        }
        return delegate.complete(session, commandLine, candidates);
    }

    public JndiService getJndiService() {
        return jndiService;
    }
View Full Code Here

        public int complete(Session session, CommandLine commandLine, List<String> candidates) {
            String[] args = commandLine.getArguments();
            int argIndex = commandLine.getCursorArgumentIndex();
            StringsCompleter completer = new StringsCompleter(getNames(session));
            if (argIndex == 0) {
                int res = completer.complete(session, new ArgumentCommandLine(args[argIndex], commandLine.getArgumentPosition()), candidates);
                if (res > -1) {
                    res += commandLine.getBufferPosition() - commandLine.getArgumentPosition();
                }
                return res;
            } else if (!verifyCompleter(session, completer, args[0])) {
View Full Code Here

            public int complete(Session session, CommandLine commandLine, List<String> candidates) {
                String[] args = commandLine.getArguments();
                int argIndex = commandLine.getCursorArgumentIndex();
                StringsCompleter completer = new StringsCompleter(Collections.singletonList(getName()));
                if (argIndex == 0) {
                    return completer.complete(session, new ArgumentCommandLine(args[argIndex], commandLine.getArgumentPosition()), candidates);
                } else if (!verifyCompleter(session, completer, args[0])) {
                    return -1;
                }
                // TODO: use CommandNamesCompleter and better completion wrt parsing etc...
                completer = new StringsCompleter();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.