欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Eclipse中的常用设置

程序员文章站 2024-03-24 10:46:40
...
[size=medium][b]Eclipse中的常用设置[/b][/size]

[size=small][b][color=darkblue]1. eclipse设置@author和@date注解[/color][/b][/size]

Project --> Properties --> Java Code Style --> Code Templates
勾选Enable project specific settings,选中Comments的Types,点击Edit,进行编辑即可:
/**
* @author andrew
* @date ${currentDate:date('yyyy/MM/dd')}
*/

[size=small][b][color=darkblue]2. eclipse中的view[/color][/b][/size]

Window --> Show View --> Other...
Project Explorer
Package Explorer

[size=small][b][color=darkblue]3. eclipse中设置字体大小[/color][/b][/size]

Window --> Preferences --> General --> Appearance --> Colors and Fonts
Basic --> Text Font --> Edit..

[size=small][b][color=darkblue]4. eclipse中设置背景颜色[/color][/b][/size]

Window --> Preferences --> General --> Editors --> Text Editors
Appearance color options --> Background color

[size=small][b][color=darkblue]5. eclipse中导入导出formatter格式文件[/color][/b][/size]

Window --> Preferences --> Java --> Code Style --> Formatter
导入Import / 导出 Export All

[size=small][b][color=darkblue]6. eclipse中添加源码[/color][/b][/size]

// jdk源码位置 Java\jdk1.8.0_112\src.zip
ctrl+左键 --> (Source not found)Attach Source... --> Java\jdk1.8.0_112\src.zip

[size=small][b][color=darkblue]7. eclipse中其他[/color][/b][/size]
显示tab的空格缩进 [img]http://dl2.iteye.com/upload/attachment/0129/7834/bdf1b6d9-7d2e-3cb5-93da-9ca54d9cdc0a.png[/img]
显示隐藏面包屑alt + shift + B [img]http://dl2.iteye.com/upload/attachment/0129/7925/6cf9621d-d98f-3635-84b4-b212620aa256.png[/img]

[size=small][b][color=darkblue]8. eclipse中alt + /快捷键[/color][/b][/size]

Window --> Preferences --> General --> Keys
搜索Content Assist将Binding改成 Alt + /,将When改成Editing Text
搜索word completion将默认绑定Alt + /的Binging改成Ctrl + Alt + /
Window --> Preferences --> Java --> Editor --> Content Assist --> Advanced
勾选Java Proposal和下方的Template Proposal
Window --> Preferences --> Java --> Editor --> Content Assist
Auto Activation --> auto activation triggers for Java
改成.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(,

设置javascript自动提示同理
Window --> Preferences --> Javascript --> Editor --> Content Assist
Auto Activation --> auto activation triggers for Javascript
改成.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(,
如果需要annotataion提示还可以加@

[size=small][b][color=darkblue]9. eclipse中增加bookmark标签[/color][/b][/size]

代码行最左侧空白右键 --> Add Bookmark... --> 填写mark
Window --> Show View --> BookMarks 显示

[size=small][b][color=darkblue]10. eclipse中crtl+H默认打开JavaSearch改成FileSearch[/color][/b][/size]

Window --> Preferences --> General --> Keys
File search的Binding改成ctrl + H

[size=small][b][color=darkblue]11. eclipse中实用操作[/color][/b][/size]

1.拷贝文件全路径
右键 --> Copy Qualified Name
相关标签: java eclipse