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

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

Issue 27618002: package:observe fix various api issues (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 | « pkg/observe/lib/src/path_observer.dart ('k') | pkg/observe/pubspec.yaml » ('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 ecf43538de4d713383ebfdcf44a990e0234c3b2e..3e0aac25cae17c265ee72ac98f27439296be9f82 100644
--- a/pkg/observe/lib/transform.dart
+++ b/pkg/observe/lib/transform.dart
@@ -138,10 +138,10 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
var declaresObservable = false;
if (cls.extendsClause != null) {
var id = _getSimpleIdentifier(cls.extendsClause.superclass.name);
- if (id.name == 'ObservableBase') {
- code.edit(id.offset, id.end, 'ChangeNotifierBase');
+ if (id.name == 'Observable') {
+ code.edit(id.offset, id.end, 'ChangeNotifier');
declaresObservable = true;
- } else if (id.name == 'ChangeNotifierBase') {
+ } else if (id.name == 'ChangeNotifier') {
declaresObservable = true;
} else if (id.name != 'HtmlElement' && id.name != 'CustomElement'
&& id.name != 'Object') {
@@ -154,11 +154,11 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
if (cls.withClause != null) {
for (var type in cls.withClause.mixinTypes) {
var id = _getSimpleIdentifier(type.name);
- if (id.name == 'ObservableMixin') {
- code.edit(id.offset, id.end, 'ChangeNotifierMixin');
+ if (id.name == 'Observable') {
+ code.edit(id.offset, id.end, 'ChangeNotifier');
declaresObservable = true;
break;
- } else if (id.name == 'ChangeNotifierMixin') {
+ } else if (id.name == 'ChangeNotifier') {
declaresObservable = true;
break;
} else {
@@ -194,7 +194,7 @@ void _transformClass(ClassDeclaration cls, TextEditTransaction code,
if (!declaresObservable) {
logger.warning('Observable fields should be put in an observable '
'objects. Please declare that this class extends from '
- 'ObservableBase, includes ObservableMixin, or implements '
+ 'Observable, includes Observable, or implements '
'Observable.',
span: _getSpan(file, member));
}
« no previous file with comments | « pkg/observe/lib/src/path_observer.dart ('k') | pkg/observe/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698