Refine IntDef annotation generation for java_cpp_enum |
||
Issue descriptionThe current generator creates a class with the enum name, with fields that are the int values and a nested interface for the annotation. That creates type names such as `NTPTileType.NTPTileTypeEnum` An improvement would be to have the outer type be the annotation, and the int values constants under the annotation type, resulting in more compact type names. Example that is manually created: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/ItemViewType.java?q=ItemViewType&dr=CSs&l=16
,
Apr 11 2017
The following revision refers to this bug: https://chrome-internal.googlesource.com/clank/internal/apps/+/18e4bc7bf81f408bbde93be7232b89771cd70225 commit 18e4bc7bf81f408bbde93be7232b89771cd70225 Author: Nicolas Dossou-gbete <dgn@chromium.org> Date: Tue Apr 11 04:25:46 2017
,
Apr 11 2017
,
May 12 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2b5c5e827022eb7f91ae9036181151576c0ade65 commit 2b5c5e827022eb7f91ae9036181151576c0ade65 Author: dgn <dgn@chromium.org> Date: Fri May 12 20:33:39 2017 Cleanup definition of ActivityState and ApplicationStatus warnings Removed the redundant ActivityStateEnum intdef definition and resolved lint warnings in the ActivityState and ApplicationStatus classes. Also updated the c++ enum conversion doc about the new IntDef declaration style that was added in https://crrev.com/14f477472e0e8612c98763b68e9a51bcae954c24 BUG= 707186 Review-Url: https://codereview.chromium.org/2877743002 Cr-Commit-Position: refs/heads/master@{#471432} [modify] https://crrev.com/2b5c5e827022eb7f91ae9036181151576c0ade65/base/android/java/src/org/chromium/base/ActivityState.java [modify] https://crrev.com/2b5c5e827022eb7f91ae9036181151576c0ade65/base/android/java/src/org/chromium/base/ApplicationStatus.java [modify] https://crrev.com/2b5c5e827022eb7f91ae9036181151576c0ade65/docs/android_accessing_cpp_enums_in_java.md |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Apr 11 2017