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

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

Issue 2894883002: Remove more libraries directives from server (Closed)
Patch Set: Created 3 years, 7 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;
6
7 import 'dart:async'; 5 import 'dart:async';
8 import 'dart:core'; 6 import 'dart:core';
9 7
10 import 'package:analysis_server/src/protocol_server.dart' 8 import 'package:analysis_server/src/protocol_server.dart'
11 show CompletionSuggestion, CompletionSuggestionKind; 9 show CompletionSuggestion, CompletionSuggestionKind;
12 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart'; 10 import 'package:analysis_server/src/provisional/completion/dart/completion_dart. dart';
13 import 'package:analyzer/dart/ast/ast.dart'; 11 import 'package:analyzer/dart/ast/ast.dart';
14 import 'package:analyzer/dart/ast/visitor.dart'; 12 import 'package:analyzer/dart/ast/visitor.dart';
15 import 'package:analyzer/file_system/file_system.dart'; 13 import 'package:analyzer/file_system/file_system.dart';
16 import 'package:analyzer/src/generated/sdk.dart'; 14 import 'package:analyzer/src/generated/sdk.dart';
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 220 }
223 221
224 String _extractPartialUri(SimpleStringLiteral node) { 222 String _extractPartialUri(SimpleStringLiteral node) {
225 if (request.offset < node.contentsOffset) { 223 if (request.offset < node.contentsOffset) {
226 return null; 224 return null;
227 } 225 }
228 return node.literal.lexeme.substring( 226 return node.literal.lexeme.substring(
229 node.contentsOffset - node.offset, request.offset - node.offset); 227 node.contentsOffset - node.offset, request.offset - node.offset);
230 } 228 }
231 } 229 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698