截至 2011 年:Netbeans 7 或 Eclipse Indigo for C++?

发布于 2024-11-18 15:42:16 字数 504 浏览 3 评论 0原文

这基本上是以下内容的重复: Netbeans 或 Eclipse for C++?

但是,这个问题已有 3 年多了,而且从那时起,一切都发生了变化。

我有一个大型代码库,带有自定义(但基于 Makefile)构建系统。我特别想知道的领域包括:

  1. 语法突出显示
  2. 代码导航。
  3. 代码提示。
  4. “ReSharper 风格”代码助手。
  5. 文档集成。
  6. 调试器 UI 和功能。

有人有机会评估过 Netbeans 和 Eclipse 吗?

编辑:作为一个后续问题,考虑到 Oracle 最近在“开放”努力方面的糟糕历史,这里的任何 Netbeans 用户是否担心其未来? (开放 Solaris、MySQL、开放 Office)

谢谢

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

记忆里有你的影子 2024-11-25 15:42:16

我无法对 Eclipse 发表评论,但在 NetBeans 7 上,我会说一些对我来说非常重要并且到目前为止工作正常的事情:

  • 代码完成,转到声明
  • pkg-config 自动包含管理,用于解析

有时有效有时无效的内容

  • 查找用法,有时可能无法在其他打开的项目中找到用法
  • 调试器有时会与unittest-cpp宏混淆,并且它不会出现在

尚未工作的适当行上,我非常关心:

  • C ++ 0x语法突出显示(自动、lambda、枚举类、可变模板,内置解析器都无法识别它们)

不太有效但我不在乎的东西:

  • git 集成。我喜欢从命令行使用 git,所以这

根本不是问题,IDE 非常有用。我希望有机会在 Indigo Eclipse 上尝试最新的 cdt,但到目前为止我还没有太多真正的理由去调查

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

七禾 2024-11-25 15:42:16

我无法评论 Netbeans,但我可以为您提供有关 Eclipse 的信息。我在 UNIX 系统上使用 C++,并且在探索我知之甚少的大型代码库时开始使用 Eclipse。我不使用它来构建,但是将我们的构建系统与它集成起来很容易,因为只需要命令。

Eclipse 拥有您想要的大部分功能:(我说的是 Eclipse/CDT)

  1. 您不仅可以完全自定义语法突出显示,还可以让它使用模板格式化代码。我的公司有一个关于函数和条件代码的间距、制表符和格式的代码标准,并且我不费吹灰之力就能修改现有模板以满足我们的代码标准。

  2. 导航还不错,如果您突出显示并将鼠标悬停在变量上,它会在一个小的弹出气泡中显示定义。如果您对类型执行相同的操作,它将显示该类型的定义位置。对于函数,它将显示函数实现的前几行,并可以选择展开它并查看整个函数。我发现所有这些对于代码发现和导航都很有用。您还可以突出显示一个变量,然后使用右键单击菜单选项跳转到其声明。

  3. 我想通过代码提示您指的是诸如智能感知之类的东西?这是我在查看大型代码库时使用 Eclipse 的主要原因。只需点击“。”或“->”一秒钟后你就会得到你的选择。

  4. 调试器 UI 功能非常强大。您可以在该工具中启动 gdb,它允许您以图形方式浏览代码,就像在 ddd 或 Visual C++ 等工具中一样。它提供了标准功能,例如查看寄存器、内存、监视变量等。

话虽这么说,我发现了一些弱点。首先,它并不能非常轻松地强烈支持 CVS 和 SVN 之外的版本控制系统(集成到 GUI 中)。我为我们公司使用的系统找到了一个插件,但它会产生 XML 和 Unicode 垃圾。在命令行上使用修订控制会更容易。我怀疑这是插件的问题,而不是 Eclipse 的问题。我希望有更好的工具集成。

第二个抱怨是,对于每个项目,我必须手动设置包含目录和库路径。也许通过环境变量可以避免这种情况?或者我可能只是不知道如何正确设置。话又说回来,如果开发人员不清楚如何做到这一点,我认为这是该工具的弱点。

总而言之,我喜欢使用 Eclipse。它不是我的主要编辑环境,但我很欣赏它在大型代码库上的工作。

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.

爱给你人给你 2024-11-25 15:42:16

