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

Side by Side Diff: pkg/analysis_server/lib/src/domains/analysis/occurrences.dart

Issue 2328043002: Move exception support to its own library (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 domains.analysis.occurrences; 5 library domains.analysis.occurrences;
6 6
7 import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dar t'; 7 import 'package:analysis_server/plugin/analysis/occurrences/occurrences_core.dar t';
8 import 'package:analysis_server/src/analysis_server.dart'; 8 import 'package:analysis_server/src/analysis_server.dart';
9 import 'package:analysis_server/src/protocol_server.dart' as protocol; 9 import 'package:analysis_server/src/protocol_server.dart' as protocol;
10 import 'package:analyzer/exception/exception.dart';
10 import 'package:analyzer/src/generated/engine.dart' 11 import 'package:analyzer/src/generated/engine.dart'
11 show AnalysisContext, AnalysisEngine; 12 show AnalysisContext, AnalysisEngine;
12 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
13 import 'package:analyzer/src/generated/source.dart' show Source; 13 import 'package:analyzer/src/generated/source.dart' show Source;
14 14
15 /** 15 /**
16 * Compute all known occurrences for the given [source]. 16 * Compute all known occurrences for the given [source].
17 */ 17 */
18 OccurrencesCollectorImpl computeOccurrences( 18 OccurrencesCollectorImpl computeOccurrences(
19 AnalysisServer server, AnalysisContext context, Source source) { 19 AnalysisServer server, AnalysisContext context, Source source) {
20 OccurrencesCollectorImpl collector = new OccurrencesCollectorImpl(); 20 OccurrencesCollectorImpl collector = new OccurrencesCollectorImpl();
21 List<OccurrencesContributor> contributors = 21 List<OccurrencesContributor> contributors =
22 server.serverPlugin.occurrencesContributors; 22 server.serverPlugin.occurrencesContributors;
(...skipping 28 matching lines...) Expand all
51 List<int> offsets = _merge(existing.offsets, current.offsets); 51 List<int> offsets = _merge(existing.offsets, current.offsets);
52 current = new protocol.Occurrences(element, offsets, existing.length); 52 current = new protocol.Occurrences(element, offsets, existing.length);
53 } 53 }
54 elementOccurrences[element] = current; 54 elementOccurrences[element] = current;
55 } 55 }
56 56
57 static List<int> _merge(List<int> a, List<int> b) { 57 static List<int> _merge(List<int> a, List<int> b) {
58 return <int>[]..addAll(a)..addAll(b); 58 return <int>[]..addAll(a)..addAll(b);
59 } 59 }
60 } 60 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/domains/analysis/navigation.dart ('k') | pkg/analysis_server/lib/src/protocol_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698