设置字体大小
Window -> Preferences -> General -> Apprearance -> Colors and Fonts -> Basic -> Text font
Description: The text font is used by text editors.
Window -> Preferences -> General -> Apprearance -> Colors and Fonts -> Java -> Java Editor Text Font(set to default: Text font)
Description: The Java editor text font is used by Java editors.
设置背景颜色
Window -> Preferences -> General -> Editors -> Text Editors -> Backgroud colors
设置代码自动补全
Window -> Perferences -> Java -> Editor -> Content Assist
在Auto activation triggers for Java:
选项后的文本框中会看到一个.
。
eclipse 默认只有在你输入.
之后才会有代码提示和自动补全。
需要在.
之后加上abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
,
但是配置了代码自动补全后,常常空格时被补全代码,这就很烦了. 所以需要勾选 Disable insertion triggers except 'Enter'
注意,如果代码自动补全不起作用。看一下 Window -> Perferences -> Java -> Editor -> Content Assist -> Advanced
在 Select the proposal kinds contained in the ‘default’ content assist list: tab 中
勾选 checkbox Java Proposals
或者 Java Proposals(Task-Focused)
(如果这个选项存在)
禁用 AppXray
Window -> Perferences -> Oracle -> AppXray
eclipse 启动后, 经常卡在 AppXray Resource Change Handler,不管进行什么操作都是这里要等待这个进程的完成。然后不断关闭进程重启启动都是这样。
移除最近的 workspaces
Window -> Preferences -> General -> Startup and Shutdown -> Workspaces
Prompt for workspace on startup
checkbox: if seleced, it means can select workspace when eclipse startup.
移除不需要的启动项
Window -> Preferences -> General -> Startup and Shutdown
禁用自动更新
Window -> Preferences -> Install/Update > Automatic Updates
Customize Perspective
Window -> Perspective > Customize Perspective
禁用 Validation
Window -> Preferences -> Validation
设置 Code Snippets
Window -> Perferences -> Java -> Editor -> Templates
修改快捷键 shortcuts
Window -> Perferences -> General -> Keys
设置 UTF-8 encoding
选项一
-
Window -> Perferences -> General -> Content Types, set UTF-8 as the default encoding for all content types.
-
Window -> Preferences -> General -> Workspace, set Text file encoding to Other : UTF-8
选项二
设置默认的encoding-set
打开Eclipse Home目录下的eclipse.ini
文件,或者在使用STS(Spring Tool Suite)的情况下,打开STS.ini
文件。在文件末尾添加以下内容
-Dfile.encoding=UTF-8
设置Targeted Runtimes
Select project MyProject
-> right click -> select Targeted Runtimes
-> choose runtime Oracle Weblogic Server 14.1.1.0
注意:您需要先在Eclipse中安装Weblogic Server工具,然后才可以选择运行时环境“Oracle Weblogic Server 14.1.1.0”。
将文件夹作为项目导入Eclipse
如果您要将deploy
文件夹作为项目导入工作空间,首先需要创建一个名为.project
的文件,并将以下内容复制到该文件中。
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>deploy</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
在MacOS系统的Eclipse中增加UI缩放比例的方法:
Eclipse -> Perferences…(Cmd + ,
) -> General -> Apprearance -> Colors and Fonts -> View and Editor Folders
- Change
Tree and Table font for views
- Change
Part title font
在Eclipse中将Tab替换为4个空格的方法
- Eclipse -> Perferences -> General -> Editors -> Click
Text Editors
-> SetDisplayed tab width
to4
and selectedInsert spaces for tabs
- Eclipse -> Perferences -> Java -> Code Style -> Formatter
Clicknew
-> Enter Profile name(for example:use-spaces
) -> ClickOK
-> Clickindentation
-> setTab policy
toSpaces only
,indentation size
to4
,Tab sizes
to4
-> ClickOK
-> ClickApply
- Eclipse -> Perferences -> Web -> HTML Files -> Editors -> Selected
indent using spaces
and setindentation size
to4
- Eclipse -> Perferences -> XML -> XML Files -> Editors -> Selected
indent using spaces
and setindentation size
to4