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

Side by Side Diff: runtime/observatory/lib/src/elements/instance_view.html

Issue 2291233002: Converted Observatory instance-view element (Closed)
Patch Set: Addressed comments 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
(Empty)
1 <link rel="import" href="../../../../packages/polymer/polymer.html">
2 <link rel="import" href="eval_link.html">
3
4 <polymer-element name="instance-view">
5 <template>
6 <link rel="stylesheet" href="css/shared.css">
7 <nav-bar>
8 <top-nav-menu></top-nav-menu>
9 <vm-nav-menu vm="{{ instance.isolate.vm }}"></vm-nav-menu>
10 <isolate-nav-menu isolate="{{ instance.isolate }}"></isolate-nav-menu>
11 <!-- TODO(turnidge): Add library nav menu here. -->
12 <class-nav-menu cls="{{ instance.clazz }}"></class-nav-menu>
13 <nav-menu link="." anchor="instance" last="{{ true }}"></nav-menu>
14 <nav-refresh callback="{{ refresh }}"></nav-refresh>
15 <nav-notify notifications="{{ app.notifications }}"></nav-notify>
16 </nav-bar>
17
18 <div class="content">
19 <template if="{{ instance.isAbstractType }}">
20 <h1>type {{ instance.name }}</h1>
21 </template>
22 <template if="{{ !instance.isAbstractType }}">
23 <h1>instance of {{ instance.clazz.name }}</h1>
24 </template>
25
26 <object-common object="{{ instance }}"></object-common>
27
28 <div class="memberList">
29 <div class="memberItem">&nbsp;</div>
30
31 <template if="{{ instance.valueAsString != null }}">
32 <div class="memberItem">
33 <div class="memberName">value</div>
34 <div class="memberValue">
35 <pre>{{ instance.valueAsString }}</pre>
36 </div>
37 </div>
38 </template>
39
40 <template if="{{ instance.isString }}">
41 <div class="memberItem">
42 <div class="memberName">valueAsLiteral</div>
43 <div class="memberValue"> {{ asStringLiteral(instance.valueAsString, instance.valueAsStringIsTruncated) }}</div>
44 </div>
45 </template>
46
47 <template if="{{ instance.typeClass != null }}">
48 <div class="memberItem">
49 <div class="memberName">type class</div>
50 <div class="memberValue">
51 <class-ref ref="{{ instance.typeClass }}">
52 </class-ref>
53 </div>
54 </div>
55 </template>
56 <template if="{{ instance.typeArguments.length > 0 }}">
57 <div class="memberItem">
58 <div class="memberName">type arguments</div>
59 <div class="memberValue">
60 &lt;
61 <template repeat="{{ index in instance.typeArguments['types'].asMa p().keys }}">
62 <instance-ref ref="{{ instance.typeArguments['types'][index] }}" >
63 </instance-ref>
64 <template if="{{ index < instance.typeArguments['types'].length - 1 }}">
65 ,
66 </template>
67 </template>
68 &gt;
69 </div>
70 </div>
71 </template>
72 <template if="{{ instance.parameterizedClass != null }}">
73 <div class="memberItem">
74 <div class="memberName">parameterized class</div>
75 <div class="memberValue">
76 <class-ref ref="{{ instance.parameterizedClass }}">
77 </class-ref>
78 </div>
79 </div>
80 </template>
81 <template if="{{ instance.parameterIndex != null }}">
82 <div class="memberItem">
83 <div class="memberName">parameter index</div>
84 <div class="memberValue">
85 {{ instance.parameterIndex }}
86 </div>
87 </div>
88 </template>
89 <template if="{{ instance.targetType != null }}">
90 <div class="memberItem">
91 <div class="memberName">target type</div>
92 <div class="memberValue">
93 <instance-ref ref="{{ instance.targetType }}">
94 </instance-ref>
95 </div>
96 </div>
97 </template>
98 <template if="{{ instance.bound != null }}">
99 <div class="memberItem">
100 <div class="memberName">bound</div>
101 <div class="memberValue">
102 <instance-ref ref="{{ instance.bound }}">
103 </instance-ref>
104 </div>
105 </div>
106 </template>
107
108 <template if="{{ instance.isClosure }}">
109 <div class="memberItem">
110 <div class="memberName">closure function</div>
111 <div class="memberValue">
112 <function-ref ref="{{ instance.closureFunction }}">
113 </function-ref>
114 </div>
115 </div>
116 <div class="memberItem">
117 <div class="memberName">closure context</div>
118 <div class="memberValue">
119 <any-service-ref ref="{{ instance.context }}">
120 </any-service-ref>
121 </div>
122 </div>
123 <div class="memberItem">
124 <div class="memberName">closure breakpoint</div>
125 <div class="memberValue">
126 <template if="{{ instance.activationBreakpoint == null }}">
127 <action-link callback="{{ setBreakOnActivation }}"
128 label="break on activation">
129 </action-link>
130 </template>
131 <template if="{{ instance.activationBreakpoint != null }}">
132 {{ instance.activationBreakpoint.toString() }}
133 <action-link callback="{{ clearBreakOnActivation }}"
134 label="remove">
135 </action-link>
136 </template>
137 </div>
138 </div>
139 </template>
140
141 <div class="memberItem">
142 <div class="memberName">toString()</div>
143 <div class="memberValue">
144 <eval-link callback="{{ evaluate }}" expr="toString()"></eval-link>
145 </div>
146 </div>
147 <div class="memberItem">
148 <div class="memberName">runtimeType</div>
149 <div class="memberValue">
150 <eval-link callback="{{ evaluate }}" expr="runtimeType"></eval-link>
151 </div>
152 </div>
153 </div>
154 </div>
155
156 <hr>
157
158 <div class="content">
159 <eval-box context="{{ instance }}"></eval-box>
160 </div>
161
162 <hr>
163
164 <div class="content">
165 <template if="{{ instance.nativeFields.isNotEmpty }}">
166 native fields ({{ instance.nativeFields.length }})
167 <curly-block expand="{{ instance.nativeFields.length <= 100 }}">
168 <div class="memberList">
169 <template repeat="{{ field in instance.nativeFields }}">
170 <div class="memberItem">
171 <div class="memberName">[{{ field['index']}}]</div>
172 <div class="memberValue">[{{ field['value']}}]</div>
173 </div>
174 </template>
175 </div>
176 </curly-block><br><br>
177 </template>
178
179 <template if="{{ instance.fields.isNotEmpty }}">
180 fields ({{ instance.fields.length }})
181 <curly-block expand="{{ instance.fields.length <= 100 }}">
182 <div class="memberList">
183 <template repeat="{{ field in instance.fields }}">
184 <div class="memberItem">
185 <div class="memberName">
186 <field-ref ref="{{ field.decl }}"></field-ref>
187 </div>
188 <div class="memberValue">
189 <any-service-ref ref="{{ field.value }}"></any-service-ref>
190 </div>
191 </div>
192 </template>
193 </div>
194 </curly-block><br><br>
195 </template>
196
197 <template if="{{ instance.elements.isNotEmpty }}">
198 elements ({{ instance.length }})
199 <curly-block expand="{{ instance.elements.length <= 100 }}">
200 <div class="memberList">
201 <template repeat="{{ index in instance.elements.asMap().keys }}">
202 <div class="memberItem">
203 <div class="memberName">[{{ index }}]</div>
204 <div class="memberValue">
205 <any-service-ref ref="{{ instance.elements[index] }}">
206 </any-service-ref>
207 </div>
208 </div>
209 </template>
210 <template if="{{ instance.length != instance.elements.length }}">
211 <div class="memberItem">
212 <div class="memberName">...</div>
213 <div class="memberValue">
214 <em>{{ instance.length - instance.elements.length }} omitted e lements</em>
215 </div>
216 </div>
217 </template>
218 </div>
219 </curly-block><br><br>
220 </template>
221
222 <template if="{{ instance.associations.isNotEmpty }}">
223 associations ({{ instance.length }})
224 <curly-block expand="{{ instance.associations.length <= 100 }}">
225 <div class="memberList">
226 <template repeat="{{ association in instance.associations }}">
227 <div class="memberItem">
228 <div class="memberValue">
229 [<any-service-ref ref="{{ association.key }}"></any-service-re f>]
230 </div>
231 <div class="memberValue">
232 <any-service-ref ref="{{ association.value }}"></any-service-r ef>
233 </div>
234 </div>
235 </template>
236 <template if="{{ instance.length != instance.associations.length }}">
237 <div class="memberItem">
238 <div class="memberName">...</div>
239 <div class="memberValue">
240 <em>{{ instance.length - instance.associations.length }} omitt ed associations</em>
241 </div>
242 </div>
243 </template>
244 </div>
245 </curly-block><br><br>
246 </template>
247
248 <template if="{{ instance.typedElements.isNotEmpty }}">
249 elements ({{ instance.length }})
250 <curly-block expand="{{ instance.typedElements.length <= 100 }}">
251 <div class="memberList">
252 <template repeat="{{ index in instance.typedElements.asMap().keys }} ">
253 <div class="memberItem">
254 <div class="memberName">[{{ index }}]</div>
255 <div class="memberValue">{{ instance.typedElements[index].toStri ng() }}</div>
256 </div>
257 </template>
258 <template if="{{ instance.length != instance.typedElements.length }}">
259 <div class="memberItem">
260 <div class="memberName">...</div>
261 <div class="memberValue">
262 <em>{{ instance.length - instance.elements.length }} omitted e lements</em>
263 </div>
264 </div>
265 </template>
266 </div>
267 </curly-block><br><br>
268 </template>
269
270 <template if="{{ instance.isRegExp }}">
271 <div class="memberList">
272 <div class="memberItem">
273 <div class="memberName">pattern</div>
274 <div class="memberValue">
275 <any-service-ref ref="{{ instance.pattern }}"></any-service-ref>
276 </div>
277 </div>
278 <div class="memberItem">
279 <div class="memberName">isCaseSensitive</div>
280 <div class="memberValue">{{ instance.isCaseSensitive }}</div>
281 </div>
282 <div class="memberItem">
283 <div class="memberName">isMultiLine</div>
284 <div class="memberValue">{{ instance.isMultiLine }}</div>
285 </div>
286 <div class="memberItem">
287 <div class="memberName">oneByteFunction</div>
288 <div class="memberValue">
289 <any-service-ref ref="{{ instance.oneByteFunction }}"></any-servic e-ref>
290 </div>
291 </div>
292 <div class="memberItem">
293 <div class="memberName">twoByteFunction</div>
294 <div class="memberValue">
295 <any-service-ref ref="{{ instance.twoByteFunction }}"></any-servic e-ref>
296 </div>
297 </div>
298 <div class="memberItem">
299 <div class="memberName">externalOneByteFunction</div>
300 <div class="memberValue">
301 <any-service-ref ref="{{ instance.externalOneByteFunction }}"></an y-service-ref>
302 </div>
303 </div>
304 <div class="memberItem">
305 <div class="memberName">externalTwoByteFunction</div>
306 <div class="memberValue">
307 <any-service-ref ref="{{ instance.externalTwoByteFunction }}"></an y-service-ref>
308 </div>
309 </div>
310 <div class="memberItem">
311 <div class="memberName">oneByteBytecode</div>
312 <div class="memberValue">
313 <any-service-ref ref="{{ instance.oneByteBytecode }}"></any-servic e-ref>
314 </div>
315 </div>
316 <div class="memberItem">
317 <div class="memberName">twoByteBytecode</div>
318 <div class="memberValue">
319 <any-service-ref ref="{{ instance.twoByteBytecode }}"></any-servic e-ref>
320 </div>
321 </div>
322 </div>
323 </template>
324
325 <template if="{{ instance.isMirrorReference }}">
326 <div class="memberItem">
327 <div class="memberName">referent</div>
328 <div class="memberValue">
329 <any-service-ref ref="{{ instance.referent }}">
330 </any-service-ref>
331 </div>
332 </div>
333 </template>
334
335 <template if="{{ instance.isWeakProperty }}">
336 <div class="memberItem">
337 <div class="memberName">key</div>
338 <div class="memberValue">
339 <any-service-ref ref="{{ instance.key }}"></any-service-ref>
340 </div>
341 </div>
342 <div class="memberItem">
343 <div class="memberName">value</div>
344 <div class="memberValue">
345 <any-service-ref ref="{{ instance.value }}"></any-service-ref>
346 </div>
347 </div>
348 </template>
349
350 </div>
351
352 <div class="content-centered-big">
353 <template if="{{ instance.isClosure }}">
354 <source-inset location="{{ instance.closureFunction.location }}"></sourc e-inset>
355 </template>
356 <template if="{{ instance.typeClass != null }}">
357 <source-inset location="{{ instance.typeClass.location }}"></source-inse t>
358 </template>
359 </div>
360
361 <view-footer></view-footer>
362 </template>
363 </polymer-element>
364
365 <script type="application/dart" src="instance_view.dart"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698