diff --git a/sublime-text-2-php-refactor.py b/sublime-text-2-php-refactor.py index c02825a..d08a653 100644 --- a/sublime-text-2-php-refactor.py +++ b/sublime-text-2-php-refactor.py @@ -41,7 +41,7 @@ def runCommandLine(self, filePath, fromLine, toLine, newFcName, execute=False): else: execute = '' - # @TODO: this must be a class constant + # @TODO: this must be a top class constant (class Refactor, from where all commands inherit) refactorFile = sublime.packages_path() + "/sublime-text-2-php-refactor/lib/refactor.phar" command = "php " + refactorFile + " extract-method " + self.view.file_name() + " " + fromLine + "-" + toLine + " " + newFcName + execute self.performAction('extract_' + newFcName, command) @@ -50,10 +50,6 @@ def runCommandLine(self, filePath, fromLine, toLine, newFcName, execute=False): def performAction(self, name, command): fileName = basename(self.view.file_name()) - if not command: - print 'Action ' + name + ': No command supplied' - return - print 'Performing action: ' + name + ' (' + command + ')' p = subprocess.Popen(command, cwd=os.getcwd(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) diff --git a/sublime-text-2-php-refactor.pyc b/sublime-text-2-php-refactor.pyc index 21a5f7d..1c7506d 100644 Binary files a/sublime-text-2-php-refactor.pyc and b/sublime-text-2-php-refactor.pyc differ