你如何在 Eclipse 中组织 100 多个项目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6310928/
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
How do you organize 100+ projects in Eclipse?
提问by Trevor Boyd Smith
When you have 5+ languages and 100+ projects, IMO the default of using one workspace is not acceptable because the one workspace becomes horribly disorganized. Having one huge unorganized workspace lowers your productivity.
当你有 5 种以上的语言和 100 多个项目时,IMO 使用一个工作区的默认设置是不可接受的,因为一个工作区变得非常混乱。拥有一个巨大的、无组织的工作空间会降低您的工作效率。
The question:
问题:
What are the more advanced ways of using Eclipse when you have 5+ languages and 100+ projects?I would really appreciate advice that elaborates a little bit more than just giving one sentence like "use multiple workspaces" or "use working sets".
当您拥有 5 种以上语言和 100 多个项目时,使用 Eclipse 的更高级方法是什么?我真的很感激能比仅仅给出“使用多个工作区”或“使用工作集”这样的句子更详细一点的建议。
"Must have" requirements:
“必须”要求:
- The project navigator only shows related projects (like only projects from abc language or only projects from xyz language)
- The described method is currently being used by you or someone you know and has been used for more than two weeks
- 项目导航器仅显示相关项目(例如仅来自 abc 语言的项目或仅来自 xyz 语言的项目)
- 您或您认识的人目前正在使用所描述的方法,并且已经使用了两个多星期
"Would like" requirements:
“愿意”要求:
- the ability to be able to have projects with the same name (like "helloworld" for language xyz and "helloworld" for language abc)
- 能够拥有同名项目的能力(例如语言 xyz 的“helloworld”和语言 abc 的“helloworld”)
(Side note:
(边注:
FYI, one of the reasons for asking on SO.com is because I have searched enough on Google to know that there are LOTS of people who have the same "Help my Eclipse workspace is out of control" problem. )
仅供参考,在 SO.com 上询问的原因之一是因为我在 Google 上进行了足够的搜索,我知道有很多人有相同的“帮助我的 Eclipse 工作区失控”问题。)
采纳答案by FrustratedWithFormsDesigner
If these projects are completely independent from each other, I would create separate workspaces, one workspace for each set of projects that are connected and cannot be built on their own. Is there a reasonyou don't want to split to multiple workspaces? I'm pretty sure this is how Eclipse was intended to be used in this case. I've done it many times and find it to be a good solution.
如果这些项目彼此完全独立,我会创建单独的工作区,为每组相互连接且无法自行构建的项目创建一个工作区。是否有一个原因,你不想拆分多个工作区?我很确定这就是在这种情况下打算使用 Eclipse 的方式。我已经做了很多次,发现它是一个很好的解决方案。
回答by Andrew Eisenberg
The way I work with my hundreds of projects is this:
我处理数百个项目的方式是这样的:
- I have one big workspace where I have most of my projects. These projects are all tangentially related. I separate them into working sets. I tend to only show the working sets of the projects that I am working on currently. All other projects are closed.
- Then I have a few more eclipse workspaces where I keep side projects that are completely independent from the big workspace. The eclipse installations for my side projects are usually different from the installation used by my big workspace because they are customized for the work required by the side project.
- 我有一个很大的工作区,我的大部分项目都在这里。这些项目都是切线相关的。我将它们分成工作集。我倾向于只展示我目前正在处理的项目的工作集。所有其他项目均已关闭。
- 然后我还有一些 eclipse 工作区,我在其中保留完全独立于大工作区的辅助项目。我的副项目的 eclipse 安装通常与我的大工作区使用的安装不同,因为它们是为副项目所需的工作定制的。
For example, my big workspace uses SpringSource Tool Suite, but my side-project workspaces are vanilla Eclipse with m2eclipse installed.
例如,我的大工作区使用 SpringSource Tool Suite,但我的副项目工作区是安装了 m2eclipse 的 vanilla Eclipse。
I find that this works well as long as I don't have too many projects opened at once in my big workspace.
我发现只要我的大工作区中没有一次打开太多项目,这就会很好地工作。
回答by Shivputra N
- File – New – Java Working Set
- Add related projects into the working set.
- Repeat till most/all projects are in relevant working sets.
- In Package Explorer, click view menu (the downward facing triangle icon), Top Level Elements – Working Sets.
- Drag and drop reorder the working sets
- 文件-新建-Java工作集
- 将相关项目添加到工作集中。
- 重复直到大多数/所有项目都在相关工作集中。
- 在包资源管理器中,单击视图菜单(向下的三角形图标),顶级元素 - 工作集。
- 拖放重新排序工作集
回答by lalthomas
In fact there is no problem in using single workspace even when there are large number of projects.
事实上,即使有大量项目,使用单个工作区也没有问题。
Ways to improve performance
提高性能的方法
- On Project Explorer View right click on the unused project and choose 'close project` from context menu
- Uncheck
Build Automatically
fromProject
menu
- 在 Project Explorer View 上右键单击未使用的项目,然后从上下文菜单中选择“关闭项目”
Build Automatically
从Project
菜单中取消选中
Way to reduce the clutter
减少杂乱的方法
Use
Working Set
to drill down to the specific set of projects.Window - > Show View -> Navigator
使用
Working Set
向下钻取到组特定的项目。Window - > Show View -> Navigator
Select the submenu (down arrown button) on Navigator view and select the Select Working Set
. Then create a working set by selecting the New
button. Select Resource
on the new popup window and select the projects that you wish to currently work on. Navigator view only show these projects.You can switch between different working sets whenever you felt the need.
选择导航器视图上的子菜单(向下箭头按钮),然后选择Select Working Set
. 然后通过选择New
按钮创建一个工作集。选择Resource
在新弹出的窗口中,选择您希望目前的工作的项目。导航器视图仅显示这些项目。您可以在需要时在不同的工作集之间切换。
Hope the answer will help you.
希望答案能帮到你。
回答by Lance Wentz
I'm a Java web developer. Not all of our production servers have the same version of java. So, I make separate work spaces for each java version.
我是一名 Java Web 开发人员。并非我们所有的生产服务器都具有相同版本的 java。因此,我为每个 Java 版本创建了单独的工作空间。
So, the defaults for one work space is Java 1.5, and another one is Java 1.6. And I have a separate work space for personal games I'm developing.
因此,一个工作空间的默认值是 Java 1.5,另一个是 Java 1.6。我有一个单独的工作空间用于我正在开发的个人游戏。