()
| 69 | }; |
| 70 | |
| 71 | public initView() { |
| 72 | const { builtInStatusProblems: statusProblems, builtInPanelProblems } = |
| 73 | this.builtinService.getModules(); |
| 74 | |
| 75 | if (statusProblems) { |
| 76 | statusProblems.render = (item) => ( |
| 77 | <ProblemsStatusBarView {...item} /> |
| 78 | ); |
| 79 | statusProblems.onClick = this.onClick; |
| 80 | |
| 81 | this.statusBarService.add(statusProblems, Float.left); |
| 82 | } |
| 83 | |
| 84 | if (builtInPanelProblems) { |
| 85 | // keep ProblemsPaneView updated to problems' state |
| 86 | const ProblemsView = connect( |
| 87 | this.problemsService, |
| 88 | ProblemsPaneView |
| 89 | ); |
| 90 | const problemsPanel = builtInPanelProblems; |
| 91 | problemsPanel.renderPane = () => ( |
| 92 | <ProblemsView onSelect={this.onSelect} /> |
| 93 | ); |
| 94 | |
| 95 | this.panelService.add(problemsPanel); |
| 96 | this.panelService.setActive(problemsPanel.id); |
| 97 | } |
| 98 | |
| 99 | const { PROBLEM_MODEL_ID, PROBLEM_MODEL_NAME } = |
| 100 | this.builtinService.getConstants(); |
| 101 | |
| 102 | this.problemsService.setState({ |
| 103 | id: PROBLEM_MODEL_ID, |
| 104 | name: PROBLEM_MODEL_NAME, |
| 105 | }); |
| 106 | } |
| 107 | |
| 108 | public onSelect = (node: IProblemsTreeNode) => { |
| 109 | this.emit(ProblemsEvent.onSelect, node); |
nothing calls this directly
no test coverage detected