Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: pkg/analysis_server/lib/completion/completion_dart.dart

Issue 1383313002: Move completion APIs to a private location (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: formatting Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/lib/completion/completion_dart.dart
diff --git a/pkg/analysis_server/lib/completion/completion_dart.dart b/pkg/analysis_server/lib/completion/completion_dart.dart
deleted file mode 100644
index 1ddd5a095be3d404a7928ebce2d61c7dc622d219..0000000000000000000000000000000000000000
--- a/pkg/analysis_server/lib/completion/completion_dart.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2015, 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.
-
-library analysis_server.completion.completion_dart;
-
-import 'package:analysis_server/completion/completion_core.dart';
-import 'package:analysis_server/src/protocol.dart';
-import 'package:analyzer/src/generated/ast.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analysis_server/completion/dart/completion_target.dart';
-
-/**
- * An object used to produce completions for a specific error within a Dart
- * file. Completion contributors are long-lived objects and must not retain any
- * state between invocations of [computeSuggestions].
- *
- * Clients are expected to subtype this class when implementing plugins.
- */
-abstract class DartCompletionContributor extends CompletionContributor {
- @override
- List<CompletionSuggestion> computeSuggestions(CompletionRequest request) {
- if (request is DartCompletionRequest) {
- return internalComputeSuggestions(request);
- }
- AnalysisContext context = request.context;
- Source source = request.source;
- List<Source> libraries = context.getLibrariesContaining(source);
- if (libraries.length < 1) {
- return null;
- }
-// CompilationUnit unit =
-// context.getResolvedCompilationUnit2(source, libraries[0]);
-// bool isResolved = true;
-// if (unit == null) {
-// // TODO(brianwilkerson) Implement a method for getting a parsed
-// // compilation unit without parsing the unit if it hasn't been parsed.
-// unit = context.getParsedCompilationUnit(source);
-// if (unit == null) {
-// return null;
-// }
-// isResolved = false;
-// }
-// DartCompletionRequest dartRequest =
-// new DartCompletionRequestImpl(request, unit, isResolved);
-// return internalComputeSuggestions(dartRequest);
- return null;
- }
-
- /**
- * Compute a list of completion suggestions based on the given completion
- * [request]. Return the suggestions that were computed.
- */
- List<CompletionSuggestion> internalComputeSuggestions(
- DartCompletionRequest request);
-}
-
-/**
- * The information about a requested list of completions within a Dart file.
- */
-abstract class DartCompletionRequest extends CompletionRequest {
- /**
- * Return `true` if the compilation [unit] is resolved.
- */
- bool get isResolved;
-
- /**
- * Return the compilation unit in which the completion was requested.
- */
- CompilationUnit get unit;
-
- /**
- * Cached information from a prior code completion operation.
- */
- //DartCompletionCache get cache;
-
- /**
- * Return the completion target. This determines what part of the parse tree
- * will receive the newly inserted text.
- */
- CompletionTarget get target;
-
- /**
- * Information about the types of suggestions that should be included.
- */
- //OpType get _optype;
-}

Powered by Google App Engine
This is Rietveld 408576698