myEclipse快捷键及其常用设置

快捷键:
    查找替换:ctrl + f
    复制行: ctrl + alt + down
    删除行: ctrl + d
    插入行: shift + enter, ctrl + shift + enter
    移动行: alt + up, alt + down
    内容提示(Content Assist): alt + /
    快速修正: ctrl + 1
    格式化代码: ctrl + shift + f
    单行注释: ctrl + /
    多行注释: ctrl + shift + /, ctrl + shift + \
    最大化窗口: ctrl + m   【将编辑窗口撑满整个eclipse的界面,再按一次则恢复之前的状态】
    编译运行:alt + r  【此快捷键一般情况下不是alt+r为了方便使用设置成了此快捷键,下文中有修改快捷键的方法】

    生成方法注释:alt+shift+J   【生成方法注释内容的修改方法在本文最后做了相关介绍】
    
修改默认编码:
    window - preference - General - Workspace - 把GBK改成UTF-8
修改编译环境:
    window - preference - Java - Compiler -
修改JDK:
    window - preference - Java - Installed JREs -
    
配置快捷键:
    所有快捷键配置都是在: window - preferences - general - keys
    内容提示:
        搜索 Content Assist - remove binding - 设置为 alt + /
        搜索alt+/ - word ... - remove binding
    运行程序:
        搜索 Run Java Application - remove binding - alt + r
    切换页面:
        搜索 Next Editor - 改为 ctrl + tab
    
功能设置:
    取消拼写检查:    window - preferences - general - Editors - Text Editors - Spelling - 去掉所有勾
    修改格式化配置
        window - preferences - java - code style - formatter - new - line wrapping - max line width - 改为999
        将comment中所有的勾都去掉
        
修改java script默认编码:
    window - preferences - General - Content Types - 右侧窗口中(Text - Java Script(最下方中Default encoding: 改为GBK))

代码功能:
    生成get,set方法: source - generate getters and setters
    生成构造函数使用属性: source - generate constructor using fields
    生成构造函数参照父类: source - generate constructor from superclass
    生成equals: source - generate hashCode and equals
       
配制Servlet模块(Servlet.java)
    (D:\Program Files\MyEclipse 6.6\myeclipse\eclipse\plugins
    \com.genuitec.eclipse.wizards_6.6.0.zmyeclipse660200810\templates)
配制Jsp模块(Jsp.vtl)
    (D:\Program Files\MyEclipse 6.6\myeclipse\eclipse\plugins
    \com.genuitec.eclipse.wizards_6.6.0.zmyeclipse660200810\templates\jsp)
    
JSP设置:
    Preferences - General - Editors - File Associations - File type中找到*.jsp -
    在Associated editors 中找到MyEclipse JSP Editor 选default
XML设置:
    Preferences - General - Editors - File Associations - File type中找到*.xml -
    在Associated editors 中找到MyEclipse Web XML Editor 选default   

 

下图为生成方法注释的修改:

图中选择Methods点击右方的Edit按钮,则可修改pattern中的注释内容

把光标移动想要生成的注释的方法体中,按快捷键alt+shift+J 即可生成自己编辑的注释

posted @ 2013-09-02 15:17  zunpengw  阅读(630)  评论(0编辑  收藏  举报