Protocol Buffers (protobuf) are a way of encoding structured data in an efficient yet extensible format.
There's plugin for Netbeans, but I cannot find one for Eclipse. Does it exist? If yes, please, share the link.
Thanks.
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 .
It does not seem to be approved by Eclipse yet.
And the EMF project uses protobuf, but not as a plugin.
So for now, no there do not seem to be any Eclipse protobuf plugin.
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 build without waiting for issues to be solved)
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
It is already on Marketplace https://marketplace.eclipse.org/content/minimalist-proto-files-editor-protocol-buffers-and-grpc
Using m2eclipse and directions from Issue 81/Comment 6 for a a protobuf maven plugin, it works pretty well.
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.
Related Stackoverflow Issues:
how-do-i-get-support-for-gpb-in-eclipse
integrate-protocol-buffers-into-maven2-build
Related
Good evening,
I'm designing program that users would then use on their own computer. I have two questions:
I need to import Apache POI into my libraries, but can't quite find how to do it (I spent 2 hours looking for it on the internet and on StackOverflow, but can't find anything that works).
I am using a Mac with the latest version of both Mac OS and Eclipse, and downloaded poi-4.1.2 from the Apache POI website, but I can't add it to my library.
I'm quite new to this, so I don't really understand how to add libraries (I only managed to add JUnit after following a very thorough guide).
Secondly, given that the users will use the program on their computer, would it be possible for them to use it without downloading Apache POI, or is there a way I can add it straight into the program ?
Thanks in advance
External libraries can be imported in your project as dependencies using Maven, Gradle or adding them manually to your Java Project "Build Path".
Since many years we use widely Maven to build projects and it is a great tool. I think it is the best tool I have used to handling dependencies. So I think you can use it too. Learn Maven and you will win many days per months of work on projects deployments, testing and building processes.
Your program will be bundled and all its own dependency. It's up to you to use some Maven plugins to build a fat jar or a more precise work with the assembly plugin.
If you want to distribute your work to people whom don't know how it works, I think a fat jar with all your dependencies included is the best way to go.
Good coding !
Building Java projects straight from the IDE in IntelliJ has been nice. It's fast and it just works. I wasn't able to find any documentation on how IntelliJ does these default builds. I'm guessing it uses Ant? What I want to do is automate this fast and painless build process for anyone who downloads my project. Is that possible?
I've usually used Maven, but it's very slow and error prone. I actually wasn't even able to convert this to a Maven project, because Maven refuses to find JUnit despite setting up the dependency according to examples in the official docs. I also tried to generate Ant build files from the IDE, but those do not work out of the box and after googling a bit, seems like that is not a good approach?
IntelliJ IDEA has its own build system, called JPS. It has limited support for automatic download of dependencies and it's really hard to invoke from the command line, so it's unlikely to be the best option for everyone who downloads your project, unless you want to force them to use IntelliJ IDEA.
I've been looking into scala lately and from the conciseness and language features I'm completely thrilled.
I have netbeans 8.0 running on ubuntu 12.04 and downloaded scala, edited netbeans.conf (netbeans_default_options="-J-Dscala.home=...), installed plugins from plugin manager inside netbeans (ALL OF THEM). Then, I created scala project (not maven one) and tried out autocomplete. It works, compiles, runs, however, it shows no document found in autocompletion.
This is how I added javadocs Tools > Scala platforms > javadoc tab
I tried adding following ways:
added the entire scala api doc zip from http://downloads.typesafe.com/scala/2.11.2/scala-docs-2.11.2.zip
extracted the previous zip to scala-home folder under $SCALA_HOME/docs/javadocs/scala-docs-2.11.2 and added that
same as 2 but added $SCALA_HOME/docs/javadocs/scala-docs-2.11.2/api in netbeans
None of these pick up documentation! Of course, I could live without it, but it's such a killer for such a concise language where I could just find out stuff instantly from autocompletion. Also, I don't want to use eclipse special ide for scala because I don't want to throw out all the experience with netbeans out of the window and learn new IDE.
P.S. - Netbeans navigator also seem not to work in scala.
And I wonder why there's so little content on google for such a wonderful language?
There is no need to change to IntelliJ. Use the right build tool -sbt or Maven- and everything works fine.
In Netbeans you can use e.g. free Application Servers.
Netbeans support for scala seems pathetic so I just decided to jump to IntelliJ IDEA. It was little bit of learning curve but I'm glad I did because now everything was working (autocomplete, documentation, awesome SBT support etc. etc.)
trying to do some Android development, which means Eclipse, however, most of my experience is Microsoft tools (e.g. Visual Studio). My java experience is mostly either Blackberry dev in the JDE and some miscellaneous stuff back in the Java 1.0 days.
My question is this. In VS200x, there is a .sln (solution), .csproj(project), etc...
What are the equivalent file extensions for Eclipse? Do they even exist? I am having trouble with the basics, like how does one load a project into a workspace.
Is there a tutorial for Microsoft refugees somewhere?
Have a look here for "An introduction to Eclipse for Visual Studio users"...
Basically, for Java program (I never done any Android development) the basic Eclipse configuration files for a project are a .classpath (defining the dependencies of your project), and a .project file, that contains all specificities to your project configuration. In addition to that, a .settings directory is created, which contains some configuration files for plugins activated on your project.
Edit:
Eclipse is the most used IDE for the Java development. However, the best IDE is JetBrains IntelliJ IDEA. I see that there is a plugin for it to develop Android applications (here). If you can affort this wonderful application ($249), you will not regret it! You may eventually try the free 30 days trial...
You need to use file import and then choose Existing projects into workspace.
A .project file and a .classpath file will be created.
I find the Eclipse way of working to be incredibly frustrating having come from Delphi/JBuilder where a single project file held all your settings.
Make sure that you back up your workspace as well - there is nothing worse than recreating it when you are under pressure!
My 2 cents :
Make sure to version control your .project and .classpath. You may aslo want to use path variables to reference directory where the external dependencies (third parties libs) are located.
Are you doing it for fun or for commercial purposes? Because if money is involved, if I were you, I would really consider investing in IntelliJ, which is arguably the best IDE Java IDE out there, but unfortunately it is not exactly free. The Android SDK has some support for IntelliJ out of the box so it's not like you had to write all the makefiles yourself manually. If you liked Visual Studio, you would like IntelliJ, so why don't you download the trial version and have a look at it.
Just my 2 cents.
I would like to have both Eclipse and Netbeans (with JUnit) installed on one system, so I can be somewhat familiar with both.
Besides GUI development (see "Using both Eclipse and Netbeans"), are there any other issues with using both IDEs on the same system, or even the same project?
We regularly use both Netbeans and Eclipse. We switch back and forth, between Vista, WinXP, and multiple versions of Fedora of the 32- and 64-bit variety, with no problems. Keeping the project files in version control makes keeping them in sync much easier. We even keep the launch files in the project directory as well. I posted a answer to another multiple IDEs question that describes what our project directory looks like.
Basically, I agree with Bill the Lizard about there being no issues, but disagree about the seamless nature and keeping the project files separate. The only thing we have to do is make sure that we update the build classpath in each project if a new library is added because Netbeans and Eclipse use different files to describe the classpath.
Using the IDE version control system integrations helps to encourage keeping the projects up to date for everyone else.
One thing that makes developing single project in NetBeans and Eclipse is using maven to keep dependencies together. Maven will generate IDE specific files that contain all classpath information, buildpaths etc.
Maven has pretty steep learning curve, but it is worth learning.
There are no issues at all with having them on the same system. However, each have their own project specific files, so using them on the same project isn't seamless. This is made a lot easier if you're using source control and keep your (non-source code) project files separate.
Maven is a very good way to keep both IDEs in sync (as suggested). In my experience though, you have to create an Ant build for any given project for the sake of developers not using IDEs. Since NetBeans's build system is based on Ant, it's pretty trivial to just base the entire NetBeans project off of that base build system. A little bit of tweaking in the project.xml ensures that the editor classpath is kept in sync with the Ant build classpath.
Netbeans 6.5 has an improved Eclipse project import which is supposed to sync changes from Netbeans back to Eclipse: http://wiki.netbeans.org/NewAndNoteWorthyNB65#section-NewAndNoteWorthyNB65-EclipseProjectImportAndSynchronization