(handler, file, fileOptions)
| 142 | |
| 143 | // Open file with handler |
| 144 | var openFileHandler = function(handler, file, fileOptions) { |
| 145 | // Add to recent files |
| 146 | if (!file.isNewfile()) recentFiles.add(file); |
| 147 | |
| 148 | // Options for the file handler |
| 149 | fileOptions = _.defaults(fileOptions || {}, { |
| 150 | line: null, |
| 151 | pattern: null |
| 152 | }); |
| 153 | |
| 154 | return Q(handler.open(file, fileOptions)).then(function() { |
| 155 | box.setActiveFile(file); |
| 156 | }); |
| 157 | }; |
| 158 | |
| 159 | // Select to open a file with any handler |
| 160 | var openFileWith = function(file, fileOptions) { |
no test coverage detected