Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 function_ref_element; | 5 library function_ref_element; |
| 6 | 6 |
| 7 import 'package:polymer/polymer.dart'; | 7 import 'package:polymer/polymer.dart'; |
| 8 import 'package:observatory/service.dart'; | |
| 9 import 'service_ref.dart'; | 8 import 'service_ref.dart'; |
| 10 | 9 |
| 11 @CustomTag('function-ref') | 10 @CustomTag('function-ref') |
| 12 class FunctionRefElement extends ServiceRefElement { | 11 class FunctionRefElement extends ServiceRefElement { |
| 13 @published bool qualified = true; | 12 @published bool qualified = true; |
|
Michael Lippautz (Google)
2014/07/09 20:22:24
Get rid of 'qualified'?
Cutch
2014/07/09 20:43:31
We can't, it is used in the html template code.
Michael Lippautz (Google)
2014/07/09 21:02:11
Misread @published for @observable and did not und
| |
| 14 | 13 |
| 15 void refChanged(oldValue) { | |
| 16 super.refChanged(oldValue); | |
| 17 notifyPropertyChange(#hasParent, 0, 1); | |
| 18 notifyPropertyChange(#hasClass, 0, 1); | |
| 19 ServiceMap refMap = ref; | |
| 20 isDart = (refMap != null) && | |
| 21 (refMap['kind'] != 'Collected') && | |
| 22 (refMap['kind'] != 'Native') && | |
| 23 (refMap['kind'] != 'Tag') && | |
| 24 (refMap['kind'] != 'Reused'); | |
| 25 hasParent = (refMap != null && refMap['parent'] != null); | |
| 26 hasClass = (refMap != null && | |
| 27 refMap['owner'] != null && | |
| 28 refMap['owner'].serviceType == 'Class'); | |
| 29 } | |
| 30 | |
| 31 @observable bool hasParent = false; | |
| 32 @observable bool hasClass = false; | |
| 33 @observable bool isDart = false; | |
| 34 | |
| 35 FunctionRefElement.created() : super.created(); | 14 FunctionRefElement.created() : super.created(); |
| 36 } | 15 } |
| OLD | NEW |