Executes requested command

def execute(self):
        """
            Executes requested command
        """
        try:
            self.__setup_connection()

            #if the arg switch argument is included, the request is to launch the out of box
            #MavensMate UI, so we generate the HTML for the UI and launch the process
            #example: mm -o new_project --ui
            if self.args.ui_switch == True:
                config.logger.debug('UI operation requested, attempting to launch MavensMate UI')
                tmp_html_file = util.generate_ui(self.operation,self.payload,self.args)
                if config.connection.plugin_client == 'ATOM': #returning location of html file here so we can open the page inside an atom panel
                    self.__printr(util.generate_success_response(tmp_html_file))
                else:
                    util.launch_ui(tmp_html_file)
                    self.__printr(util.generate_success_response('UI Generated Successfully'))
            
            #non-ui command
            else:        
                commands = get_available_commands()
                #debug(commands)
                try:
                    command_clazz = commands[self.operation](params=self.payload,args=self.args)                
                except KeyError:
                    raise MMUnsupportedOperationException('Could not find the operation you requested. Be sure the command is located in mm.commands, inherits from Command (found in basecommand.py) and includes an execute method.')
                except NotImplementedError:
                    raise MMException("This command is not properly implemented. Be sure it contains an 'execute' method.")
                self.__printr(command_clazz.execute())
        except Exception, e:
            self.__printr(e, is_exception=True)