Remove the unused class DartContributionSorter
This was used by the ML support, which has been removed.
Change-Id: Idedb04e31c7b859f8ac0e590fd722958ce40d9ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/contribution_sorter.dart b/pkg/analysis_server/lib/src/services/completion/dart/contribution_sorter.dart
deleted file mode 100644
index e2889ab..0000000
--- a/pkg/analysis_server/lib/src/services/completion/dart/contribution_sorter.dart
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart';
-
-/// The abstract class [DartContributionSorter] defines the behavior of objects
-/// that are used to adjust the relevance of an existing list of suggestions.
-/// This is a long-lived object that should not maintain state between
-/// calls to it's [sort] method.
-abstract class DartContributionSorter {
- /// After [CompletionSuggestion]s have been computed,
- /// this method is called to adjust the relevance of those suggestions.
- /// Return a [Future] that completes when the suggestions have been updated.
- Future sort(DartCompletionRequest request,
- Iterable<CompletionSuggestion> suggestions);
-}
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index 3d49664..ec7ad30 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -4,9 +4,7 @@
import 'package:analysis_server/protocol/protocol_generated.dart';
import 'package:analysis_server/src/plugin/plugin_manager.dart';
-import 'package:analysis_server/src/provisional/completion/completion_core.dart';
import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
-import 'package:analysis_server/src/services/completion/dart/contribution_sorter.dart';
import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
import 'package:analyzer_plugin/protocol/protocol_common.dart';
import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
@@ -776,16 +774,3 @@
});
}
}
-
-class MockRelevancySorter implements DartContributionSorter {
- bool enabled = true;
-
- @override
- Future sort(
- CompletionRequest request, Iterable<CompletionSuggestion> suggestions) {
- if (!enabled) {
- throw 'unexpected sort';
- }
- return Future.value();
- }
-}