1、注释设置 【重要可以保存使用】

在菜单栏Window--->Preferences--->Java--->Code Style--->Code Templates然后展示Comments节点就是所有需设置注释的元素。可以直接导入如下设置的xml文件。

添加注释的快捷键:Alt+Shift+J 或者 右键--->Source--->Generate Element Comment。

<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">/**
* @return the ${bare_field_name}
*/</template><template autoinsert="true" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">/**
* @param ${param} the ${bare_field_name} to set
*/</template><template autoinsert="false" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">/**
* @Title
* @Description
* ${tags}
*/ </template><template autoinsert="false" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/**
* @FileName ${file_name}
* @Package ${package_name}
* @Description ${todo}[what the file to do]
* @Author
* @Date date{time}
* @Version V1.0.1
*/</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/**
* @ClassName ${type_name}
* @Description ${todo}【what the class to do】
* @Author
* @Date date{time}
* ${tags}
*/ </template><template autoinsert="false" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">/**
* @Fields field{todo}【what the field to do】
*/</template><template autoinsert="false" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">/**
* @Title ${enclosing_method}
* @Description ${todo}【what the method to do】
* ${tags}
* @Return ${return_type}
* @Throws
*/ </template><template autoinsert="false" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">/**
* @Title ${enclosing_method}
* @Description
* ${tags}
* ${see_to_overridden}
*/ </template><template autoinsert="false" context="delegatecomment_context" deleted="false" description="Comment for delegate methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name="delegatecomment">/**
* ${tags}
* ${see_to_target}
*/ </template><template autoinsert="true" context="newtype_context" deleted="false" description="Newly created files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">${filecomment}
${package_declaration} ${typecomment}
${type_declaration}</template><template autoinsert="true" context="classbody_context" deleted="false" description="Code in new class type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.classbody" name="classbody">
</template><template autoinsert="true" context="interfacebody_context" deleted="false" description="Code in new interface type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name="interfacebody">
</template><template autoinsert="true" context="enumbody_context" deleted="false" description="Code in new enum type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.enumbody" name="enumbody">
</template><template autoinsert="true" context="annotationbody_context" deleted="false" description="Code in new annotation type bodies" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name="annotationbody">
</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block
${exception_var}.printStackTrace();</template><template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub
${body_statement}</template><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement}
// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates>

2、格式化代码设置 

在菜单栏Window--->Preferences--->Java--->Code Style--->Formatter然后点击右侧的Edit进行修改。

3、代码智能提示 【可不设置如此多,否则提示反而影响编程速度,可是使用快捷键alt+/提示】

在菜单栏Window--->Preferences--->Java--->Editor--->Content Assist,右侧Auto Activation中Auto activation delay设为1,Auto activation triggers for Java设为.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVW。

4、设置代码区背景色 

在菜单栏Window--->Preferences--->General--->Editors--->Text Editors,右侧Appearance color options中Background color设为:色调85 饱和度123 亮度205。

5、设置“空格”和“=”号不上屏

在菜单栏File--->Import--->Plug-in Development--->Plug-ins and Fragmets,选择Import As Projects with source folders,点击“下一步”,选择org.eclipse.jface.text。在Project Explorer视图中修改org.eclipse.jface.text的源码【如果在项目里没有src,则需要下载Eclipse SDK】,选择org.eclipse.jface.text.contentassist,修改CompletionProposalPopup.java文件中下面的代码:

if (contains(triggers, key))
修改为
if (key!=';'&&key!='='&&key!=0x20&& contains(triggers, key))

然后鼠标右键点击org.eclipse.jface.text项目,选择Export--->Plug-in Development--->Deployable plug-ins and fragments。导出后将生成的文件覆盖安装目录中plugins文件夹下的对应文件即可。

