简体   繁体   English

SVN 和 Eclipse Helios 入门

[英]SVN and getting started with Eclipse Helios

I have been working as a programmer for approx 15 years.我作为程序员已经工作了大约 15 年。 I have significant experience with 3 languages.我有 3 种语言的丰富经验。 Object Pascal, C# and Python.对象 Pascal、C# 和 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 项目的项目经理,该项目使用以下技术堆栈编写。

Java EE Eclipse Helios Tomcat Spring MySQL Code is in SVN Java EE Eclipse Helios Tomcat Spring MySQL 代码在 SVN 中

In preperation of starting the job, I read a couple of books on Java and played around with eclipse.在准备开始工作时,我阅读了几本关于 Java 的书籍并尝试了 eclipse。 The language doesn't bother me at all - it's very similar to C#.该语言根本不打扰我 - 它与 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.我已经从 SVN 存储库同步了代码,但实际上我不确定如何继续。 I think I'm use to having solution or a project file to "open" (like in Delphi and Visual Studio).我想我习惯于让解决方案或项目文件“打开”(如在 Delphi 和 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!也许最近来自 Visual Studio 背景的人可以同情我的情况! :) :)

Thanks in advance for your help.在此先感谢您的帮助。

Well, it depends a bit on how your company's SVN is organized.嗯,这有点取决于贵公司的 SVN 是如何组织的。 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?例如,他们是检查 Eclipse 项目设置,还是希望您检查代码然后生成 Eclipse 设置? Both are common approaches.两者都是常用的方法。

Assuming they have project settings in SVN, you should be able to just import them.假设它们在 SVN 中有项目设置,您应该能够导入它们。 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 (eg Tortoise) and then use Eclipse's import wizard to import the project.您可以直接从 SVN 作为新项目导入(使用 Eclipse 新建项目向导),也可以使用外部工具(例如 Tortoise)从 SVN 中检出代码,然后使用 Eclipse 的导入向导导入项目。 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.转到Import -> General -> Existing projects into workspace ,然后浏览到您的 SVN 工作副本的位置,它应该会自动在那里选择 Eclipse 项目。

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 .比方说,您使用 Tortoise 从 SVN 检出工作副本,例如到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.然后,您可以使用我上面提到的“将现有项目导入工作区”选项将该工作副本中的任何项目导入 Eclipe。 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.在导入向导中,您可以选择 Eclipse 是将实际代码复制到其工作区目录中,还是将其保留在原处并保留引用。 This is personal taste but I usually do not let Eclipse copy the code into its own workspace.这是个人喜好,但我通常不会让 Eclipse 将代码复制到它自己的工作区中。 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 执行 SVN 更新/提交),而且还可以很容易地在 Eclipse 之外对我的 svn 工作副本进行操作。

A workspace in Eclipse can contain multiple Projects. Eclipse 中的一个工作区可以包含多个项目。

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.当您打开 eclipse 时,它​​会让您选择要使用的工作区,然后您应该能够将代码作为新项目导入到 eclipse 中。 Have you tried using the Project Wizard?您是否尝试过使用项目向导?

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.您不会找到与 .csproj 文件完全相同的文件,最接近的是 .project 和 .classpath 文件,它们之间的 eclipse 具有描述项目的所有信息。 If your svn checkout contains the .project file, you can directly import your project into eclipse using the Import Wizard.如果您的 svn checkout 包含 .project 文件,您可以使用导入向导将您的项目直接导入到 eclipse 中。 Else you can try creating a new project and pointing it to your svn checkout.否则,您可以尝试创建一个新项目并将其指向您的 svn checkout。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM