Aptana/Eclipse:如何制作一个使用文件系统上现有文件的项目,而不是复制?

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

Aptana/Eclipse: How do I make a project that uses existing files on my filesystem, instead of copying?

eclipseaptana

提问by Tony

I want to create a project that uses source files already on my filesystem, but the IDE always wants to create a directory and make a second copy of all the source.

我想创建一个使用文件系统上已有源文件的项目,但 IDE 总是想创建一个目录并制作所有源的第二个副本。

This has always annoyed me about Aptana and Eclipse, is there a workaround for this?

这一直让我对 Aptana 和 Eclipse 感到恼火,是否有解决方法?

采纳答案by jldupont

  1. have the files in a directory under your workspace

  2. use "create project" and change the default folder to the one created above.

  1. 将文件放在工作区下的目录中

  2. 使用“创建项目”并将默认文件夹更改为上面创建的文件夹。

回答by Parik Tiwari

I am using Aptana Studio 3 on my mac and the way I do it is:

我在我的 Mac 上使用 Aptana Studio 3,我的做法是:

  1. Click on File
  2. Select Importfrom the dropdown menu
  3. Select the Generaltab and open it, you will see the option Existing Folder as New Project
  4. Select it and click on Next
  5. On the next page select the folder where you have the old project files, name the new project(if you want to change it). You can also select the languages that you have used on the project.
  6. Click Finishand you are set to go.
  1. 点击文件
  2. 从下拉菜单中选择导入
  3. 选择General选项卡并打开它,您将看到选项Existing Folder as New Project
  4. 选择它并单击下一步
  5. 在下一页上选择您拥有旧项目文件的文件夹,命名新项目(如果您想更改它)。您还可以选择您在项目中使用的语言。
  6. 单击完成,您就可以开始了。

回答by muffinista

One small addendum, the existing folder doesn't actually need to be in your workspace. I have several projects in my workspace but also several located elsewhere for assorted reasons.

一个小附录,现有文件夹实际上不需要在您的工作区中。我的工作区中有几个项目,但由于各种原因,还有几个项目位于其他地方。

回答by Arun

I too wasn't aware of how to do this..

我也不知道如何做到这一点..

But i tried this way and it worked..

但我试过这种方式,它奏效了..

Step 1: Try to create new workspace with the name and location as you wish

第 1 步:尝试使用您希望的名称和位置创建新工作区

Step 2: click new->Java Project

第二步:点击新建->Java项目

Step3: In the create a Java Project Window select the option for Creating from existing Resource" and select the resource you want

步骤 3:在创建 Java 项目窗口中选择从现有资源创建选项并选择您想要的资源

Step4: You can see the project name as automatically set by itself based on the folder containing the project that you select.

Step4:您可以看到项目名称是根据您选择的项目所在的文件夹自动设置的。

Step5: click finish

第五步:点击完成

Step 6: I guess, you need to open Navigator view(Window->show view-> navigator) for best viewing

第 6 步:我想您需要打开导航器视图(Window->show view-> navigator)以获得最佳查看效果

Hope this works gud.. Post here if its not working,..

希望这行得通..如果它不起作用,请在此处发布,..

回答by s.webbandit

There is a checkbox named "Prompt for workspace on startup". It's in Window -> Preferences -> General -> Startup and Shutdown -> Workspaces. If you check this, on next Aptana startup you will be prompted to define a new Default workspace directory which would be your default projects folder.

有一个名为“启动时提示工作区”的复选框。它位于窗口 -> 首选项 -> 常规 -> 启动和关闭 -> 工作区。如果选中此项,在下次 Aptana 启动时,系统将提示您定义一个新的默认工作区目录,该目录将是您的默认项目文件夹。

回答by ioCron

There is also another way to do that.

还有另一种方法可以做到这一点。

  1. Create an empty project (right-click in the Project Window and go to "New->Project" and then "General->Project" and click "Next", after that type in a project name and click "Finish").

  2. Add a new connection to this project (right-click on "Connections" and then "Add New Connection"). The "Source" should be your project and the "Destination" should be the type "Filesystem" with a folder of your choice.

  1. 创建一个空项目(在项目窗口中右键单击并转到“New->Project”然后“General->Project”并单击“Next”,然后输入项目名称并单击“Finish”)

  2. 向该项目添加新连接(右键单击“连接”,然后单击“添加新连接”)。“Source”应该是你的项目,“Destination”应该是“Filesystem”类型,并带有你选择的文件夹。

Finished.

完成的。

I only use that method in very rare cases, as example, if u need a simple file-reference of any folder on your harddrive or if you need an overall file-reference to your workspace folder which contains all project folders, etc..

我只在极少数情况下使用该方法,例如,如果您需要硬盘驱动器上任何文件夹的简单文件引用,或者如果您需要包含所有项目文件夹等的工作区文件夹的整体文件引用。

回答by user1889992

This answer by no means solves the issue above in Aptana but if you are in a rush, try using FreeCommander http://www.freecommander.com. It is a dual pane file manager with a slew of options. I have been using it for almost 3 years and there is never a day I don't use it.

这个答案绝不能解决 Aptana 中的上述问题,但如果您很着急,请尝试使用 FreeCommander http://www.freecommander.com。它是一个双窗格文件管理器,具有许多选项。我已经使用它将近 3 年了,从来没有一天不使用它。

What I did for now, is I allowed Aptana to create a folder in the workspace at the same level as the original folder I would like to use. Using FreeCommander I then have the original (src) folder in one pane with the new folder (dst) in the other pane.

我现在所做的是允许 Aptana 在工作区中创建一个与我想使用的原始文件夹相同级别的文件夹。使用 FreeCommander,然后我将原始 (src) 文件夹放在一个窗格中,并将新文件夹 (dst) 放在另一个窗格中。

I then manually copy (F5) or use FreeCommander's built in sync function (Alt + s) so that both folders have the same contents at all times.

然后我手动复制 (F5) 或使用 FreeCommander 的内置同步功能 (Alt + s),以便两个文件夹始终具有相同的内容。

Again, not the right answer but a workaround as work needs to be done. Cheers.

同样,这不是正确的答案,而是需要完成工作的解决方法。干杯。