(entries, type, focusView = true)
| 160 | } |
| 161 | |
| 162 | selectEntriesOfSingleType(entries, type, focusView = true) { |
| 163 | const entryType = entries[0]?.constructor ?? type; |
| 164 | switch (entryType) { |
| 165 | case Script: |
| 166 | entries = entries.flatMap(script => script.sourcePositions); |
| 167 | return this.showSourcePositions(entries, focusView); |
| 168 | case SourcePosition: |
| 169 | return this.showSourcePositions(entries, focusView); |
| 170 | case MapLogEntry: |
| 171 | return this.showMapEntries(entries, focusView); |
| 172 | case IcLogEntry: |
| 173 | return this.showIcEntries(entries, focusView); |
| 174 | case CodeLogEntry: |
| 175 | return this.showCodeEntries(entries, focusView); |
| 176 | case DeoptLogEntry: |
| 177 | return this.showDeoptEntries(entries, focusView); |
| 178 | case SharedLibLogEntry: |
| 179 | return this.showSharedLibEntries(entries, focusView); |
| 180 | case TimerLogEntry: |
| 181 | case TickLogEntry: |
| 182 | break; |
| 183 | default: |
| 184 | throw new Error(`Unknown selection type: ${entryType?.name}`); |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | showMapEntries(entries, focusView = true) { |
| 189 | this._view.mapPanel.selectedLogEntries = entries; |
no test coverage detected