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

Side by Side Diff: pkg/analysis_server/lib/src/computer/computer_occurrences.dart

Issue 506433002: Finish modifying analysis server to make use of code generation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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 computer.occurrences; 5 library computer.occurrences;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analysis_server/src/protocol2.dart' as protocol; 9 import 'package:analysis_server/src/protocol.dart' as protocol;
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
11 import 'package:analyzer/src/generated/element.dart'; 11 import 'package:analyzer/src/generated/element.dart';
12 12
13 13
14 /** 14 /**
15 * A computer for elements occurrences in a Dart [CompilationUnit]. 15 * A computer for elements occurrences in a Dart [CompilationUnit].
16 */ 16 */
17 class DartUnitOccurrencesComputer { 17 class DartUnitOccurrencesComputer {
18 final CompilationUnit _unit; 18 final CompilationUnit _unit;
19 19
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 @override 72 @override
73 visitSimpleIdentifier(SimpleIdentifier node) { 73 visitSimpleIdentifier(SimpleIdentifier node) {
74 Element element = node.bestElement; 74 Element element = node.bestElement;
75 if (element != null) { 75 if (element != null) {
76 computer._addOccurrence(element, node.offset); 76 computer._addOccurrence(element, node.offset);
77 } 77 }
78 return super.visitSimpleIdentifier(node); 78 return super.visitSimpleIdentifier(node);
79 } 79 }
80 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698