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

Side by Side Diff: pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart

Issue 2844273003: Unify the server and plugin versions of the generators (Closed)
Patch Set: add missed files 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 /** 5 /**
6 * Utilities for converting Dart entities into analysis server's protocol 6 * Utilities for converting Dart entities into analysis server's protocol
7 * entities. 7 * entities.
8 */ 8 */
9 library analysis_server.plugin.protocol.protocol_dart; 9 library analysis_server.plugin.protocol.protocol_dart;
10 10
11 import 'package:analysis_server/plugin/protocol/protocol.dart'; 11 import 'package:analysis_server/protocol/protocol_generated.dart';
12 import 'package:analysis_server/src/protocol_server.dart'; 12 import 'package:analysis_server/src/protocol_server.dart';
13 import 'package:analyzer/dart/element/element.dart' as engine; 13 import 'package:analyzer/dart/element/element.dart' as engine;
14 import 'package:analyzer/src/generated/utilities_dart.dart' as engine; 14 import 'package:analyzer/src/generated/utilities_dart.dart' as engine;
15 15
16 /** 16 /**
17 * Return a protocol [Element] corresponding to the given [engine.Element]. 17 * Return a protocol [Element] corresponding to the given [engine.Element].
18 */ 18 */
19 Element convertElement(engine.Element element) { 19 Element convertElement(engine.Element element) {
20 String name = element.displayName; 20 String name = element.displayName;
21 String elementTypeParameters = _getTypeParametersString(element); 21 String elementTypeParameters = _getTypeParametersString(element);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 bool _isStatic(engine.Element element) { 209 bool _isStatic(engine.Element element) {
210 // TODO(scheglov) add isStatic to Element API 210 // TODO(scheglov) add isStatic to Element API
211 if (element is engine.ExecutableElement) { 211 if (element is engine.ExecutableElement) {
212 return element.isStatic; 212 return element.isStatic;
213 } 213 }
214 if (element is engine.PropertyInducingElement) { 214 if (element is engine.PropertyInducingElement) {
215 return element.isStatic; 215 return element.isStatic;
216 } 216 }
217 return false; 217 return false;
218 } 218 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/plugin/protocol/protocol.dart ('k') | pkg/analysis_server/lib/protocol/protocol.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698