eclipse使用相关

来源:互联网 发布:圣诞装饰 知乎 编辑:程序博客网 时间:2024/06/05 18:09

初始化配置

字体设置:

Windows-->Prefereces-->General-->Appearance-->Colors and Fonts-->Java-->Java Editor Text Font
xml文件字体:
Windows-->Prefereces-->General-->Appearance-->Colors and Fonts-->Basic-->Text Font

自动补全:
Windows-->Preferences-->Java-->Editor-->Content Asist
Auto activation triggers for Java文本框内容改为:.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

编码格式:
Window-->Preferences-->General-->Workspace-->Text file encoding
window-->Preferences-->general-->Content Types-->Text

显示行数:
Windows-->Perference-->General-->Editors-->Text Editor-->show line numbers

打开Package Explorer窗口

Window->Show View->Other->Java->Package Explorer


tab换4个空格
1.window -> preference -> General -> Editors -> Text Editors,选中insert space for tabs;
2.点击 window -> preference -> java -> code style -> formatter,点击new按钮,命名一个新的样式,点击右侧的editor,选则左侧 tab policy的值为spaces only,应用保存即可


快捷键

可以通过菜单栏中Window–>Preferences–>General–>Keys来查看和修改快捷键绑定。

Ctrl+Shift+F  格式化当前代码
Ctrl+/  注释当前行,再按则取消注释
Ctrl+Shift+M  添加类的import导入
Ctrl+Shift+O  组织类的import导入(既有Ctrl+Shift+M的作用,又可以没用的导入)
Ctrl+Y  重做(与撤销Ctrl+Z相反)
Ctrl+D  删除当前行或者多行
Alt+↓/↑  当前行和下面/上面一行交互位置
Ctrl+Alt+↓/↑  复制当前行到下/上一行(复制增加)

Ctrl+K  参照选中的word快速定位到下一个(如果没有选中word,则搜索上一次使用搜索的word)
Ctrl+Shift+K  参照选中的word快速定位到上一个
Ctrl+Shift+T  搜索类(包括工程和关联的jar包)

Alt+Shift+R  重命名方法名、属性或者变量名
Alt+Shift+M  把一段函数内的代码抽取成方法
Alt+Shift+C  修改函数结构
Alt+Shift+Z  重构的后悔药(Undo)

Ctrl+O  快速显示 OutLine
Ctrl+T  快速显示当前类的继承结构
Ctrl+W  关闭当前Editer
Alt+Shit+S  快速调出Source
Ctrl+Shift+G  查找所有调用该方法的类
Ctrl+ Alt +H  查找该方法所有被调用地方


常用插件下载地址:

gradle: http://dist.springsource.com/release/TOOLS/gradle
svn: http://subclipse.tigris.org/update_1.8.x
git: http://download.eclipse.org/egit/updates/




0 0
原创粉丝点击