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

Unified Diff: pkg/observe/lib/transform.dart

Issue 26863008: Fix observe package to work with new barback logger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | pkg/observe/test/transform_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/observe/lib/transform.dart
diff --git a/pkg/observe/lib/transform.dart b/pkg/observe/lib/transform.dart
index d1e8139d485d8c8085d7113c907028f4f3173163..fc49497716dc8e5322dc5ee7c6aefddb8bbcc359 100644
--- a/pkg/observe/lib/transform.dart
+++ b/pkg/observe/lib/transform.dart
@@ -68,7 +68,7 @@ TextEditTransaction _transformCompilationUnit(
if (directive is LibraryDirective && _hasObservable(directive)) {
logger.warning('@observable on a library no longer has any effect. '
'It should be placed on individual fields.',
- _getSpan(sourceFile, directive));
+ span: _getSpan(sourceFile, directive));
break;
}
}
@@ -80,7 +80,7 @@ TextEditTransaction _transformCompilationUnit(
if (_hasObservable(declaration)) {
logger.warning('Top-level fields can no longer be observable. '
'Observable fields should be put in an observable objects.',
- _getSpan(sourceFile, declaration));
+ span: _getSpan(sourceFile, declaration));
}
}
}
@@ -124,7 +124,7 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
if (_hasObservable(cls)) {
logger.warning('@observable on a class no longer has any effect. '
'It should be placed on individual fields.',
- _getSpan(file, cls));
+ span: _getSpan(file, cls));
}
// We'd like to track whether observable was declared explicitly, otherwise
@@ -182,7 +182,7 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
if (_hasObservable(member)){
logger.warning('Static fields can no longer be observable. '
'Observable fields should be put in an observable objects.',
- _getSpan(file, member));
+ span: _getSpan(file, member));
}
continue;
}
@@ -192,7 +192,7 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
'objects. Please declare that this class extends from '
'ObservableBase, includes ObservableMixin, or implements '
'Observable.',
- _getSpan(file, member));
+ span: _getSpan(file, member));
}
_transformFields(file, member, code, logger);
@@ -304,7 +304,7 @@ void _transformFields(SourceFile file, FieldDeclaration member,
final name = field.name.name;
if (Identifier.isPrivateName(name)) {
logger.warning('Cannot make private field $name observable.',
- _getSpan(file, field));
+ span: _getSpan(file, field));
return;
}
}
« no previous file with comments | « no previous file | pkg/observe/test/transform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698