如何向 Eclipse 添加不同的编程语言(C++、C#、Java)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15602862/
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-10 21:38:38  来源:igfitidea点击:

How to add different programming languages to Eclipse (C++, C#, Java)

ideeclipse

提问by floatfil

another completely beginner question. I just went through two introductory courses in Java, and I noticed that Eclipse can also support development in other languages (which I didn't know). Does anyone know how to add other languages to Eclipse so that I can switch between IDE's, or do I have to have a completely separate installation of Eclipse per language?

另一个完全初学者的问题。我刚刚学习了两门 Java 入门课程,我注意到 Eclipse 也可以支持其他语言的开发(我不知道)。有谁知道如何将其他语言添加到 Eclipse 以便我可以在 IDE 之间切换,或者我是否必须为每种语言安装一个完全独立的 Eclipse?

回答by Bananeweizen

In Eclipse, use the menu Help -> Install new software. Choose "All available sites" in the combo box, wait a moment and then you can explore some other available plugins and languages.

在 Eclipse 中,使用菜单 Help -> Install new software。在组合框中选择“所有可用站点”,稍等片刻,然后您可以探索其他一些可用的插件和语言。

Depending on your version of Eclipse, you might also have a menu item Help -> Eclipse Marketplace. That one is even more comfortable, as it allows you to easily browse all plugins listed in the Eclipse Marketplace. You can also browse the marketplace in your browser and afterwards drag and drop interesting plugins from the browser to your running eclipse (if your version of eclipse is new enough).

根据您的 Eclipse 版本,您可能还有一个菜单项 Help -> Eclipse Marketplace。那个更舒服,因为它允许您轻松浏览Eclipse Marketplace 中列出的所有插件。您还可以在浏览器中浏览市场,然后将有趣的插件从浏览器拖放到正在运行的 eclipse(如果您的 eclipse 版本足够新)。

回答by mattnz

Eclipse is a plugin framework......

Eclipse 是一个插件框架......

You have two choices - fortunately the eclipse community saw fit to produce Eclipse in a range of products that will do 99% of what 99% of people want. These distros are good to go. You install them and start work. You can then extend them if you want, but they do all of the basics very well, reliably, out of the box. Installing more than one with eclipse is easy, they do not interfere with each other, and if one turns out to be broken, the rest are not affected.

您有两个选择 - 幸运的是 Eclipse 社区认为适合在一系列产品中生产 Eclipse,这些产品可以满足 99% 的人想要的 99% 的需求。这些发行版很好用。您安装它们并开始工作。然后,您可以根据需要扩展它们,但它们可以很好地、可靠地、开箱即用地完成所有基础工作。用 eclipse 安装多个很容易,它们不会相互干扰,如果一个坏了,其余的不受影响。

The other option, is to extend the framework by adding the plugins you want. So you start with an Eclipse distro, and download and install plugins till the cows come home. In the perfect world, this would be the perfect solution. Its not a perfect world..... you have not installed all you plugins and Eclipse suddenly crashes........

另一种选择是通过添加您想要的插件来扩展框架。因此,您从 Eclipse 发行版开始,下载并安装插件,直到奶牛回家。在完美的世界中,这将是完美的解决方案。这不是一个完美的世界......你还没有安装所有插件,Eclipse突然崩溃......

Problems occur because sometimes

出现问题是因为有时

  • Plugins are buggy
  • Plugins are incompatible with each other.
  • Different plugins rely on different versions of another one (indirectly incompatible).
  • Plugins don't work the way the rest of the tool does
  • There are just too many plugins to choose from - you don't need most, and the ones you need can be hard to find.
  • 插件有问题
  • 插件彼此不兼容。
  • 不同的插件依赖于另一个插件的不同版本(间接不兼容)。
  • 插件的工作方式与工具的其余部分不同
  • 可供选择的插件太多了 - 您不需要最多的插件,而且您需要的插件可能很难找到。

Adding more than a few (probably 1) plugin to Eclipse exposes you to these problems. This is not something for the novice or people who have job not involved in fixing Eclipse. if you have a real reason for it, like your a sadist, or it's your job, or you want it to be your job, to make a team of 100 Devs productive, then plugins are great, otherwise, download a pre-canned, tested, reliable distro and take advantage of the great work by the contributors.

向 Eclipse 添加多个(可能是 1 个)插件会使您面临这些问题。对于新手或没有参与修复 Eclipse 的工作的人来说,这不是什么。如果你有一个真正的理由,比如你的虐待狂,或者这是你的工作,或者你希望它成为你的工作,让一个由 100 名开发人员组成的团队变得高效,那么插件是很棒的,否则,下载一个预装的,经过测试、可靠的发行版,并利用贡献者的出色工作。