getImplementation method

Future<Map<String, dynamic>> getImplementation(
  1. String filePath,
  2. int line,
  3. int character
)

Gets the implementation locations for a symbol at the specified position.

Useful for jumping from an interface or abstract method to concrete implementations. Returns the first location if available, otherwise an empty map.

Implementation

Future<Map<String, dynamic>> getImplementation(
  String filePath,
  int line,
  int character,
) async {
  final response = await _sendRequest(
    method: 'textDocument/implementation',
    params: _commonParams(filePath, line, character),
  );

  final result = response['result'];
  if (result == null || result.isEmpty) return {};
  return result[0];
}