Eclipse的常用设置

设置字体大小

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

  1. Change Tree and Table font for views
  2. Change Part title font

在Eclipse中将Tab替换为4个空格的方法

  1. Eclipse -> Perferences -> General -> Editors -> Click Text Editors -> Set Displayed tab width to 4 and selected Insert spaces for tabs
  2. Eclipse -> Perferences -> Java -> Code Style -> Formatter
    Click new -> Enter Profile name(for example: use-spaces) -> Click OK -> Click indentation -> set Tab policy to Spaces only, indentation size to 4, Tab sizes to 4 -> Click OK -> Click Apply
  3. Eclipse -> Perferences -> Web -> HTML Files -> Editors -> Selected indent using spaces and set indentation size to 4
  4. Eclipse -> Perferences -> XML -> XML Files -> Editors -> Selected indent using spaces and set indentation size to 4
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值