用于使用 protobuf 的 Eclipse 插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/968578/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:46:39  来源:igfitidea点击:

Eclipse plugin for working with protobuf

javaeclipseeclipse-pluginprotocol-buffers

提问by Artyom Sokolov

Protocol Buffers(protobuf) are a way of encoding structured data in an efficient yet extensible format.

协议缓冲区(protobuf) 是一种以高效但可扩展的格式对结构化数据进行编码的方法。

There's pluginfor Netbeans, but I cannot find one for Eclipse. Does it exist? If yes, please, share the link.

有适用于 Netbeans的插件,但我找不到适用于 Eclipse的插件。它存在吗?如果是,请分享链接。

Thanks.

谢谢。

采纳答案by unBrice

I recommend using Google's "Protocol Buffers Development Tools". It is a plugin for Eclipse that features automagic regeneration and error checking with quick fixes, among other things. It's available here: https://github.com/google/protobuf-dt/blob/master/README.md.

我推荐使用 Google 的“Protocol Buffers Development Tools”。它是 Eclipse 的一个插件,具有自动再生和错误检查以及快速修复等功能。它可以在这里找到:https: //github.com/google/protobuf-dt/blob/master/README.md

回答by Paul Verest

I have tried protobuf-dt, that was the only plugin [on marketplace]. But it had some issues, so I created (November 2016) one that would fit protobuf and gRPC usage, that we have (generation inside maven buildwithout waiting for issuesto be solved)

我尝试过 protobuf-dt,这是 [市场上] 唯一的插件。但它有一些问题,所以我创建了(2016 年 11 月)一个适合 protobuf 和 gRPC 使用的,我们有(在 Maven 构建中生成,无需等待问题解决)

Welcome minimalist editor for .proto files. Just 25KB, works in any Eclipse (latest protobuf-dt 3.2 requires Neon) Sources and notes are at https://github.com/Enide/polyglot-maven-editors#minimalist-proto-files-editor-for-protocol-buffers-and-grpc

欢迎使用 .proto 文件的极简编辑器。仅 25KB,适用于任何 Eclipse(最新的 protobuf-dt 3.2 需要 Neon)来源和注释位于 https://github.com/Enide/polyglot-maven-editors#minimalist-proto-files-editor-for-protocol-buffers -and-grpc

It is already on Marketplace https://marketplace.eclipse.org/content/minimalist-proto-files-editor-protocol-buffers-and-grpc

它已经在市场上https://marketplace.eclipse.org/content/minimalist-proto-files-editor-protocol-buffers-and-grpc

回答by VonC

It does not seem to be approved by Eclipse yet.
And the EMF project uses protobuf, but not as a plugin.

似乎没有得到 Eclipse 的批准
EMF项目使用protobuf的,而不是作为一个插件。

So for now, no there do not seem to be any Eclipse protobuf plugin.

所以现在,似乎没有任何 Eclipse protobuf 插件。

回答by TJR

Using m2eclipse and directions from Issue 81/Comment 6for a a protobuf maven plugin, it works pretty well.

使用 m2eclipse 和Issue 81/Comment 6 中的说明作为 protobuf maven 插件,它工作得很好。

The only trick that doesn't work exactly is the "generated-sources/protobuf" will be created following the instructions is not automatically added to source folder in eclipse. Do this manually and you're g2g.

唯一不完全有效的技巧是按照说明创建的“generated-sources/protobuf”不会自动添加到eclipse中的源文件夹中。手动执行此操作,您就是 g2g。

Related Stackoverflow Issues:

相关的 Stackoverflow 问题: