Eclipse常用设置

Eclipse常用设置_第1张图片


Eclipse 是著名的跨平台的自由集成开发环境(IDE)。最初主要用来 Java 语言开发,但是目前亦有人通过插件使其作为其他计算机语言比如 C++ 和 Python 的开发工具

目录

1.解决中文乱码设置propertiew编码

2.更改字体大小

3.设置护眼颜色

4.修改内存大小

5.显示关闭的窗口

6. cvs 下载空文件夹

7.高亮显示选中的相同变量

8.创建不同工程的快捷方式

9.解决JPEGEncodeParam 编译错误波浪线问题

10.{} must override a superclass 

11.Alt _ 代码提示问题


1.解决中文乱码设置propertiew编码

Window→Preferences→General→Content Types→Text,然后单击Java Properties Files,选定下方的*.properties(locked),接着将最下方的ISO-8859-1改为utf-8,然后点击旁边的 Update,最后点击OK

当然也可以选择其他File来解决中文乱码问题

Eclipse常用设置_第2张图片

2.更改字体大小

Window→Preferences→General→Appearance→Colors and Fonts

然后选择Basic - Text Font并进行编辑修改

Eclipse常用设置_第3张图片

3.设置护眼颜色

Window→Preferences→General→Editors→Text Editors

然后选择Balakground color,取消勾选System Default,设置颜色

Eclipse常用设置_第4张图片

 推荐色调85饱和度123亮度205

Eclipse常用设置_第5张图片

4.修改内存大小

1. 修改JDK内存

Window→Preferences→Java→Installed JREs

点击Edit,在Default VM arguments中设置

Eclipse常用设置_第6张图片

2.修改运行时内存

Debug Configration→Argments → 设置VM argments

Eclipse常用设置_第7张图片

5.显示关闭的窗口

Window→Show View→ Other

选择丢失的窗口

Eclipse常用设置_第8张图片

6. cvs 下载空文件夹

Preferences→Team→ CVS

选择Files and Folders面板 取消勾选Prune empty directories

Eclipse常用设置_第9张图片

7.高亮显示选中的相同变量

在 eclipse 中使用快捷键或其他原因,不小心按错了,使得变量的高亮显示没了

windows-> preferences->java->Editor->Mark Occurences ,选择最上的复选框

Eclipse常用设置_第10张图片

 改变颜色

选择:windows-> preferences->java->Editor->Mark Occurences->第一行有个“Annotations”点击进入,显示出列表,找到 Occurrence annotation 右边选择Color即可

8.创建不同工程的快捷方式

创建一个windows快捷方式指向已安装的eclipse和特殊的工作空间(例如,c:\myworkspace):

步骤:

1.在windows explore中寻找eclipse.exe,在目录菜单使用创建快捷方式 

2.选择快捷方式,编辑其属性.在目标中:在工作空间位置之前使用-data,在具体的工作空间打开这个快捷方式,连接eclipse 

例如 : eclipse -data c:\myworkspace -vm  C:\Java\jdk1.8.0_15\jre\bin\javaw

9.解决JPEGEncodeParam 编译错误波浪线问题

  错误信息:

Description Resource Path Location Type
Access restriction: The method encode(BufferedImage, JPEGEncodeParam) from the type JPEGImageEncoder is not accessible due to restriction on required library C:\Program Files\Java\jre1.5.0_15\lib\rt.jar JRImageLoader.java /stariboss-tianjin_client/src/main/java/net/sf/jasperreports/engine/util line 181 Java Problem

这个是eclipse的设置问题,它默认把这些受访问限制的API设成了ERROR,

点击Windows->Preferences->Java->Complicer->Errors/Warnings

将Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过了 

Eclipse常用设置_第11张图片

10.{} must override a superclass 

Eclipse常用设置_第12张图片

 没有设置编译JDK的坂本,默认坂本是1.5

Windows--Preferences--Java--Compiler,在右边的Compiler compliance level 修改版本为 JDK1.6以上

Eclipse常用设置_第13张图片

11.Alt _ 代码提示问题

一般情况下alt+/有代码提示作用,还有代码提示的快捷代码也不是alt+/,因此要恢复代码提示用alt+/.需要做两件事. 

在 Window - Preferences - General - Keys 内 

1、把word completion的快捷键设置alt+C 

2、把Content Assist的快捷键由ctrl+space改成alt+/ 

Eclipse常用设置_第14张图片

如果还是不提示,极有可能是提示功能被关了. 如下: 

1、菜单window->Preferences->Java->Editor->Content Assist->Enable auto activation 选项要打上勾 

Eclipse常用设置_第15张图片

2、window->Preferences->Java->Editor->Content Assist->Advanced   上面的选项卡Select the proposal kinds contained in the 'default' content assist list: 中把  Java 相关选项打上勾就可以了。

Eclipse常用设置_第16张图片

12.编译错误 a cycle was detected in the build path of project

这个错误是因为eclipse默认的编译提示级别过高造成的,只要将编译级别降低即可,之后项目即可正常编译

window->Preferences->Building

Eclipse常用设置_第17张图片

 

 


你可能感兴趣的:(开发工具,eclipse,java,ide)