[
https://issues.apache.org/jira/browse/ZOOKEEPER-4880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
luozongle updated ZOOKEEPER-4880:
---------------------------------
Description:
When I was learning protobuf, I found that the comments in the proto file would
be generated into the code. I think this feature is very useful. I wonder if
this feature can be added to zookeeper, because in the process of learning
zookeeper, we can directly see the attribute comments of the relevant classes
generated by jute, and there is no need to check the meaning of the fields in
zookeeper.jute. Although I found that there are not many comments in the
zookeeper.jute file, I think it would be helpful to generate the comments into
the code.
And I studied javacc and found that javacc supports this feature. We can get
the comments in zookeeper.jute through SPECIAL_TOKEN.
If possible, I hope to contribute a PR.
was:
我在学习protobuf的时候发现proto文件中的注释会生成到代码中,我觉得这个功能很有用,不知道能不能在zookeeper中加入这个功能,因为在学习zookeeper的过程中,我们可以直接看到jute生成的相关类的属性注释,不需要再去查zookeeper.jute中字段的含义了。虽然我发现zookeeper.jute文件中的注释并不多,但我觉得将注释生成到代码中还是很有帮助的。
而且我研究了一下javacc,发现javacc是支持这个特性的,我们可以通过SPECIAL_TOKEN来获取zookeeper.jute中的注释。
如果可以的话希望贡献一个PR。
> Generate comments from zookeeper.jute into code
> -----------------------------------------------
>
> Key: ZOOKEEPER-4880
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4880
> Project: ZooKeeper
> Issue Type: Improvement
> Components: jute
> Reporter: luozongle
> Priority: Trivial
>
> When I was learning protobuf, I found that the comments in the proto file
> would be generated into the code. I think this feature is very useful. I
> wonder if this feature can be added to zookeeper, because in the process of
> learning zookeeper, we can directly see the attribute comments of the
> relevant classes generated by jute, and there is no need to check the meaning
> of the fields in zookeeper.jute. Although I found that there are not many
> comments in the zookeeper.jute file, I think it would be helpful to generate
> the comments into the code.
> And I studied javacc and found that javacc supports this feature. We can get
> the comments in zookeeper.jute through SPECIAL_TOKEN.
> If possible, I hope to contribute a PR.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)