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

Side by Side Diff: pkg/analysis_server/lib/src/services/completion/dart/uri_contributor.dart

Issue 1788223002: Deprecate the generated AST library and clean up imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.completion.contributor.dart.importuri; 5 library services.completion.contributor.dart.importuri;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 9
10 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 10 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
11 import 'package:analyzer/dart/ast/ast.dart';
12 import 'package:analyzer/dart/ast/visitor.dart';
11 import 'package:analyzer/file_system/file_system.dart'; 13 import 'package:analyzer/file_system/file_system.dart';
12 import 'package:analyzer/src/generated/ast.dart';
13 import 'package:analyzer/src/generated/sdk.dart'; 14 import 'package:analyzer/src/generated/sdk.dart';
14 import 'package:analyzer/src/generated/source.dart'; 15 import 'package:analyzer/src/generated/source.dart';
15 import 'package:path/path.dart' show posix; 16 import 'package:path/path.dart' show posix;
16 import 'package:path/src/context.dart'; 17 import 'package:path/src/context.dart';
17 18
18 import '../../../protocol_server.dart' 19 import '../../../protocol_server.dart'
19 show CompletionSuggestion, CompletionSuggestionKind; 20 show CompletionSuggestion, CompletionSuggestionKind;
20 21
21 /** 22 /**
22 * A contributor for calculating uri suggestions 23 * A contributor for calculating uri suggestions
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 187 }
187 188
188 String _extractPartialUri(SimpleStringLiteral node) { 189 String _extractPartialUri(SimpleStringLiteral node) {
189 if (request.offset < node.contentsOffset) { 190 if (request.offset < node.contentsOffset) {
190 return null; 191 return null;
191 } 192 }
192 return node.literal.lexeme.substring( 193 return node.literal.lexeme.substring(
193 node.contentsOffset - node.offset, request.offset - node.offset); 194 node.contentsOffset - node.offset, request.offset - node.offset);
194 } 195 }
195 } 196 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698