void () { super.beforeTemplateStart(); myLanguage = myScope.getLanguage(); if (shouldCreateSnapshot()) { final ResolveSnapshotProvider resolveSnapshotProvider = INSTANCE.forLanguage(myLanguage); mySnapshot = resolveSnapshotProvider != null ? resolveSnapshotProvider.createSnapshot(myScope) : null; } final SelectionModel selectionModel = myEditor.getSelectionModel(); mySelectedRange = selectionModel.hasSelection() ? new TextRange(selectionModel.getSelectionStart(), selectionModel.getSelectionEnd()) : null; }