MCPcopy
hub / github.com/compiler-explorer/compiler-explorer / constructor

Function constructor

static/panes/pane.ts:65–88  ·  view source on GitHub ↗

* Base constructor for any pane. Performs common initialization tasks such * as registering standard event listeners and lifecycle handlers. * * Overridable for implementors

(hub: Hub, container: Container, state: S & PaneState)

Source from the content-addressed store, hash-verified

63 * Overridable for implementors
64 */
65 protected constructor(hub: Hub, container: Container, state: S & PaneState) {
66 this.container = container;
67 this.hub = hub;
68 this.eventHub = hub.createEventHub();
69 this.domRoot = container.getElement();
70 this.domRoot.html(this.getInitialHTML());
71
72 this.hideable = this.domRoot.find('.hideable');
73
74 this.initializeCompilerInfo(state);
75 this.topBar = this.domRoot.find('.top-bar');
76
77 this.paneRenaming = new PaneRenaming(this, state, hub);
78
79 this.initializeDefaults();
80 this.initializeGlobalDependentProperties();
81 this.initializeStateDependentProperties(state);
82
83 this.registerDynamicElements(state);
84
85 this.registerButtons(state);
86 this.registerStandardCallbacks();
87 this.registerCallbacks();
88 }
89
90 protected initializeCompilerInfo(state: PaneState) {
91 this.compilerInfo = {

Callers

nothing calls this directly

Calls 11

createEventHubMethod · 0.80
findMethod · 0.80
initializeDefaultsMethod · 0.80
getInitialHTMLMethod · 0.45
registerButtonsMethod · 0.45
registerCallbacksMethod · 0.45
registerEditorActionsMethod · 0.45

Tested by

no test coverage detected