MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / EditorFile

Class EditorFile

src/lib/editorFile.js:274–595  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

272 */
273
274export default class EditorFile {
275 /**
276 * Type of content this file represents but use page in case of custom pages etc
277 */
278 #type = "editor";
279 #tabIcon = "file file_type_default";
280 /**
281 * Custom content element
282 * @type {HTMLElement}
283 */
284 #content = null;
285 /**
286 * Whether to hide quicktools for this tab
287 * @type {boolean}
288 */
289 hideQuickTools = false;
290
291 /**
292 * Custom stylesheets for tab
293 * @type {string|string[]}
294 */
295 stylesheets;
296
297 /**
298 * Custom title function for special tab types
299 * @type {function}
300 */
301 #customTitleFn = null;
302
303 /**
304 * If editor was focused before resize
305 */
306 focusedBefore = false;
307 /**
308 * State of the editor for this file.
309 */
310 focused = false;
311 /**
312 * Weather the file has completed loading text or not
313 * @type {boolean}
314 */
315 loaded = true;
316 /**
317 * Weather file is still loading the text from the source
318 * @type {boolean}
319 */
320 loading = false;
321 /**
322 * Weather file is deleted from source.
323 * @type {boolean}
324 */
325 deletedFile = false;
326 /**
327 * Raw CodeMirror EditorState. Use session getter to access with Ace-compatible methods.
328 * @type {EditorState}
329 */
330 #rawSession = null;
331 /**

Callers

nothing calls this directly

Calls 2

tileFunction · 0.85
getFileFunction · 0.70

Tested by

no test coverage detected