为什么eclipse创建一个.settings目录? [英] Why does eclipse create a .settings directory?

查看:141
本文介绍了为什么eclipse创建一个.settings目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到eclipse最近创建了一个.settings目录,里面有一个文件,我想知道我是否应该添加到版本控制? SVN?



还有,这是新的吗?我一直在使用eclipse一段时间,但从来没有注意到。



目录中文件的内容是这样的:

  #Sun Oct 11 14:57:03 CEST 2009 
eclipse.preferences.version = 1
org.eclipse.jdt.core.compiler .codegen.inlineJsrBytecode = enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform = 1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal = preserve
org。 eclipse.jdt.core.compiler.compliance = 1.6
org.eclipse.jdt.core.compiler.debug.lineNumber = generate
org.eclipse.jdt.core.compiler.debug.localVariable = generate
org.eclipse.jdt.core.compiler.debug.sourceFile = generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier = error
org.eclipse.jdt.core.compiler .problem.enumIdentifier = error
org.eclipse.jdt.core.compiler.source = 1.6

这些设置应该是工作区范围的,而不是项目特定的?

解决方案

记录项目特定的设置与工作区偏好设置。



我注意到,当将常规Java项目转换为Java EE项目时,通常会创建此文件。



只有当项目的编译器/警告设置与默认工作区设置不同时,我才会检查此文件。



当一些遗留项目无法使用最新最好的java编译器进行编译时,或者当第三方产生的源代码产生很多良性警告但污染您的问题 view。



如果要使用项目特定的设置,那么肯定会检查这个文件,否则删除它。


i have noticed that eclipse recently creates a .settings directory with 1 file inside and i am wondering if i should add this to version control? SVN?

also, is this new? i have been using eclipse for quite a while, but never noticed it.

the contents of the file in the directory is this:

#Sun Oct 11 14:57:03 CEST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

shouldnt these settings be workspace-wide and not project specific?

解决方案

This file records project specific settings vs. workspace preferences.

I noticed that this file is usually created when you convert a regular Java project to Java EE project.

The only time I would check this file in is when the project's compiler/warning settings are different from the default workspace settings.

This may be the case when some legacy projects cannot be compiled with the latest and greatest java compiler, or when the source code generated by a 3rd party produces a lot of warnings that are benign but pollute your Problems view.

If you are going to use project specific settings, then definitely check this file in. Otherwise delete it.

这篇关于为什么eclipse创建一个.settings目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