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

Unified Diff: README.md

Issue 2043913005: Change how to set the Dart name of a field (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: better error checking, clean up pubspec Created 4 years, 6 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 | « Makefile ('k') | lib/extension_generator.dart » ('j') | lib/names.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: README.md
diff --git a/README.md b/README.md
index bfb2f079378634dce9fc0269c1fdf895a3c4908d..86973eaba77a21c6209d1f30bffae22dc0dbf963 100644
--- a/README.md
+++ b/README.md
@@ -37,33 +37,6 @@ options `<option 1>` and `<option 2>` like this:
--dart_out="<option 1>,<option 2>:."
-#### Option for setting the name of field accessors
-
-The following message definition has the field name `has_field`.
-
- message MyMessage {
- optional string has_field = 1;
- }
-
-This poses the problem, that the Dart class will have a getter and a
-setter called `hasField`. This conflicts with the method `hasField`
-which is already defined on the superclass `GeneratedMessage`.
-
-To work around this problem the option `field_name` can be
-used. Option `field_name` takes two values separated by the vertical
-bar. The first value is the full name of the field and the second
-value is the name of the field in the generated Dart code. Passing the
-following option:
-
- --dart_out="field_name=MyMessage.has_field|HasFld:."
-
-Will generate the following message field accessors:
-
- String get hasFld => getField(1);
- void set hasFld(String v) { setField(1, v); }
- bool hasHasFld() => hasField(1);
- void clearHasFld() => clearField(1);
-
Using protocol buffer libraries to build new libraries
------------------------------------------------------
« no previous file with comments | « Makefile ('k') | lib/extension_generator.dart » ('j') | lib/names.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698