eclipse 保存日食透视布局和其他东西

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

saving eclipse perspective layout and other things

eclipsepreferences

提问by Persimmonium

every time I throw away my .metadata (due to some corruption or something) and start with a new one, first thing I do is:

每次我扔掉我的 .metadata(由于某些损坏或其他原因)并从一个新的开始时,我做的第一件事是:

  1. Import my saved preferences
  2. Load existing projects from disk
  1. 导入我保存的首选项
  2. 从磁盘加载现有项目

BUTthere are still some things I must configure manually in order to have my setup as I have before, specially in my case (there are probably other things):

但是仍有一些事情我必须手动配置才能像以前一样进行设置,特别是在我的情况下(可能还有其他事情):

  1. I have to add the Perspectives I use and remove the ones I don't
  2. I have to configure the layout of those Perspectives (specially java one, to use properly two monitors).
  3. Add a bugzilla task repostiry for mylyn, and configure a couple of queries
  1. 我必须添加我使用的透视图并删除我不使用的透视图
  2. 我必须配置这些 Perspectives 的布局(特别是 java one,以正确使用两个监视器)。
  3. 为 mylyn 添加一个 bugzilla 任务 repostiry,并配置几个查询

Is there a way to save those thigns so I can load them back when I need? I wish they were stored in preferences...

有没有办法保存这些东西,以便我可以在需要时将它们加载回来?我希望它们存储在首选项中...

I am on latest 3.6.

我使用的是最新的 3.6。

采纳答案by lschin

Two solutions :

两种解决方案:

  1. MENU -> File -> Switch workspace -> Other -> Copy Settings of
    • Workbench Layout
    • Working Sets
  2. Copy/backup and replace following folder to new created Workspace.
    • [workspace]/.metadata/.plugins/org.eclipse.ui.workbench/
    • [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings/
  1. MENU -> 文件 -> 切换工作区 -> 其他 -> 复制设置
    • 工作台布局
    • 工作集
  2. 复制/备份并将以下文件夹替换为新创建的工作区。
    • [工作区]/.metadata/.plugins/org.eclipse.ui.workbench/
    • [工作区]/.metadata/.plugins/org.eclipse.core.runtime/.settings/

Personally I prefer (2).

我个人更喜欢(2)。

回答by Antonio Malcolm

As of Eclipse Neon (and possibly Mars, as well), you can copy the following two directories, to share your workbench and settings/preferences amongst your different workspaces:

从 Eclipse Neon(也可能是 Mars)开始,您可以复制以下两个目录,以在不同的工作区之间共享您的工作台和设置/首选项:

    [workspace]/.metadata/.plugins/org.eclipse.core.runtime/.settings
    [workspace]/.metadata/.plugins/org.eclipse.e4.workbench

(Side Note: The Copy Settings dialog would not work for me, as it wouldn't permit me to select either checkbox.)

(旁注:“复制设置”对话框对我不起作用,因为它不允许我选择任一复选框。)

回答by J-Dizzle

Good info here - 'Share Eclipse perspective layouts across multiple workspaces'

这里的好信息 - “跨多个工作区共享 Eclipse 透视布局

I use their 'Method #2', listed below.

我使用他们的“方法#2”,如下所列。

Method 2: Use Copy Settings

方法 2:使用复印设置

The other method of saving your window layout is to use the Copy Settings feature when switching to another workspace.

另一种保存窗口布局的方法是在切换到另一个工作区时使用复制设置功能。

  • Open the workspace that contains your customized layout
  • Select File > Switch Workspace > Other… which will open a dialog prompting you for an existing/new workspace
  • Select the workspace, then click the Copy Settings collapsible section
  • Select the Workbench Layout checkbox and click Ok
  • Your workspace will open and should reflect the customised layout of the previous workspace.
  • 打开包含自定义布局的工作区
  • 选择 File > Switch Workspace > Other... 这将打开一个对话框,提示您输入现有/新工作区
  • 选择工作区,然后单击复制设置可折叠部分
  • 选择 Workbench Layout 复选框并单击 Ok
  • 您的工作区将打开并应反映先前工作区的自定义布局。

Here's what the dialog looks like:

对话框如下所示:

enter image description here

在此处输入图片说明

Give it a shot, quite easy!

试一试,很简单!