工欲善其事-Eclipse设置的更多相关文章

  1. java中获取接口(方法)中的参数名字(eclipse设置编译参数)(java8 javac -parameters)

    interface接口参数 jdk1.7及以前使用spring功能实现的: 注意: 1.该功能只能获取类的方法的参数名,不能获取接口的方法的参数名. public static void test() ...

  2. Eclipse设置、调优、使用(转自)

    转自http://yuanzhifei89.iteye.com/blog/974082 eclipse调优 一般在不对eclipse进行相关设置的时候,使用eclipse总是会觉得启动好慢,用起来好卡 ...

  3. Eclipse设置不格式化注释

    Eclipse设置不格式化注释 注释中写点带格式的文字,format后全乱了,解决办法如下: Windows -> Preferces -> java -> Code Style - ...

  4. 安装Maven、Eclipse设置、添加地址JAR

    1.下载Maven 地址:http://maven.apache.org/download.cgi 2.安装Maven 系统变量:MAVEN_HOME = D:\maven\apache-maven- ...

  5. Eclipse设置软tab(用4个空格字符代替)及默认utf-8文件编码(unix)

    简单配置版本: Eclipse設置 一.window->Preferences-> General-Editors->Text Editors , 右边勾选insert spaces ...

  6. Eclipse设置、调优、使用

    eclipse调优 一般在不对eclipse进行相关设置的时候,使用eclipse总是会觉得启动好慢,用起来好卡,其实只要对eclipse的相关参数进行一些配置,就会有很大的改善. 加快启动速度 1. ...

  7. Eclipse设置、问题解决方案

    Eclipse设置: 1.如何把eclipse关闭提示调出来? 可以这样打开这个提示:选择 Windows --Preferences,在左边树上选择“General” --“Startup and ...

  8. eclipse设置和优化

    1.eclipse下的编码设置: eclipse 中使用模板新建 JSP,xhtml等 文件时,默认的编码为:ISO-8859-1. ISO-8859-1 编码对于中文的显示是不支持的,如果要支持简体 ...

  9. eclipse 设置编辑窗口字体和背景颜色

    最近装了几次系统,公司也换过电脑,所以换了几次eclipse,当然家里用的当然是最新版,公司就只有用几百年前的东西了 进入重点,我的编辑窗口习惯使用灰色的背景,感觉全白的不好看,还伤视力(没有科学依据 ...

随机推荐

  1. Asp.Net MVC<六>:Controller、Action 待续

    控制器 抽象类Controller Visual Studio的向导创建的Controller类型继承自抽象类Controller. 它是ControllerBase的子类. 实现了IControll ...

  2. UI: 窗口全屏, 窗口尺寸

    窗口全屏 窗口尺寸 示例1.窗口全屏UI/FullScreen.xaml <Page x:Class="Windows10.UI.FullScreen" xmlns=&quo ...

  3. hbase shell 常见命令

    quick start from official Hbase  hbase(main):003:0> create 'test', 'cf' 0 row(s) in 1.2200 second ...

  4. iOS获取本机IP地址

    #import <ifaddrs.h> #import <arpa/inet.h> // Get IP Address - (NSString *)getIPAddress { ...

  5. 【bzoj3124】 Sdoi2013—直径

    http://www.lydsy.com/JudgeOnline/problem.php?id=3124 (题目链接) 题意 求树的直径以及直径的交. Solution 我的想法超麻烦,经供参考..思 ...

  6. 如何修复Ubuntu 14.04 系统设置丢失的问题

    其实遇到这个问题的一个最主要的原因是之前执行过卸载ibus输入法的操作,所以为了避免这个问题请不要卸载ibus输入法,大家依然可以安装fcitx输入法使用. 如果已经出现了这个问题,那该怎么解决呢?很 ...

  7. 【CityHunter】游戏进度总控,及需求设计

    需求列表 序号 标题 描述 进度 更新日期 1 游戏主界面 游戏进入的主操作界面,     2 基础定位功能 实现自身定位功能,     3 特殊地点的Marker 搜索周边银行(资产保护).医院(状 ...

  8. [HAOI2009]求回文串

    神奇到爆炸的贪心,策略很简单.但是实现上好像比较恶心.换了一种思路.先保存所有点应该转移到的位置,BIT搞个逆序对就好了. 如何找到每个点应该转移到的位置?这个处理方式也是比较玄学.看代码吧. //O ...

  9. WEKA使用

    参考 http://bbs.middleware123.com/thread-24052-1-1.html  使用Weka进行数据挖掘 http://quweiprotoss.blog.163.com ...

  10. python学习笔记-(十二)scoket编程基础

    socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过"套接字"向网络发出请求或者应答网络请求. socket起源于Un ...