【问题标题】:STS eclipse creates multiple folders inside .eclipse every time it is openedSTS eclipse 每次打开都会在 .eclipse 里面创建多个文件夹
【发布时间】:2017-03-13 18:02:16
【问题描述】:

您好,我在here 之前问过这个问题,但没有得到任何答案,我重申了这个问题。

好的,这就是环境。

Spring 工具套件 版本:3.8.2.RELEASE 内部版本号:201610040743 平台:Eclipse Neon.1 (4.6.1) macOS Sierra。

每次我打开 STS 时,它都会在 .eclipse 中以这种格式创建一个文件夹。

我在文件夹 .eclipse 上运行此命令,以确保 eclipse 具有读写权限。

chmod 777 .eclipse/
chown -R myuser:staff .eclipse/

但 STS 一直在做同样的事情。

--编辑

问题是,每次 Eclipse STS 执行此操作时,就像 IDE 第一次启动一样,所以每次打开 IDE 时都会删除所有内容。

--编辑

检查 /Users/ovazquez/.eclipse/org.eclipse.oomph.setup/setups/ 中的文件 locations.setup 我可以看到该文件发生了变化每次启动IDE时,这个文件是IDE第一次读取配置文件。

<?xml version="1.0" encoding="UTF-8"?>
<setup:LocationCatalog
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
  <installation>
    <key href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
    <value href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
  </installation>
  <workspace>
    <key href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
    <value href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
  </workspace>
</setup:LocationCatalog>

那么一旦ide再次打开,这就是同一个文件。

<?xml version="1.0" encoding="UTF-8"?>
<setup:LocationCatalog
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
  <installation>
    <key href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_431833271_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
    <value href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
  </installation>
  <installation>
    <key href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
    <value href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
  </installation>
  <workspace>
    <key href="file:/Users/ovazquez/Documents/workspace-sts-3.8.2.RELEASE/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup#/"/>
    <value href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_431833271_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
    <value href="file:/Users/ovazquez/.eclipse/org.springsource.sts_3.8.2.RELEASE_1218045591_macosx_cocoa_x86_64/configuration/org.eclipse.oomph.setup/installation.setup#/"/>
  </workspace>
</setup:LocationCatalog>

【问题讨论】:

  • 审稿人评论:您的问题是什么?你只是想知道它为什么这样做,如何防止它,或两者兼而有之?它是否引发了一些您需要帮助的错误?
  • 似乎 Eclipse 正在做类似的事情,并且似乎与您正在运行的安装的配置数据有关。
  • 如果这确实是同一个问题,编辑主要问题可能会更好? stackoverflow.com/questions/40245743/…
  • 嗨,行为是一样的,一开始我虽然是插件相关的问题,但后来我发现eclipse STS正在创建新文件夹,我尝试了以前的版本和它一直在做同样的事情,这在其他 mac 中没有发生。

标签: eclipse chmod spring-tool-suite macos-sierra


【解决方案1】:

我也遇到了同样的问题并使用以下方法解决了它:

  1. 解压 tar/zip 文件到任何你想要的地方。
  2. 将 STS.app 文件拖到“应用程序”中。
  3. 现在您还将在启动板中看到 STS 应用程序。
  4. 现在您可以通过单击此 STS 图标来启动 STS 启动板/聚光灯搜索。

它应该可以解决问题。

【讨论】:

  • 请在此处发布您的答案。
  • 谢谢。看起来问题是在从默认文件夹 sts-bundle 中执行 STS.app 时出现的,该文件夹是从下载的 zip 中解压缩的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-07-21
  • 2015-04-01
  • 1970-01-01
  • 2019-03-29
  • 2011-12-13
  • 2013-06-14
  • 1970-01-01
相关资源
最近更新 更多