OLD | NEW |
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; | |
9 | 8 |
10 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
11 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
12 import 'package:analyzer/dart/ast/visitor.dart'; | 11 import 'package:analyzer/dart/ast/visitor.dart'; |
13 import 'package:analyzer/file_system/file_system.dart'; | 12 import 'package:analyzer/file_system/file_system.dart'; |
14 import 'package:analyzer/src/generated/sdk.dart'; | 13 import 'package:analyzer/src/generated/sdk.dart'; |
15 import 'package:analyzer/src/generated/source.dart'; | 14 import 'package:analyzer/src/generated/source.dart'; |
16 import 'package:path/path.dart' show posix; | 15 import 'package:path/path.dart' show posix; |
17 import 'package:path/src/context.dart'; | 16 import 'package:path/src/context.dart'; |
18 | 17 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 } | 186 } |
188 | 187 |
189 String _extractPartialUri(SimpleStringLiteral node) { | 188 String _extractPartialUri(SimpleStringLiteral node) { |
190 if (request.offset < node.contentsOffset) { | 189 if (request.offset < node.contentsOffset) { |
191 return null; | 190 return null; |
192 } | 191 } |
193 return node.literal.lexeme.substring( | 192 return node.literal.lexeme.substring( |
194 node.contentsOffset - node.offset, request.offset - node.offset); | 193 node.contentsOffset - node.offset, request.offset - node.offset); |
195 } | 194 } |
196 } | 195 } |
OLD | NEW |