@@ -11,7 +11,6 @@ import 'package:analysis_server/lsp_protocol/protocol_generated.dart' as lsp;
1111import 'package:analysis_server/lsp_protocol/protocol_generated.dart' ;
1212import 'package:analysis_server/lsp_protocol/protocol_special.dart' ;
1313import 'package:analysis_server/lsp_protocol/protocol_special.dart' as lsp;
14- import 'package:analysis_server/protocol/protocol_generated.dart' ;
1514import 'package:analysis_server/src/lsp/constants.dart' as lsp;
1615import 'package:analysis_server/src/lsp/constants.dart' ;
1716import 'package:analysis_server/src/lsp/dartdoc.dart' ;
@@ -212,7 +211,7 @@ lsp.CompletionItem declarationToCompletionItem(
212211 HashSet <lsp.CompletionItemKind > supportedCompletionItemKinds,
213212 String file,
214213 int offset,
215- IncludedSuggestionSet includedSuggestionSet,
214+ server. IncludedSuggestionSet includedSuggestionSet,
216215 Library library,
217216 Map <String , int > tagBoosts,
218217 server.LineInfo lineInfo,
@@ -667,7 +666,7 @@ lsp.Diagnostic pluginToDiagnostic(
667666 server.LineInfo Function (String ) getLineInfo,
668667 plugin.AnalysisError error,
669668) {
670- List <DiagnosticRelatedInformation > relatedInformation;
669+ List <lsp. DiagnosticRelatedInformation > relatedInformation;
671670 if (error.contextMessages != null && error.contextMessages.isNotEmpty) {
672671 relatedInformation = error.contextMessages
673672 .map ((message) =>
@@ -792,18 +791,20 @@ lsp.ClosingLabel toClosingLabel(
792791 range: toRange (lineInfo, label.offset, label.length),
793792 label: label.label);
794793
795- CodeActionKind toCodeActionKind (String id, lsp.CodeActionKind fallback) {
794+ lsp. CodeActionKind toCodeActionKind (String id, lsp.CodeActionKind fallback) {
796795 if (id == null ) {
797796 return fallback;
798797 }
799798 // Dart fixes and assists start with "dart.assist." and "dart.fix." but in LSP
800799 // we want to use the predefined prefixes for CodeActions.
801800 final newId = id
802- .replaceAll ('dart.assist' , CodeActionKind .Refactor .toString ())
803- .replaceAll ('dart.fix' , CodeActionKind .QuickFix .toString ())
804- .replaceAll ('analysisOptions.assist' , CodeActionKind .Refactor .toString ())
805- .replaceAll ('analysisOptions.fix' , CodeActionKind .QuickFix .toString ());
806- return CodeActionKind (newId);
801+ .replaceAll ('dart.assist' , lsp.CodeActionKind .Refactor .toString ())
802+ .replaceAll ('dart.fix' , lsp.CodeActionKind .QuickFix .toString ())
803+ .replaceAll (
804+ 'analysisOptions.assist' , lsp.CodeActionKind .Refactor .toString ())
805+ .replaceAll (
806+ 'analysisOptions.fix' , lsp.CodeActionKind .QuickFix .toString ());
807+ return lsp.CodeActionKind (newId);
807808}
808809
809810lsp.CompletionItem toCompletionItem (
@@ -931,7 +932,7 @@ lsp.Diagnostic toDiagnostic(
931932 // Default to the error's severity if none is specified.
932933 errorSeverity ?? = errorCode.errorSeverity;
933934
934- List <DiagnosticRelatedInformation > relatedInformation;
935+ List <lsp. DiagnosticRelatedInformation > relatedInformation;
935936 if (error.contextMessages.isNotEmpty) {
936937 relatedInformation = error.contextMessages
937938 .map ((message) => toDiagnosticRelatedInformation (result, message))
@@ -1232,7 +1233,7 @@ lsp.TextDocumentEdit toTextDocumentEdit(FileEditInformation edit) {
12321233 return lsp.TextDocumentEdit (
12331234 textDocument: edit.doc,
12341235 edits: edit.edits
1235- .map ((e) => Either2 <TextEdit , AnnotatedTextEdit >.t1 (
1236+ .map ((e) => Either2 <lsp. TextEdit , lsp. AnnotatedTextEdit >.t1 (
12361237 toTextEdit (edit.lineInfo, e)))
12371238 .toList (),
12381239 );
0 commit comments