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

Unified Diff: pkg/polymer/lib/src/declaration.dart

Issue 173473002: Adapting observe to use smoke (this is built on top of the previous change that (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/observe/pubspec.yaml ('k') | pkg/smoke/lib/mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/declaration.dart
diff --git a/pkg/polymer/lib/src/declaration.dart b/pkg/polymer/lib/src/declaration.dart
index bc3f424b7518e70624819aa3136b3ddf8ae9af36..d2b50a7619255abfdb5f1ba6244b605e816b3913 100644
--- a/pkg/polymer/lib/src/declaration.dart
+++ b/pkg/polymer/lib/src/declaration.dart
@@ -291,7 +291,7 @@ class PolymerDeclaration extends HtmlElement {
}
var decl = smoke.getDeclaration(_type, property);
- if (decl == null || !decl.isProperty || decl.isFinal) {
+ if (decl == null || decl.isMethod || decl.isFinal) {
window.console.warn('property for attribute $attr of polymer-element '
'name=$name not found.');
continue;
@@ -454,8 +454,8 @@ class PolymerDeclaration extends HtmlElement {
* properties.
*/
void inferObservers() {
- var options = const smoke.QueryOptions(includeProperties: false,
- includeMethods: true, includeInherited: true);
+ var options = const smoke.QueryOptions(includeFields: false,
+ includeProperties: false, includeMethods: true, includeInherited: true);
for (var decl in smoke.query(_type, options)) {
String name = smoke.symbolToName(decl.name);
if (name.endsWith(_OBSERVE_SUFFIX) && name != 'attributeChanged') {
@@ -473,8 +473,8 @@ class PolymerDeclaration extends HtmlElement {
* observe the associated properties.
*/
void explodeObservers() {
- var options = const smoke.QueryOptions(includeProperties: false,
- includeMethods: true, includeInherited: true,
+ var options = const smoke.QueryOptions(includeFields: false,
+ includeProperties: false, includeMethods: true, includeInherited: true,
withAnnotations: const [ObserveProperty]);
for (var decl in smoke.query(_type, options)) {
for (var meta in decl.annotations) {
« no previous file with comments | « pkg/observe/pubspec.yaml ('k') | pkg/smoke/lib/mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698