• 设置自动联想提示 Window -> Preferences -> Java -> Editor -> Content Assist -> Auto Activation • 设置格式化模板 window->preferences->Java->Code Style->Formatter
• 设置默认字符编码格式 1. Window -> Preferences -> General -> Workspace -> Text file encoding -> Other 2. Window -> Preferences -> Web -> JSP Files -> Text file encoding-> Other
• tab缩进设置为4个space 1. window->preference,然后在打开的界面中选择 General->Editors->Text Editors, 再选中右侧的 insert space for tabs 2. 再点击 window->preference-依次选择 java(或C++)->code style ->formatter, 选择右侧的editor,再选择左侧 tab policy的值为spaces only,确定 • 反编译插件 Decompiler
• 设置每行最大字符不超过120
1. WIndow -> Preferences -> General -> Editors -> Text Editors; 2. 勾选上“Show print margin”选项,并且可以在“Print margin colunm”中设置字符限制的大小,例如:80; • 设置JDK本地JavaDOC API路径及源码路径 1. Window -> Preferences -> Java -> Installed JREs -> Edit: 2. 选中设置好的JRE目录,编辑,然后全选 JRE system libraries 下的所有Jar包,点击右边的 Source Attachment; 3. External location 下,选中JDK安装目录下的 src.zip 文件,一路OK 下来。 • HTML、JavaScript、JSP文件代码自动提示 1. Window -> Preferences -> JavaScript-> Editor -> Content Assist -> Auto-Activation 2. Window -> Preferences -> Web -> HTML Files -> Editor -> Content Assist -> Auto-Activation • properties文件中文乱码设置 Window -> Preferences -> General -> Content Types -> Text -> Java Properties File -> UTF-8 -> Update -> OK • 代码注释修改
Files
/**
* @Title: ${file_name}
* @Package: ${package_name}
* @Description: TODO(描述)
* @author ${user}
* @date ${date} ${time}
* @version V1.0
*/
Types
/**
* @ClassName: ${type_name}
* @Description: TODO(描述)
* @author ${user}
* @date ${date} ${time}
* ${tags}
*/
Fields
/**
* @Fields ${field} : TODO(描述)
*/
Constructors
/**
* @Title: ${enclosing_type}
* @Description: ${enclosing_type}构造函数
* ${tags}
*/
Methods
/**
* @Title: ${enclosing_method}
* @Description: TODO(描述)
* ${tags}
*/
overriding methods
/**
* ${tags}
* ${see_to_overridden}
*/
delegate methods
/**
* ${tags}
* ${see_to_target}
*/
getter
/**
* @Title: ${enclosing_method}
* @Description: 获取${bare_field_name}
* @return: ${field_type} ${bare_field_name}
*/
setter
/**
* @Title: ${enclosing_method}
* @Description: 设置${bare_field_name}
*/