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

Side by Side Diff: pkg/analysis_server/lib/src/status/tree_writer.dart

Issue 1801883002: Remove old index and search implementations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 analysis_server.src.status.tree_writer; 5 library analysis_server.src.status.tree_writer;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analysis_server/src/status/get_handler.dart';
10 import 'package:analyzer/dart/element/element.dart';
11 import 'package:analyzer/src/dart/element/element.dart'; 9 import 'package:analyzer/src/dart/element/element.dart';
12 import 'package:analyzer/src/generated/constant.dart'; 10 import 'package:analyzer/src/generated/constant.dart';
13 import 'package:analyzer/src/generated/java_engine.dart'; 11 import 'package:analyzer/src/generated/java_engine.dart';
14 import 'package:analyzer/src/generated/source.dart'; 12 import 'package:analyzer/src/generated/source.dart';
15 13
16 /** 14 /**
17 * Utility methods that can be mixed in to classes that produce an HTML 15 * Utility methods that can be mixed in to classes that produce an HTML
18 * representation of a tree structure. 16 * representation of a tree structure.
19 */ 17 */
20 abstract class TreeWriter { 18 abstract class TreeWriter {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 buffer.write(']'); 112 buffer.write(']');
115 } 113 }
116 } else { 114 } else {
117 String valueString = _toString(value); 115 String valueString = _toString(value);
118 if (valueString == null) { 116 if (valueString == null) {
119 buffer.write('<span style="color: #FF0000">'); 117 buffer.write('<span style="color: #FF0000">');
120 buffer.write(HTML_ESCAPE.convert(value.runtimeType.toString())); 118 buffer.write(HTML_ESCAPE.convert(value.runtimeType.toString()));
121 buffer.write('</span>'); 119 buffer.write('</span>');
122 } else { 120 } else {
123 buffer.write(HTML_ESCAPE.convert(valueString)); 121 buffer.write(HTML_ESCAPE.convert(valueString));
124 if (value is Element && value is! LibraryElement) {
125 String name = value.name;
126 if (name != null) {
127 buffer.write('&nbsp;&nbsp;[');
128 buffer.write(GetHandler.makeLink(GetHandler.INDEX_ELEMENT_BY_NAME,
129 {'name': name}, 'search index'));
130 buffer.write(']');
131 }
132 }
133 } 122 }
134 } 123 }
135 } 124 }
136 } 125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698