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

Side by Side Diff: pkg/analysis_server/test/plugin/set_analysis_domain_test.dart

Issue 1338153002: Merge occurrences. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/occurrences.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 test.plugin.analysis_contributor; 5 library test.plugin.analysis_contributor;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/analysis/analysis_domain.dart'; 9 import 'package:analysis_server/analysis/analysis_domain.dart';
10 import 'package:analysis_server/analysis/navigation_core.dart'; 10 import 'package:analysis_server/analysis/navigation_core.dart';
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 class TestOccurrencesContributor implements OccurrencesContributor { 119 class TestOccurrencesContributor implements OccurrencesContributor {
120 final SetAnalysisDomainTest test; 120 final SetAnalysisDomainTest test;
121 121
122 TestOccurrencesContributor(this.test); 122 TestOccurrencesContributor(this.test);
123 123
124 @override 124 @override
125 void computeOccurrences( 125 void computeOccurrences(
126 OccurrencesCollector collector, AnalysisContext context, Source source) { 126 OccurrencesCollector collector, AnalysisContext context, Source source) {
127 collector.addOccurrences(new Occurrences( 127 Element element = new Element(ElementKind.UNKNOWN, 'TestElement', 0);
128 new Element(ElementKind.UNKNOWN, 'TestElement', 0), <int>[1, 2, 3], 5)); 128 collector.addOccurrences(new Occurrences(element, <int>[1, 2], 5));
129 collector.addOccurrences(new Occurrences(element, <int>[3], 5));
129 } 130 }
130 } 131 }
131 132
132 class TestSetAnalysisDomainPlugin implements Plugin { 133 class TestSetAnalysisDomainPlugin implements Plugin {
133 final SetAnalysisDomainTest test; 134 final SetAnalysisDomainTest test;
134 135
135 TestSetAnalysisDomainPlugin(this.test); 136 TestSetAnalysisDomainPlugin(this.test);
136 137
137 @override 138 @override
138 String get uniqueIdentifier => 'test'; 139 String get uniqueIdentifier => 'test';
(...skipping 17 matching lines...) Expand all
156 expect(result.value, isNotNull); 157 expect(result.value, isNotNull);
157 Source source = result.target.source; 158 Source source = result.target.source;
158 test.parsedUnitFiles.add(source.fullName); 159 test.parsedUnitFiles.add(source.fullName);
159 domain.scheduleNotification( 160 domain.scheduleNotification(
160 result.context, source, AnalysisService.NAVIGATION); 161 result.context, source, AnalysisService.NAVIGATION);
161 domain.scheduleNotification( 162 domain.scheduleNotification(
162 result.context, source, AnalysisService.OCCURRENCES); 163 result.context, source, AnalysisService.OCCURRENCES);
163 }); 164 });
164 } 165 }
165 } 166 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/occurrences.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698