| 304 | } |
| 305 | |
| 306 | fromJsonData(jsondata: any) { |
| 307 | if (jsondata.id !== undefined) this.id = jsondata.id; |
| 308 | this.language = jsondata.language; |
| 309 | this.source = jsondata.source; |
| 310 | if (jsondata.conformanceview !== undefined) { |
| 311 | if (jsondata.conformanceview) { |
| 312 | this.conformanceview = new ClientStateConformanceView(jsondata.conformanceview); |
| 313 | } else { |
| 314 | this.conformanceview = false; |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | for (const compilerdata of jsondata.compilers) { |
| 319 | const compiler = new ClientStateCompiler(compilerdata); |
| 320 | if (compiler.id) { |
| 321 | this.compilers.push(compiler); |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | if (jsondata.executors !== undefined) { |
| 326 | for (const executor of jsondata.executors) { |
| 327 | this.executors.push(new ClientStateExecutor(executor)); |
| 328 | } |
| 329 | } |
| 330 | |
| 331 | if (jsondata.filename !== undefined) { |
| 332 | this.filename = jsondata.filename; |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | findOrCreateCompiler(id: number) { |
| 337 | let foundCompiler: ClientStateCompiler | undefined; |