MCPcopy Index your code
hub / github.com/reactide/reactide / componentDidMount

Method componentDidMount

renderer/components/App.jsx:87–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86 //when component mounts set the project path
87 componentDidMount() {
88 ipcRenderer.on('openDir', (event, projPath) => {
89 if (this.state.openedProjectPath !== projPath) {
90 this.setState({ openTabs: {}, openedProjectPath: projPath });
91 }
92 });
93
94 //when save file is initiated, save the tab
95 ipcRenderer.on('saveFile', (event, arg) => {
96 if (this.state.previousPaths[this.state.previousPaths.length - 1] !== null) {
97 this.saveTab();
98 }
99 });
100
101 //
102 ipcRenderer.on('delete', (event, arg) => {
103 if (this.state.selectedItem.id) {
104 this.setState({
105 deletePromptOpen: true,
106 fileChangeType: 'delete'
107 });
108 }
109 });
110 ipcRenderer.on('enter', (event, arg) => {
111 if (this.state.selectedItem.focused) {
112 //rename property just true or false i guess
113 this.setState({
114 renameFlag: true
115 });
116 }
117 });
118 ipcRenderer.on('start simulator', (event, arg) => {
119 console.log('this is start simulator event line 111 appjsx', event);
120 this.setState({ url: arg[0], liveServerPID: arg[1] });
121 });
122 ipcRenderer.on('craOut', (event, arg) => {
123 this.setState({ craOut: arg, cra: false });
124 });
125 ipcRenderer.on('closeSim', (event, arg) => {
126 this.setState({ url: ' ' })
127 })
128 }
129 /**
130 * Creates component Tree object for rendering by calling on methods defined in importPath.js
131 */

Callers

nothing calls this directly

Calls 1

saveTabMethod · 0.95

Tested by

no test coverage detected