Why does eclipse create a .settings directory?

后端 未结 3 1269
不知归路
不知归路 2021-02-05 00:47

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?

相关标签:
3条回答
  • 2021-02-05 01:01

    Those are project specific settings for eclipse. You do not need to include them in svn, as each users eclipse will create these when they checkout project, or they may even use another IDE and not need them. If you are the only one using the project then it won't matter if you include them though.

    0 讨论(0)
  • 2021-02-05 01:03

    The .settings folder is used by various plugins to set persistent 'Properties' as opposed to 'Preferences' to specify project specific settings that should be preserved.

    This is usually a directory you most definitely want checked into svn/cvs/git etc as it will ensure that all users who check that project out into eclipse use the right project specific settings.

    In our case we use it to supply a minimum compiler version of 5 since some devs are on Java 5 versus 6 etc but we want things compiled to 5 for our servers. We also use it to enforce some coding standards and auto-formaters which makes version diffs much easier to read.

    In your specific case you selected 'Enable Project Specific Settings' under "Properties->Java Compiler" by right clicking on the project and choosing properties.

    0 讨论(0)
  • 2021-02-05 01:08

    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.

    0 讨论(0)
提交回复
热议问题