eclipse 构建前Eclipse自动保存?

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

Eclipse Auto Save before build?

eclipsemacosideautosave

提问by Ian Vink

Coming from a Visual Studio background...

来自 Visual Studio 背景...

How do I tell Eclipse that it should auto save when ever I build rather than ask each time.

我如何告诉 Eclipse 它应该在我构建时自动保存而不是每次都询问。

VS.NET has it under "Options", but I can't find it in Eclipse.

VS.NET 在“选项”下有它,但我在 Eclipse 中找不到它。

I use a Mac.

我用的是 Mac。

回答by UmAnusorn

First, try

第一次尝试

Window -> Preferences -> General -> Workspace. There you can check "Save automatically before build" and "Build automatically."

窗口 -> 首选项 -> 常规 -> 工作区。在那里您可以选中“构建前自动保存”和“自动构建”。

If that does not work,

如果这不起作用,

PLEASE TRY

请尝试

Preferences -> Run/Debug -> Launching -> "Save dirty editors beforelaunching"

首选项 -> 运行/调试 -> 启动 -> “启动前保存脏编辑器

回答by Matschie

Go to

Window -> Preferences -> General -> Workspace

窗口 -> 首选项 -> 常规 -> 工作区

and there you can check:

在那里你可以检查:

Save automatically before build+ Build automatically

Save automatically before build+ Build automatically

回答by ROMANIA_engineer

Save automatically before build

构建前自动保存

Window> Preferences> General> Workspace> check "Save automatically before build"> OK

窗口>首选项>常规>工作区> 选中“构建前自动保存”>确定

Window PreferencesGeneral Workspace

窗口首选项通用工作区

Save dirty editors before launching

在启动之前保存脏编辑器

Window> Preferences> Run/Debug> Launching> check "Always"for "Save required dirty editors before launching"

窗口>首选项>运行/调试>启动> 选中“始终”以选择“启动前保存所需的脏编辑器”

Launching

发射

Save resources before launching

启动前保存资源

This is actually an alternative to "Save required dirty editors before launching"

这实际上是“启动前保存所需的脏编辑器”的替代方案

Change something in the current file > Run> check "Always save resources before launching"> OK

更改当前文件中的某些内容 >运行> 选中“启动前始终保存资源”>确定

enter image description here
enter image description here

在此处输入图片说明
在此处输入图片说明

Details:

详情

  • IDE: Eclipse Kepler
  • O.S.: Windows
  • IDE:Eclipse 开普勒
  • 操作系统:Windows

回答by Yury

Preferences -> run/debug ->launching -> Save required dirty editors before launching.

首选项 -> 运行/调试 -> 启动 -> 启动前保存所需的脏编辑器。

回答by Daniel Kaplan

This has changed in Eclipse Luna (or maybe it's just because I'm on a mac and the answerers are on a PC).

这在 Eclipse Luna 中发生了变化(或者可能只是因为我在 mac 上而回答者在 PC 上)。

You find it under this menu:

您可以在此菜单下找到它:

Eclipse-> Preferences -> General -> Workspace

Eclipse-> 首选项 -> 常规 -> 工作区

From there, you check "Save automatically before build" + "Build automatically". On a Mac, Preferences isn't under the Window menu, so that confused me for a bit.

从那里,您选中“构建前自动保存”+“自动构建”。在 Mac 上,首选项不在窗口菜单下,所以我有点困惑。

回答by jruiz

(Just for completeness)

(只是为了完整性)

After Window -> Preferences -> General -> Workspace

Window -> Preferences -> General -> Workspace 之后

(x) Save automatically before build + Build automatically

(x)构建前自动保存 + 自动构建

You must go to:

你必须去:

Windows -> Save Perspective As...

Windows -> 将视角另存为...

And select a name according to the perspective you are using. You can overwrite the old ones...

并根据您使用的视角选择一个名称。你可以覆盖旧的...