Package org.apache.felix.karaf.shell.console.completer

Examples of org.apache.felix.karaf.shell.console.completer.StringsCompleter


    public void setFeaturesService(FeaturesService featuresService) {
        this.featuresService = featuresService;
    }

    public int complete(final String buffer, final int cursor, final List candidates) {
        StringsCompleter delegate = new StringsCompleter();
        try {
            for (Repository repository : featuresService.listRepositories()) {
                delegate.getStrings().add(repository.getURI().toString());
            }
        } catch (Exception e) {
            // Ignore
        }
        return delegate.complete(buffer, cursor, candidates);
    }
View Full Code Here


    public void setFeaturesService(FeaturesService featuresService) {
        this.featuresService = featuresService;
    }

    public int complete(final String buffer, final int cursor, final List candidates) {
        StringsCompleter delegate = new StringsCompleter();
        try {
            for (Feature feature : featuresService.listInstalledFeatures()) {
                delegate.getStrings().add(feature.getName());
            }
        } catch (Exception e) {
            // Ignore
        }
        return delegate.complete(buffer, cursor, candidates);
    }
View Full Code Here

    public void setAdminService(AdminService adminService) {
        this.adminService = adminService;
    }

    public int complete(String buffer, int cursor, List candidates) {
        StringsCompleter delegate = new StringsCompleter();
        for (Instance instance : adminService.getInstances()) {
            delegate.getStrings().add(instance.getName());
        }
        return delegate.complete(buffer, cursor, candidates);
    }
View Full Code Here

    public void setFeaturesService(FeaturesService featuresService) {
        this.featuresService = featuresService;
    }

    public int complete(final String buffer, final int cursor, final List candidates) {
        StringsCompleter delegate = new StringsCompleter();
        try {
            for (Feature feature : featuresService.listFeatures()) {
                if (!featuresService.isInstalled( feature )) {
                    delegate.getStrings().add(feature.getName());
                }
            }
        } catch (Exception e) {
            // Ignore
        }
        return delegate.complete(buffer, cursor, candidates);
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.karaf.shell.console.completer.StringsCompleter

Copyright © 2018 www.massapicom. 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.