Under eclipseCodeStyle and format Configuration
Eclipse code style, format, Configuration
Wang Yancheng (ybygjy # gmail.com ),
April August 24, 2010)
Describes Configuration Management Based on Eclipse code styles.
Code styles, formats, or code styles are very important. We often encounter changes to the original code. Then, when we read some code twice, we will find the starting point. However, some code takes a long time, and some core functional requirements are complicated. However, we still have to believe that the Code style can avoid at least reducing the time it takes for us to test code, find bugs in our own hands, and find bugs in the code of previous colleagues, it also affects our psychological subtle changes.
Basic Development Environment Information
- Eclipse 3.5Http://www.eclipse.org/
- Checkstyle5.0Http://checkstyle.sourceforge.net/
Checkstyle is a third-party Eclipse plug-in that can effectively check the code style and give a prompt.
Note that the checkstyle version is5.0 and later versions
Because the configuration file I provided here is based on 5.0 export.
Checkstyle Configuration
Because there are too many constraints on the default code format of checkstyle itself, if you strictly follow the default constraints at the beginning to write or test the original code of the project, you will see the prompt of the full screen yellow mark, some code styles do not need to be checked for constraints. Therefore, when I use checkstyle, I constantly modify the configuration, removing some constraints and modifying some rules. Now, submit this configuration. See (Resource Information)
- Import checkstyle Configuration
- Export checkstyle Configuration
Eclipse code style Configuration
There are two pieces of code-style personalized configuration: Code style and code format.
- Code style Import and Export
Import code styles
Export Code styles
- Code-style Import and Export
Import code format
Export Code Format
Resource Information
- Style configuration fileStyle, format pack http://download.csdn.net/source/2644324