| OLD | NEW |
| 1 <link rel="import" href="../../../../packages/polymer/polymer.html"> | 1 <link rel="import" href="../../../../packages/polymer/polymer.html"> |
| 2 <link rel="import" href="class_ref.html"> | 2 <link rel="import" href="class_ref.html"> |
| 3 <link rel="import" href="instance_ref.html"> | 3 <link rel="import" href="instance_ref.html"> |
| 4 <link rel="import" href="library_ref.html"> | 4 <link rel="import" href="library_ref.html"> |
| 5 <link rel="import" href="nav_bar.html"> | 5 <link rel="import" href="nav_bar.html"> |
| 6 <link rel="import" href="script_ref.html"> | 6 <link rel="import" href="script_ref.html"> |
| 7 <link rel="import" href="observatory_element.html"> | 7 <link rel="import" href="observatory_element.html"> |
| 8 | 8 |
| 9 <polymer-element name="field-view" extends="observatory-element"> | 9 <polymer-element name="field-view" extends="observatory-element"> |
| 10 <template> | 10 <template> |
| 11 <link rel="stylesheet" href="css/shared.css"> | 11 <link rel="stylesheet" href="css/shared.css"> |
| 12 <nav-bar> | 12 <nav-bar> |
| 13 <top-nav-menu></top-nav-menu> | 13 <top-nav-menu></top-nav-menu> |
| 14 <isolate-nav-menu isolate="{{ field.isolate }}"></isolate-nav-menu> | 14 <isolate-nav-menu isolate="{{ field.isolate }}"></isolate-nav-menu> |
| 15 <template if="{{ field['owner'].serviceType == 'Class' }}"> | 15 <template if="{{ field['owner'].serviceType == 'Class' }}"> |
| 16 <!-- TODO(turnidge): Add library nav menu here. --> | 16 <!-- TODO(turnidge): Add library nav menu here. --> |
| 17 <class-nav-menu cls="{{ field['owner'] }}"></class-nav-menu> | 17 <class-nav-menu cls="{{ field['owner'] }}"></class-nav-menu> |
| 18 </template> | 18 </template> |
| 19 <template if="{{ field['owner'].serviceType == 'Library' }}"> | 19 <template if="{{ field['owner'].serviceType == 'Library' }}"> |
| 20 <library-nav-menu library="{{ field['owner'] }}"></library-nav-menu> | 20 <library-nav-menu library="{{ field['owner'] }}"></library-nav-menu> |
| 21 </template> | 21 </template> |
| 22 <nav-menu link="{{ field.link }}" anchor="{{ field['user_name'] }}" last="
{{ true }}"></nav-menu> | 22 <nav-menu link="{{ field.link }}" anchor="{{ field.name }}" last="{{ true
}}"></nav-menu> |
| 23 <nav-refresh callback="{{ refresh }}"></nav-refresh> | 23 <nav-refresh callback="{{ refresh }}"></nav-refresh> |
| 24 <nav-control></nav-control> | 24 <nav-control></nav-control> |
| 25 </nav-bar> | 25 </nav-bar> |
| 26 | 26 |
| 27 <div class="content"> | 27 <div class="content"> |
| 28 <h1> | 28 <h1> |
| 29 <template if="{{ field['static'] }}">static</template> | 29 <template if="{{ field['static'] }}">static</template> |
| 30 <template if="{{ field['final'] }}">final</template> | 30 <template if="{{ field['final'] }}">final</template> |
| 31 <template if="{{ field['const'] }}">const</template> | 31 <template if="{{ field['const'] }}">const</template> |
| 32 <template if="{{ (field['declared_type']['name'] == 'dynamic' && | 32 <template if="{{ (field['declaredType'].name == 'dynamic' && |
| 33 !field['final'] && !field['const']) }}"> | 33 !field['final'] && !field['const']) }}"> |
| 34 var | 34 var |
| 35 </template> | 35 </template> |
| 36 <template if="{{ (field['declared_type']['user_name'] != 'dynamic') }}"> | 36 <template if="{{ (field['declaredType'].name != 'dynamic') }}"> |
| 37 {{ field['declared_type']['user_name'] }} | 37 {{ field['declaredType'].name }} |
| 38 </template> | 38 </template> |
| 39 {{ field['user_name'] }} | 39 {{ field.name }} |
| 40 </h1> | 40 </h1> |
| 41 <div class="memberList"> | 41 <div class="memberList"> |
| 42 <div class="memberItem"> | 42 <div class="memberItem"> |
| 43 <div class="memberName">owner</div> | 43 <div class="memberName">owner</div> |
| 44 <div class="memberValue"> | 44 <div class="memberValue"> |
| 45 <template if="{{ field['owner'].serviceType == 'Class' }}"> | 45 <template if="{{ field['owner'].serviceType == 'Class' }}"> |
| 46 <class-ref ref="{{ field['owner'] }}"></class-ref> | 46 <class-ref ref="{{ field['owner'] }}"></class-ref> |
| 47 </template> | 47 </template> |
| 48 <template if="{{ field['owner'].serviceType != 'Class' }}"> | 48 <template if="{{ field['owner'].serviceType != 'Class' }}"> |
| 49 <library-ref ref="{{ field['owner'] }}"></library-ref> | 49 <library-ref ref="{{ field['owner'] }}"></library-ref> |
| 50 </template> | 50 </template> |
| 51 </div> | 51 </div> |
| 52 </div> | 52 </div> |
| 53 <div class="memberItem"> | 53 <div class="memberItem"> |
| 54 <div class="memberName">script</div> | 54 <div class="memberName">script</div> |
| 55 <div class="memberValue"> | 55 <div class="memberValue"> |
| 56 <script-ref ref="{{ field['script'] }}"></script-ref> | 56 <script-ref ref="{{ field['script'] }}"></script-ref> |
| 57 </div> | 57 </div> |
| 58 </div> | 58 </div> |
| 59 <template if="{{ !field['static'] }}"> | 59 <template if="{{ !field['static'] }}"> |
| 60 <div class="memberItem" | 60 <div class="memberItem" |
| 61 title="The types observed for this field at runtime. Fields that
are observed to have a single type at runtime or to never be null may allow for
additional optimization."> | 61 title="The types observed for this field at runtime. Fields that
are observed to have a single type at runtime or to never be null may allow for
additional optimization."> |
| 62 <div class="memberName">observed types</div> | 62 <div class="memberName">observed types</div> |
| 63 <div class="memberValue"> | 63 <div class="memberValue"> |
| 64 <template if="{{ field['guard_class'] == 'dynamic' }}"> | 64 <template if="{{ field['guardClass'] == 'dynamic' }}"> |
| 65 various | 65 various |
| 66 </template> | 66 </template> |
| 67 <template if="{{ field['guard_class'] == 'unknown' }}"> | 67 <template if="{{ field['guardClass'] == 'unknown' }}"> |
| 68 none | 68 none |
| 69 </template> | 69 </template> |
| 70 <template if="{{ field['guard_class'] != 'unknown' && | 70 <template if="{{ field['guardClass'] != 'unknown' && |
| 71 field['guard_class'] != 'dynamic' }}"> | 71 field['guardClass'] != 'dynamic' }}"> |
| 72 <class-ref ref="{{ field['guard_class'] }}"></class-ref> | 72 <class-ref ref="{{ field['guardClass'] }}"></class-ref> |
| 73 <template if="{{ field['guard_nullable'] }}"> | 73 <template if="{{ field['guardNullable'] }}"> |
| 74 — null observed | 74 — null observed |
| 75 </template> | 75 </template> |
| 76 <template if="{{ !field['guard_nullable'] }}"> | 76 <template if="{{ !field['guardNullable'] }}"> |
| 77 — null not observed | 77 — null not observed |
| 78 </template> | 78 </template> |
| 79 </template> | 79 </template> |
| 80 </div> | 80 </div> |
| 81 </div> | 81 </div> |
| 82 </template> | 82 </template> |
| 83 <template if="{{ field['value'] != null }}"> | 83 <template if="{{ field['value'] != null }}"> |
| 84 <div class="memberItem"> | 84 <div class="memberItem"> |
| 85 <div class="memberName">static value</div> | 85 <div class="memberName">static value</div> |
| 86 <div class="memberValue"> | 86 <div class="memberValue"> |
| 87 <instance-ref ref="{{ field['value'] }}"></instance-ref> | 87 <instance-ref ref="{{ field['value'] }}"></instance-ref> |
| 88 </div> | 88 </div> |
| 89 </div> | 89 </div> |
| 90 </template> | 90 </template> |
| 91 </div> | 91 </div> |
| 92 </div> | 92 </div> |
| 93 </template> | 93 </template> |
| 94 </polymer-element> | 94 </polymer-element> |
| 95 | 95 |
| 96 <script type="application/dart" src="field_view.dart"></script> | 96 <script type="application/dart" src="field_view.dart"></script> |
| OLD | NEW |