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

Side by Side Diff: pkg/observe/lib/src/messages.dart

Issue 513023002: Step one towards stable error messages with details: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
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.
4
5 /// Contains all warning messages produced by the observe transformer.
6 library observe.src.messages;
7
8 import 'package:code_transformers/messages/messages.dart';
9
10 const noObservableOnLibrary = const MessageTemplate(
11 const MessageId('observe', 1),
12 '@observable on a library no longer has any effect. '
13 'It should be placed on individual fields.',
Kathy Walrath 2014/09/03 19:36:05 It should... fields. -> Instead, annotate individu
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 Done.
14 '`@observable` on a library is not supported.',
Kathy Walrath 2014/09/03 19:36:06 These messages have a slightly different format fr
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 Done.
15 _COMMON_MESSAGE_WHERE_TO_USE_OBSERVABLE);
16
17 const noObservableOnTopLevel = const MessageTemplate(
18 const MessageId('observe', 2),
19 'Top-level fields can no longer be observable. '
20 'Observable fields should be put in observable objects.',
21 '`@observable` on top-level fields is not supported.',
Kathy Walrath 2014/09/03 19:36:05 -> '`@observable` not supported on top-level field
Siggi Cherem (dart-lang) 2014/09/04 02:32:15 Done.
22 _COMMON_MESSAGE_WHERE_TO_USE_OBSERVABLE);
23
24 const noObservableOnClass = const MessageTemplate(
25 const MessageId('observe', 3),
26 '@observable on a class no longer has any effect. '
27 'It should be placed on individual fields.',
28 '`@observable` on classes is not supported.',
Kathy Walrath 2014/09/03 19:36:06 -> '`@observable` not supported on classes',
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 Done.
29 _COMMON_MESSAGE_WHERE_TO_USE_OBSERVABLE);
30
31 const noObservableOnStaticField = const MessageTemplate(
32 const MessageId('observe', 4),
33 'Static fields can no longer be observable. '
34 'Observable fields should be put in observable objects.',
Kathy Walrath 2014/09/03 19:36:05 should be put in -> must be in [GLOBAL]
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 Done.
35 '`@observable` on static fields is not supported.',
Kathy Walrath 2014/09/03 19:36:05 -> '`@observable` not supported on static fields',
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 Done.
36 _COMMON_MESSAGE_WHERE_TO_USE_OBSERVABLE);
37
38 const requireObservableInterface = const MessageTemplate(
39 const MessageId('observe', 5),
40 'Observable fields should be put in an observable '
Kathy Walrath 2014/09/03 19:36:05 an observable -> observable
Siggi Cherem (dart-lang) 2014/09/04 02:32:15 Done.
41 'objects. Please declare that this class extends from '
Kathy Walrath 2014/09/03 19:36:06 Please declare -> Change this class to extend, inc
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 include -> mixin
42 'Observable, includes Observable, or implements '
43 'Observable.',
44 '`@observable` must be used on a class that implements `Observable`.',
Kathy Walrath 2014/09/03 19:36:06 -> '`@observable` field not in an `Observable` cla
Siggi Cherem (dart-lang) 2014/09/04 02:32:14 Done.
45 _COMMON_MESSAGE_WHERE_TO_USE_OBSERVABLE);
46
47 const String _COMMON_MESSAGE_WHERE_TO_USE_OBSERVABLE = '''
48 Long ago `@observable` was supported on classes, libraries, and even top-level
49 declarations and static fields. Today, the annotation has no effect on these
50 elements. Only instance fields on `Observable` classes are supported, and you
51 must explicitly opt-in on each field you wish to make observable.
Kathy Walrath 2014/09/03 19:36:06 I'm not crazy about having the same text for each
Siggi Cherem (dart-lang) 2014/09/04 02:32:15 Done. Yeah, I'm not a fan of repeating the message
52 ''';
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698