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

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

Issue 578673002: convert engine element setter to completion element setter (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge 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
« no previous file with comments | « no previous file | pkg/analysis_server/test/computer/element_test.dart » ('j') | 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 computer.element; 5 library computer.element;
6 6
7 import 'package:analysis_server/src/protocol.dart'; 7 import 'package:analysis_server/src/protocol.dart';
8 import 'package:analyzer/src/generated/element.dart' as engine; 8 import 'package:analyzer/src/generated/element.dart' as engine;
9 import 'package:analyzer/src/generated/utilities_dart.dart' as engine; 9 import 'package:analyzer/src/generated/utilities_dart.dart' as engine;
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 sb.write(parameter.toString()); 57 sb.write(parameter.toString());
58 } 58 }
59 sb.write(closeOptionalString); 59 sb.write(closeOptionalString);
60 return '(' + sb.toString() + ')'; 60 return '(' + sb.toString() + ')';
61 } else { 61 } else {
62 return null; 62 return null;
63 } 63 }
64 } 64 }
65 65
66 String _getReturnTypeString(engine.Element element) { 66 String _getReturnTypeString(engine.Element element) {
67 if ((element is engine.ExecutableElement)) { 67 if (element is engine.ExecutableElement) {
68 return element.returnType.toString(); 68 if (element.kind == engine.ElementKind.SETTER) {
69 return null;
70 } else {
71 return element.returnType.toString();
72 }
69 } else { 73 } else {
70 return null; 74 return null;
71 } 75 }
72 } 76 }
73 77
74 bool _isAbstract(engine.Element element) { 78 bool _isAbstract(engine.Element element) {
75 // TODO(scheglov) add isAbstract to Element API 79 // TODO(scheglov) add isAbstract to Element API
76 if (element is engine.ClassElement) { 80 if (element is engine.ClassElement) {
77 return element.isAbstract; 81 return element.isAbstract;
78 } 82 }
(...skipping 28 matching lines...) Expand all
107 bool _isStatic(engine.Element element) { 111 bool _isStatic(engine.Element element) {
108 // TODO(scheglov) add isStatic to Element API 112 // TODO(scheglov) add isStatic to Element API
109 if (element is engine.ExecutableElement) { 113 if (element is engine.ExecutableElement) {
110 return element.isStatic; 114 return element.isStatic;
111 } 115 }
112 if (element is engine.PropertyInducingElement) { 116 if (element is engine.PropertyInducingElement) {
113 return element.isStatic; 117 return element.isStatic;
114 } 118 }
115 return false; 119 return false;
116 } 120 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analysis_server/test/computer/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698