CodeLensProvider<T extends CodeLens> constructor

CodeLensProvider<T extends CodeLens>({
  1. Event<void>? onDidChangeCodeLenses,
  2. FutureOr<List<CodeLens>> provideCodeLenses(
    1. TextDocument,
    2. CancellationToken
    )?,
  3. FutureOr<CodeLens> resolveCodeLens(
    1. CodeLens,
    2. CancellationToken
    )?,
})

Implementation

factory CodeLensProvider({
  _i3.Event<void>? onDidChangeCodeLenses,
  _i4.FutureOr<_i2.List<_i3.CodeLens>> Function(
    _i3.TextDocument,
    _i3.CancellationToken,
  )? provideCodeLenses,
  _i4.FutureOr<_i3.CodeLens> Function(
    _i3.CodeLens,
    _i3.CancellationToken,
  )? resolveCodeLens,
}) =>
    CodeLensProvider._(
      onDidChangeCodeLenses: onDidChangeCodeLenses ?? _i6.undefined,
      provideCodeLenses: provideCodeLenses == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => provideCodeLenses(
                    p0,
                    p1,
                  ))),
      resolveCodeLens: resolveCodeLens == null
          ? null
          : _i5.allowInterop((
              p0,
              p1,
            ) =>
              _i6.Promise.futureOr(() => resolveCodeLens(
                    p0,
                    p1,
                  ))),
    );