Eclipse 使用笔记

常用快捷键

Ctrl + Shift + R 搜索文件
Ctrl + Shift + T 搜索类型
Ctrl + O 搜索成员
10 Eclipse Navigation Shortcuts Every Java Programmer Should Know
 

智能提示

Windows > Preferences > General > Keys > Content Assist
在此设置智能提示快捷键
Windows > Preferences > Java > Editor > Content Assist > Auto activation triggers for Java:
在此将智能提示弹出条件设置为 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
 

在Workspace之间共享Eclipse的设置

拷贝${workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings。
How to share eclipse configuration over different workspaces
 

Unicode设置问题

Unicode/UTF-8 in your Eclipse Java projects
 

Maven插件与代理服务器

在使用代理服务器上网的情况下,Eclipse内置的Maven插件无法使用IE或者Eclipse的设置,此时需要在Maven的配置文件(settings.xml)中单独设置代理服务器。
Maven plugin not using eclipse's proxy settings
Can access maven repository from behind proxy, need help
 

设置字体

Windows > Preferences > General > Appearance > Color and Fonts > Basic > Text Font > Edit...
How can I change font size in Eclipse for Java text editors?
 

启动程序前自动保存

Windows > Preferences > Run/Debug > Launching > Save required dirty editors before launching > Always
Eclipse: Save files without asking when I click run
Windows > Preferences > Server > Launching > Save dirty editors before starting the server > Always
 

启动Web应用时不使用Eclipse内置浏览器而是打开IE,Chrome或Firefox

Windows > Preferences > General > Web Browser > Use exernal web browser > Firefox(Internet Explorer,Chrome)
 

延长Server启动时间(缺省时间45秒太短)

双击Server打开属性页在Timeouts部分中修改设置
How can I disable the eclipse server startup timeout?
 

保存Java文件时自动整理import

Windows > Preferences > Java > Editor > Save Actions > Perform the selected actions on save > Organize imports
快捷键 Ctrl + Shift + O
Can you organize imports for an entire project in eclipse with a keystroke?
 

Lombok设置问题

使用Lombok,可以在Eclipse中为Java类自动生成getter和setter方法,大大提高开发效率。可以说Lombok是一个必不可少的Java开发包和Eclipse插件。
Lombok插件安装步骤:
  1. 启动lombok-<version>.jar
    使用控制台的话,启动命令为 java -jar lombok-<version>.jar
    如果使用maven的话,该程序位于C:\Users\<user name>\.m2\repository\org\projectlombok\lombok\<version>
  2. 按下"specify location"按钮,指定Eclipse的位置
  3. 按下"Install / Update"按钮,安装lombok

插件Plugins

插件 说明 下载
WindowBuilder Swing界面可视化开发插件 下载页
Spring Tool Suite Spring技术相关插件
1.Spring配置文件编辑器
2.快速查找(quick search)功能(快捷键Ctrl + Shift + L)
Eclipse Marketplace
JBoss Tools JBoss技术相关插件
1.包含Hibernate Tools,可用于创建Hibernate逆向工程(ORM)
Eclipse Marketplace
e(fx)clipse JavaFX开发用插件
1.为fxml文件增加右键菜单:用Scene Builder打开
2.JavaFX的css编辑器
下载页
Eclipse Color Theme 颜色主题插件 Eclipse Marketplace
Gradle IDE Gradle插件 Eclipse Marketplace
Eclipse Subversive SVN插件
1.Windows > Preferences > Team > SVN > SVN Client
下载,设置SVN客户端
下载页
Aptana Studio Ruby on Rails 下载页
 

去除Console窗口输出长度限制

Windows > Preferences > Run/Debug > Console > Limit console output
缺省情况下输出长度有80000字符的限制,将Limit console output的勾去掉即可无限制输出。
adjusting eclipse console size
 

粘贴字符串时自动加上转义字符\

Window > Preferences > Java > Editor > Typing > Escape text when pasting into a string literal
勾选Escape text when pasting into a string literal。
Raw Strings in Java - for regex in particular
 

Deployment Assembly配置文件的位置

.settings/org.eclipse.wst.common.component
可以在Navigator View中查看
In which file eclipse “deployment assembly” configurations are at?
 

无法使用Querydsl插件生成Q类

在Eclipse.ini中添加
-vm
C:\Program Files\Java\<version>\bin\javaw.exe
-vmargs
...
Eclipse issue with Maven build and JDK when generating Qclasses in Querydsl
 

你可能感兴趣的:(Eclipse 使用笔记)