如何删除 Eclipse 中的工作区?

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

How to delete a workspace in Eclipse?

eclipseworkspace

提问by Rahul

How to delete a workspace in Eclipse?

如何删除 Eclipse 中的工作区?

回答by Jon Skeet

Just delete the whole directory. This will delete all the projects but also the Eclipse cache and settings for the workspace. These are kept in the .metadatafolder of an Eclipse workspace. Note that you can configure Eclipse to use project folders that are outsidethe workspace folder as well, so you may want to verify the location of each of the projects.

只需删除整个目录。这将删除所有项目以及工作区的 Eclipse 缓存和设置。它们保存在.metadataEclipse 工作区的文件夹中。请注意,您也可以将 Eclipse 配置为使用工作区文件夹之外的项目文件夹,因此您可能需要验证每个项目的位置。

You can remove the workspace from the suggested workspaces by going into the General/Startup and Shutdown/Workspacessection of the preferences (via Preferences > General > Startup & Shudown > Workspaces > [Remove] ). Note that this does not remove the files itself. For old versions of Eclipse you will need to edit the org.eclipse.ui.ide.prefsfile in the configuration/.settingsdirectory under your installation directory (or in ~/.eclipseon Unix, IIRC).

您可以通过进入首选项的General/Startup 和 Shutdown/Workspaces部分(通过 Preferences > General > Startup & Shudown > Workspaces > [Remove] )从建议的工作区中删除工作区。请注意,这不会删除文件本身。对于旧版本的 Eclipse,您需要在安装目录下(或在Unix、IIRC 上)编辑该org.eclipse.ui.ide.prefs目录中的文件。configuration/.settings~/.eclipse

回答by Equinox

It's possible to remove the workspace in Eclipse without much complications. The options are available under Preferences->General->Startup and Shutdown->Workspaces.

可以在 Eclipse 中删除工作区而不会出现太多复杂情况。这些选项位于首选项-> 常规-> 启动和关闭-> 工作区下。

Note that this does not actually delete the files from the system, it simply removes it from the list of suggested workspaces. It changes the org.eclipse.ui.ide.prefsfile in Jon's answer from within Eclipse.

请注意,这实际上并没有从系统中删除文件,它只是将其从建议的工作区列表中删除。它org.eclipse.ui.ide.prefs在 Eclipse 中更改Jon 的答案中的文件。

回答by bananaaus

For Eclipse PDT in Mac OS, once you have deleted the actual workspace directory the option to select and switch to that workspace will still be available unless you delete the entry from Preferences>> General>> Startup and Shutdown>> Workspaces.

对于 Mac OS 中的 Eclipse PDT,一旦您删除了实际的工作区目录,选择并切换到该工作区的选项仍然可用,除非您从Preferences>> General>> Startup and Shutdown>> Workspaces 中删除条目。

回答by Raman Sahasi

I'm not sure about older versions, but from NEON onward, you can just right click on workspaceand select Remove from launcher selectionoption.

我不确定旧版本,但从 NEON 开始,您只需右键单击工作区并选择从启动器选择选项中删除

Eclipse Neon - Remove Workspace

Eclipse Neon - 删除工作区

of course this won't remove the original files. It simply removes it from the list of suggested workspaces.

当然这不会删除原始文件。它只是将其从建议的工作区列表中删除。

回答by Mohammed Réda OUASSINI

Click on the menu Window> Preferencesand go to Workspaceslike below :

单击菜单窗口>首选项,然后转到如下所示的工作区

| General
    | Startup and Shutdown
        | Workspaces

Select the workspace to delete and click on the Removebutton.

选择要删除的工作区,然后单击“删除”按钮。

回答by Demetra

Just go to the \eclipse-java-helios-SR2-win32\eclipse\configuration.settings directory and change or remove org.eclipse.ui.ide.prefsfile.

只需转到 \eclipse-java-helios-SR2-win32\eclipse\configuration.settings 目录并更改或删除org.eclipse.ui.ide.prefs文件。