MCPcopy
hub / github.com/CodeboxIDE/codebox / openFileHandler

Function openFileHandler

client/core/files.js:144–157  ·  view source on GitHub ↗
(handler, file, fileOptions)

Source from the content-addressed store, hash-verified

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) {

Callers 2

openFileWithFunction · 0.85
openFileFunction · 0.85

Calls 1

QFunction · 0.85

Tested by

no test coverage detected