共享/导出 eclipse 工作集
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2369829/
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
Share / Export eclipse working sets
提问by Mark Pope
I have created a couple of java working sets for a project in my workspace and want to share them with other people (using different workspaces). Is there a way to export them?
我在我的工作区中为一个项目创建了几个 Java 工作集,并希望与其他人(使用不同的工作区)共享它们。有没有办法导出它们?
采纳答案by Phil Rykoff
download the AnyEdit addon:
下载 AnyEdit 插件:
and then use the following work through:
然后使用以下工作:
- Via the menu bar: File > “Export…”
- Select “General” / “Working Sets”
- Click “Next >”
- Select the working set(s) you want to export and where you want to export the file.
- Click “Finish” to perform the export.
- 通过菜单栏:文件>“导出...”
- 选择“常规”/“工作集”
- 点击“下一步>”
- 选择要导出的工作集以及要将文件导出到的位置。
- 单击“完成”以执行导出。
回答by VonC
You can try and export (as in "copy to another people workspace metadata directory"):
您可以尝试导出(如“复制到另一个人的工作区元数据目录”):
</path/to/.metadata>\.plugins\org.eclipse.ui.workbench\workingsets.xml
This is the file referencing your working sets.
这是引用您的工作集的文件。
z0radds in the comments:
my team mate replaced his
workingsets.xml
with my version of the file, and it worked well.
However, you must exit Eclipse before replacing the file, because Eclipse will overwrite it with the old version when it exits.
I think you only need to do this once.
我的队友
workingsets.xml
用我的文件版本替换了他的,并且运行良好。
但是,您必须在替换文件之前退出 Eclipse,因为 Eclipse 会在退出时用旧版本覆盖它。
我认为你只需要这样做一次。
回答by Peter
In Eclipse Indigo the working sets export has moved to Export -> Team Project Set and there is a check box top left to export working sets.
在 Eclipse Indigo 中,工作集导出已移至导出 -> 团队项目集,左上角有一个复选框用于导出工作集。
回答by Mr. Polywhirl
Although, File→ Export→ Team→ Team Project Setis the correct way to export working sets, you could write an Eclipse External Tool.
虽然File→ Export→ Team→Team Project Set是导出工作集的正确方法,但您可以编写一个 Eclipse 外部工具。
External Tools
外部工具
Open a new dialog by navigating:
Run→ External Tools→ External Tools Configurations…
Select Programand click the Newbutton to create a new configuration.
Note:You will only need to use the "Main" tab.
Give the tool a title e.g. "Export Working Sets"
Windows
- Location:
${env_var:SystemRoot}\System32\cmd.exe
- Working Directory:
${env_var:USERPROFILE}\Documents
Arguments:
/c copy /y ${workspace_loc}\.metadata\.plugins\org.eclipse.ui.workbench\workingsets.xml workingsets-${current_date}.xml
Linux
- Location:
/bin/cp
- Working Directory:
${env_var:HOME}/Documents
Arguments:
${workspace_loc}/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml workingsets-${current_date}.xml
- Location:
通过导航打开一个新对话框:
Run→ External Tools→External Tools Configurations…
选择程序并单击新建按钮以创建新配置。
注意:您只需要使用“主要”选项卡。
为工具命名,例如“导出工作集”
视窗
- 地点:
${env_var:SystemRoot}\System32\cmd.exe
- 工作目录:
${env_var:USERPROFILE}\Documents
参数:
/c copy /y ${workspace_loc}\.metadata\.plugins\org.eclipse.ui.workbench\workingsets.xml workingsets-${current_date}.xml
Linux
- 地点:
/bin/cp
- 工作目录:
${env_var:HOME}/Documents
参数:
${workspace_loc}/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml workingsets-${current_date}.xml
- 地点: