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

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

Issue 1392253002: Restructure the public API for server (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/analysis/occurrences_core.dart'; 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/src/generated/engine.dart' 10 import 'package:analyzer/src/generated/engine.dart'
11 show AnalysisContext, AnalysisEngine; 11 show AnalysisContext, AnalysisEngine;
12 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException; 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 */
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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

Powered by Google App Engine
This is Rietveld 408576698