我是 Netbeans 的超级粉丝。我的情况和你类似,但是创建项目非常容易。只需将 Netbeans 指向检出代码的位置,它就会自行计算出大部分内容。我很少需要做任何配置。但需要注意的一件事是,如果您的树非常大,则可能需要一些时间才能完全建立索引 - 在此过程中,内存和 cpu 将被占用在盒子上。

与 cvs 的集成非常棒,而 Hudson 的集成对于 CB 来说非常酷。我自己没有使用过 Git,但我想这是理所当然的事情。

让我烦恼不已的一件事是,它对于严重依赖模板的代码表现不佳。 ie 显示了很多关于未找到类型的警告和错误等。

我没有使用最新版本的 Eclipse,我尝试了当前版本之前的主要版本并放弃了,因为它与 makefile 等没有相同平滑的项目集成我发现如果你不想使用它的 make 系统,那就不太好 - 尽管我可能是错的。

我不使用任何提供的代码格式,而是更喜欢 AStyle 之类的格式。我知道 NetBeans 在 Java 方面做得很好 - 但还没有将其用于 C++。 CDT 我似乎记得在格式化 C++ 代码时使用缩进做了一些奇怪的事情 - 特别是。如果涉及模板 - 但这是至少两年前的事了。

希望其中一些有所帮助 - 最好的方法是下载并亲自尝试,看看什么适合您。我们告诉您的任何内容都纯粹是主观的。

I'm a huge fan of Netbeans. I am in a similar situation to yours, but creating the project was very easy. Just point Netbeans at where the code is checked out and it figures out most things for itself. I rarely have to do any configuration. One thing to note though, if your tree is very large, it can take some time to fully index - and while it does, memory and cpu will be hosed on the box.

The integration with cvs is awesome, and the Hudson integration is very cool for CB. I've not used Git myself, though I should imagine it's a no-brainer.

One thing that does irritate me no end is that it does not behave very well with code relying heavily on templates. i.e. shows lots of warnings and errors about types not being found etc.

I have not used the latest version of Eclipse, I tried the major release before the current one and gave up because it did not have the same smooth project integration with the makefiles etc. I find it's not as nice if you don't want to use it's make system - though I could be wrong.

I don't use any of the code formatting provided, I instead prefer something like AStyle instead. I know that NetBeans does a good job with Java - but have not used it for C++. CDT I seem to remember doing some odd stuff with indentation when formatting C++ code - esp. if templates are involved - but that was atleast two years ago.

Hope some of it helps - the best way to do this is to download and try for yourself and see what works for you. Anything we tell you is purely subjective.

萌化 2024-11-25 15:42:16

我曾经使用 Netbeans 和 MinGW 一起工作,我刚刚尝试过 7.0.1。
我目前使用 Eclipse Indigo 与 CDT 和 MinGW - 它的性能更好(更少的 CPU 和内存)。

Netbeans 创建一个 makefile 来一直编译,
在 Eclipse 中,您可以直接使用 CDT-Toolchain 构建或使用 Makefile - Eclipse 更灵活。

调试:Netbeans 在 Solaris/Linux 中可能会更好。

我个人更喜欢eclipse而不是Netbeans,我认为eclipse更专业。

I used to work with Netbeans with MinGW, I Just tried 7.0.1.
I currently use Eclipse Indigo with CDT and MinGW - It's better performance wise (less CPU & Memory).

Netbeans creates a makefile to compile all the time,
In Eclipse you can build directly with the CDT-Toolchain or use Makefile - Eclipse is more flexible.

Debugging: Netbeans might be better in Solaris/Linux.

I Personally rather eclipse over Netbeans, I think eclipse is more professional.

苏璃陌 2024-11-25 15:42:16

Netbeans 7.0 的一个特别问题让我非常烦恼,那就是它倾向于使用 utf8 文件,而并非所有的 C++ 项目都是 utf8。它会发出有关打开此类文件的警告,如果您打开它,则会损坏该文件,这很痛苦。

我还没有找到如何正确地让 netbeans 处理这个问题。显然,编码可以更改,但对于整个项目而言。因此,推测将其更改为 us-acii 可以解决此问题,尽管非 ascii 字符无法正确显示。

One particular issue that causes me quite a lot of grief with Netbeans 7.0 is that it tends to want to work with utf8 files, and not all of out c++ projects are utf8. It will issue a warning about opening such a file, and if you do open it, will corrupt said file, which is a pain.

I've not found out how to properly make netbeans handle this. Apparently the encoding can be changed, but for the entire project. So presumably changing it to us-acii would stop this problem, although non ascii characters wouldn't display properly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文