MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / updateState

Method updateState

static/panes/editor.ts:292–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290 // Not using the normal getCurrentState/updateState pattern because the editor does not conform to its own interface
291 // (legacy links!)
292 override updateState(): void {
293 const state = {
294 id: this.id,
295 source: this.getSource(),
296 lang: this.currentLanguage?.id,
297 selection: this.selection,
298 filename: this.filename,
299 };
300 this.fontScale.addState(state);
301 this.paneRenaming.addState(state);
302 this.container.setState(state);
303 this.updateButtons();
304 }
305
306 setSource(newSource: string): void {
307 this.updateSource(newSource);

Callers 5

registerCallbacksMethod · 0.95
initLoadSaverMethod · 0.95
onLanguageChangeMethod · 0.95
setFilenameMethod · 0.95

Calls 3

getSourceMethod · 0.95
updateButtonsMethod · 0.95
addStateMethod · 0.45

Tested by

no test coverage detected