* @param {{ sessionA: any; sessionB: EditSession; chunks: DiffChunk[] }} session
(session)
| 200 | * @param {{ sessionA: any; sessionB: EditSession; chunks: DiffChunk[] }} session |
| 201 | */ |
| 202 | setDiffSession(session) { |
| 203 | if (this.diffSession) { |
| 204 | this.$detachSessionsEventHandlers(); |
| 205 | this.clearSelectionMarkers(); |
| 206 | } |
| 207 | this.diffSession = session; |
| 208 | this.sessionA = this.sessionB = null; |
| 209 | if (this.diffSession) { |
| 210 | this.chunks = this.diffSession.chunks || []; |
| 211 | this.editorA && this.editorA.setSession(session.sessionA); |
| 212 | this.editorB && this.editorB.setSession(session.sessionB); |
| 213 | this.sessionA = this.diffSession.sessionA; |
| 214 | this.sessionB = this.diffSession.sessionB; |
| 215 | this.$attachSessionsEventHandlers(); |
| 216 | this.initSelectionMarkers(); |
| 217 | } |
| 218 | |
| 219 | this.otherSession = this.showSideA ? this.sessionB : this.sessionA; |
| 220 | } |
| 221 | |
| 222 | /** |
| 223 | * @abstract |
no test coverage detected