Package org.jnode.shell.alias

Examples of org.jnode.shell.alias.AliasManager.aliases()


            // get the alias manager
            final AliasManager aliasMgr =
                ShellUtils.getShellManager().getCurrentShell().getAliasManager();

            // collect matching aliases
            for (String alias : aliasMgr.aliases()) {
                if (alias.startsWith(partial)) {
                    completions.addCompletion(alias);
                }
            }
        } catch (NameNotFoundException ex) {
View Full Code Here


     * @throws NameNotFoundException
     */
    private String getProbableAlias(String canonicalName) throws NameNotFoundException {
        // This will be problematic in a classic JVM ...
        AliasManager mgr = ShellUtils.getAliasManager();
        for (String alias : mgr.aliases()) {
            try {
                if (mgr.getAliasClassName(alias).equals(canonicalName)) {
                    return alias;
                }
            } catch (NoSuchAliasException e) {
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.