Package com.mucommander.command

Examples of com.mucommander.command.Command


    private static void migrateCommand(String useName, String commandName, String alias) {
        String command;

        if(MuConfigurations.getPreferences().getBooleanVariable(useName) && (command = MuConfigurations.getPreferences().getVariable(commandName)) != null) {
            try {
                CommandManager.registerCommand(new Command(alias, command, CommandType.SYSTEM_COMMAND));}
            catch(CommandException e) {
                // Ignore this: the command didn't work in the first place, we might as well get rid of it.
            }
            MuConfigurations.getPreferences().removeVariable(useName);
            MuConfigurations.getPreferences().removeVariable(commandName);
View Full Code Here


        return CommandManager.getCommandForFile(file, false) != null;
    }

    @Override
    public void execute(AbstractFile file) throws IOException {
        Command command;

        // Attemps to find a command that matches the specified target.
        if((command = CommandManager.getCommandForFile(file, allowDefault)) == null)
            throw new UnsupportedOperationException();

        // If found, executes it.
        ProcessRunner.execute(command.getTokens(file), file);
    }
View Full Code Here

TOP

Related Classes of com.mucommander.command.Command

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.