SVN 和 Eclipse Helios 入门
我作为一名程序员已经工作了大约 15 年。我在 3 种语言方面拥有丰富的经验。对象 Pascal、C# 和 Python。我刚刚接受了一份 Java 项目的项目经理工作(大约两天前),该项目是使用以下技术堆栈编写的。
JavaEE 日食赫利俄斯 雄猫 春天 MySQL 代码在 SVN 中
在开始工作的准备过程中,我读了几本关于 Java 的书并使用了 Eclipse。这种语言根本不困扰我——它与 C# 非常相似。我现在真正遇到的困难更像是如何开始。
我已经从 SVN 存储库同步了代码,但实际上不知道如何继续。我想我习惯于“打开”解决方案或项目文件(就像在 Delphi 和 Visual Studio 中一样)。那么,我是否需要创建一个新的工作区并从文件系统“导入”它?
我对新手问题表示歉意。我只是觉得有点迷失在这里开始。也许最近有 Visual Studio 背景的人会同情我的情况! :)
预先感谢您的帮助。
I have been working as a programmer for approx 15 years. I have significant experience with 3 languages. Object Pascal, C# and Python. I just took a job (like two days ago) as a project manager for a Java project that has been written with the following tech stack.
Java EE
Eclipse Helios
Tomcat
Spring
MySQL
Code is in SVN
In preperation of starting the job, I read a couple of books on Java and played around with eclipse. The language doesn't bother me at all - it's very similar to C#. What I'm really struggling with now feels more like how to get started.
I've sync'd the code from the SVN repository, but literally am not sure how to proceed. I think I'm use to having solution or a project file to "open" (like in Delphi and Visual Studio). So, do I need to create a new workspace and "import" it from the file system?
I apologies for the newbie questions. I just feel a bit lost getting started here. Maybe someone that has recently come from a Visual Studio background can sympathize with me situation! :)
Thanks in advance for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嗯,这有点取决于你公司的 SVN 是如何组织的。例如,他们是否签入 Eclipse 项目设置,或者他们是否希望您签出代码然后生成 Eclipse 设置?两者都是常见的方法。
假设它们在 SVN 中有项目设置,您应该能够导入它们。您可以直接从 SVN 导入为新项目(使用 Eclipse 新建项目向导),也可以使用外部工具(例如 Tortoise)从 SVN 中查看代码,然后使用 Eclipse 的导入向导导入项目。转到
导入
->常规
->将现有项目放入工作区
,然后浏览到 SVN 工作副本的位置,它应该会自动获取那里的 Eclipse 项目。更新根据您的评论,让我扩展一下。假设您使用 Tortoise 从 SVN 检出工作副本,例如到
c:\foo
。然后,您可以使用上面提到的“将现有项目导入工作区”选项将该工作副本中的任何项目导入到 Eclipe 中。在导入向导中,您可以选择 Eclipse 是否应将实际代码复制到其工作区目录中,或者应将其保留在原处并仅保留引用。这是个人喜好,但我通常不让 Eclipse 将代码复制到它自己的工作区中。这样,我可以在 Eclipse 中使用代码(并直接从 Eclipse 进行 SVN 更新/提交),而且还可以在 Eclipse 之外轻松地对我的 svn 工作副本进行操作。Well, it depends a bit on how your company's SVN is organized. For example, do they check in the Eclipse project settings, or do they expect you to check out the code and then generate Eclipse settings? Both are common approaches.
Assuming they have project settings in SVN, you should be able to just import them. You can either directly import from SVN as a new project (using the Eclipse new project wizard), or you can check out the code from SVN with an external tool (e.g. Tortoise) and then use Eclipse's import wizard to import the project. Go to
Import
->General
->Existing projects into workspace
, then browse to the location of your SVN working copy, and it should automatically pick up the Eclipse project(s) there.update following up on your comments, let me expand a bit. Say, you check out a working copy from SVN using Tortoise, for example to
c:\foo
. You can then import any projects in that working copy into Eclipe, using the "Import existing projects into workspace" option I mentioned above. In the import wizard, you can choose if Eclipse should copy the actual code into its workspace directory, or should leave it where it is and just keep references. This is personal taste but I usually do not let Eclipse copy the code into its own workspace. That way, I can work with the code in Eclipse (and do SVN updates/commits directly from Eclipse), but also can quite easily do operations on my svn working copy outside Eclipse.Eclipse 中的工作区可以包含多个项目。
当您打开 Eclipse 时,它会让您选择要使用的工作区,然后您应该能够将代码作为新项目导入到 Eclipse 中。您是否尝试过使用项目向导?
A workspace in Eclipse can contain multiple Projects.
When you open eclipse it has you select which workspace to use, and then you should be able to import the code into eclipse as a new Project. Have you tried using the Project Wizard?
您找不到与 .csproj 文件完全相同的文件,最接近的是 .project & 文件。 .classpath 文件,其中 eclipse 具有描述项目的所有信息。如果您的 svn checkout 包含 .project 文件,您可以使用导入向导直接将项目导入到 eclipse 中。否则你可以尝试创建一个新项目并将其指向你的 svn checkout。
You won't find an exact equivalent of the .csproj file, the closest you get is the .project & .classpath files, between them eclipse has all the information to describe a project. If your svn checkout contains the .project file, you can directly import your project into eclipse using the Import Wizard. Else you can try creating a new project and pointing it to your svn checkout.