selectDiagnosticAtLine method

bool selectDiagnosticAtLine(
  1. int lineIndex
)

Implementation

bool selectDiagnosticAtLine(int lineIndex) {
  _refreshDocumentSnapshot();
  if (_diagnostics.isEmpty) {
    return false;
  }

  final state = _currentOffsetStateSnapshot();
  final index = _diagnosticIndexForLine(
    lineIndex,
    activeIndex: _currentDiagnosticIndex(state),
  );
  if (index == null) {
    return false;
  }
  _selectDiagnosticAtIndex(index);
  return true;
}