Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

As of 2011: Netbeans 7 or Eclipse Indigo for C++?

Tags:

This is basically a duplicate of: Netbeans or Eclipse for C++?

But, that question as 3+ years old, and a lot has changed since then.

I have a large code base with a custom (but Makefile based) build system. The areas I am specifically wondering about include:

  1. Syntax highlighting
  2. Code navigation.
  3. Code hints.
  4. "ReSharper style" code helpers.
  5. Documentation integration.
  6. Debugger UI and features.

Has anyone had the chance to evaluate both Netbeans and Eclipse?

EDIT: As a followup question, are any of the Netbeans users here concerned with its future given Oracle's recent bad history with "open" efforts? (Open Solaris, MySQL, Open Office)

Thank you

like image 925
nonot1 Avatar asked Jul 06 '11 15:07

nonot1


2 Answers

I cannot comment on eclipse, but on netbeans 7 I will say things that are very important for me and that work fine so far:

  • code completion, go to declarations
  • pkg-config automatic include management for parsing

stuff that sometimes works and sometimes don't

  • find usages, sometimes it might fail to find usages in other open projects
  • debugger sometimes gets confused with unittest-cpp macros and it will not go on the appropiate line

stuff that are not yet working and i care deeply:

  • C++0x syntax highlighting (auto, lambdas, enum class, variadic templates, none of them are recognized by the built-in parser)

stuff that is not quite working but i could not care less:

  • git integration. I enjoy using git from command-line so this is a non-issue

in all, the IDE is very usable. I hope to have a chance to try out latest cdt on Indigo Eclipse, but so far i haven't that much of a real reason to investigate

like image 195
lurscher Avatar answered Sep 19 '22 15:09

lurscher


I cannot comment on Netbeans, but I can offer you information on Eclipse. I work with C++ on UNIX systems, and I have started to use Eclipse when exploring large code bases that I know little about. I don't use it to build, but it would be easy to integrate our build system with it as one only needs commands.

Eclipse has most of what you are looking for: (I'm speaking of Eclipse/CDT)

  1. Not only can you completely customize your syntax highlighting, you can also have it format the code with templates. My company has a code standard for spacing, tabs and formatting of functions and conditional code, and with little effort I was able to modify an existing template to meet our code standards.

  2. The navigation is not bad, if you highlight and hover over a variable, it shows you the definition in a small pop-up bubble. If you do the same for a type, it will you show you where the type is defined. For functions, it will show the first few lines of the implementation of the function, with an option to expand it and see the whole function. I find all of these nice for code discovery and navigation. You can also highlight a variable, and use a right-click menu option to jump to its declaration.

  3. I suppose by code hints you are referring to something like intellisense? This is the main reason why I use Eclipse when looking over a large code base. Just hit the '.' or '->' and a second later you get your options.

  4. The debugger UI is quite capable. You can launch gdb within the tool and it allows you to graphically move through your code just as you would in a tool like ddd or Visual C++. It offers standard features like viewing registers, memory, watching variables, etc.

That being said, I have found some weaknesses. The first is that it doesn't really strongly support revision control systems outside of CVS and SVN very easily (integrated into the GUI). I found a plug-in for the system we use at my company, but it spews XML and Unicode garbage. It was easier to just use the revision control on the command line. I suspect this is the plug-in's issue and not Eclipse. I wish there were better tool integration though.

The second complaint is that for each project I have to manually setup the include directories and library paths. Perhaps with an environment variable this could be circumvented? Or I may just do not know how to set things up correctly. Then again if it is not obvious to a developer how to do this, I consider that a weakness of the tool.

All in all I like working with Eclipse. It is not my main editing environment, but I appreciate it for working on large code bases.

like image 28
Dr. Watson Avatar answered Sep 21 '22 15:09

Dr. Watson