GENERATED_JAVA_ENUM_PACKAGE doesn't support single line enums |
|||
Issue description
If you try to compile a one-line enum such as the following:
```
// A Java counterpart will be generated for this enum.
// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.notifications
enum NotificationActionType { BUTTON, TEXT };
```
..it fails and asks if you forgot to add the "// GENERATED_JAVA_ENUM_PACKAGE:" annotation. But it compiles just fine when symbols are placed on separate lines.
It is particularly annoying because `git cl format` will turn a multiline enum into a single line one if it fits on one line.
Relevant script is in
build/android/gyp/java_cpp_enum.py
A new test should be added in
build/android/gyp/java_cpp_enum_tests.py
,
Nov 16 2016
I'll take a look at this sometime this week since I've been looking at these files already!
,
Nov 16 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4fdbbc3aeeb41eed8b6a65f29662ebb7865b0af0 commit 4fdbbc3aeeb41eed8b6a65f29662ebb7865b0af0 Author: estevenson <estevenson@chromium.org> Date: Wed Nov 16 23:36:50 2016 Add support for single line enums to java_cpp_enum.py. This CL changes java_cpp_enum.py to handle single line enums. E.g. // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.notifications enum NotificationActionType { BUTTON, TEXT }; BUG= 657847 Review-Url: https://codereview.chromium.org/2511533002 Cr-Commit-Position: refs/heads/master@{#432661} [modify] https://crrev.com/4fdbbc3aeeb41eed8b6a65f29662ebb7865b0af0/build/android/gyp/java_cpp_enum.py [modify] https://crrev.com/4fdbbc3aeeb41eed8b6a65f29662ebb7865b0af0/build/android/gyp/java_cpp_enum_tests.py
,
Nov 17 2016
,
Nov 17 2016
yay, thanks :-) |
|||
►
Sign in to add a comment |
|||
Comment 1 by awdf@chromium.org
, Oct 20 2016