Eclipse使用技巧

作者: 木木与呆呆 | 来源:发表于2018-12-29 15:43 被阅读16次

在使用Eclipse开发代码过程用到的小技巧,各种功能配置的使用,
可以有效提高使用舒适度和开发效率。

1.修改Eclipse中字体和大小

Eclipse -> Window -> Preferences -> General -> Appearance -> Color and Fonts
在打开的窗口中选中Basice -> Text Font,
点击右边的Edit..按钮,可以修改字体和大小。


CodeTextFont.jpg

2.在Eclipse中显示空格(space)和制表符(tab)

Eclipse -> Window -> Preferences -> General -> Editors -> Text Editors -> Show whitespace characters


ShowWhitespaceCharacters.jpg

3.Eclipse从Workspace导出导入Preferences

导出:
Eclipse -> File -> Export -> General -> Preferences -> 选择Export All-> 选择to preference file
会生成epf后缀的文件,示例WorkspaceConifg.epf。
导入:
Eclipse -> File -> Import -> General -> Preferences -> 选择Import All -> 选择From preference file


ExportPreferences.jpg
ImportPreferences.jpg

4.新建Workspace的时候复制已有Workspace配置

Eclipse -> File -> Switch Workspace -> Other ...
打开Eclipse Launcher,选择一个新的目录作为Workspace,
然后勾选Cpoy Settings下面的三个选项:

Workbeach Layout
Working Sets
Preferences

点击Launch,Eclipse启动的新Workspace
会复制当前工作空间的配置,减少大量的配置工作。


SwitchWorkspace.jpg

5.Eclipse使用clean参数启动

创建一个Eclipse的快捷方式,
右键快捷方式的属性,在目标的值后面加上-clean参数,
可以清理缓存等,解决Eclipse无法启动的一些问题。


StartWithClean.jpg

6.Eclipse切换语言为英文

创建一个Eclipse的快捷方式,
右键快捷方式的属性,在目标的值后面加上-nl en_US参数,
示例:D:\WorkNew\eclipse3\eclipse.exe -nl en_US
重新启动后Eclipse会自动显示成英文,
包括Eclipse Class Decompiler等支持中文的插件。

7.关闭拼写检查

Eclipse -> Window -> Preferences -> General -> Editors -> Text Editors -> Spelling
在打开的窗口中把勾选的Enable spell checking取消即可。


EnableSpellCheck.jpg

8.设置Eclipse皮肤为Windows经典主题

Eclipse -> Window -> Preferences -> General -> Appearance
勾选Enable theming,配置好后重启Eclipse生效。


WindowsClassicTheme.jpg

9.设置不同类型文件的默认编辑器

Eclipse -> Window -> Preferences -> General -> Editors -> File Associations
选中某个类型的文件(通过文件后缀名区分),可以设置其相关的编辑器。
也可以新增某个类型的文件,为其绑定默认的编辑器。


FileAssociatedEditors.jpg

10.查找当前文件中的字符串,并且输出Search结果

首先在当前文件中双击选中一个字符串,
Eclipse -> Search -> Text -> File
会打开一个Search结果列表。


SearchCurrentFile.jpg

11.代码导出为可执行jar文件

Eclipse -> File -> Export -> Java -> Runnable JAR file
按你的需要打出各种格式的包,主要是Library Handling依赖包的处理方式。


ExportRunnableJar.jpg

12.查看代码的修改记录

在打开的文件中右键,Local History -> Compare With ...
会打开该文件在Eclipse中修改的历史记录,
可以双击某个时间点的版本,比对修改的情况。


FileLocalHistory.jpg

相关文章

  • 【Eclipse】Eclipse使用技巧

    一、参考链接 阿里巴巴开源镜像站-OPSX镜像站-阿里云开发者社区 (aliyun.com)[https://de...

  • Eclipse 使用技巧

    【Ctrl + Shift + O】Import 自动组织 Eclipse 中有一个选项叫做 Organize I...

  • Eclipse使用技巧

    在使用Eclipse开发代码过程用到的小技巧,各种功能配置的使用,可以有效提高使用舒适度和开发效率。 1.修改Ec...

  • CLASS 2

    小技巧:Eclipse如何开启代码助手的自动提示功能,只是使用Eclipse默认的输入了“.”之后才会出现提示。 ...

  • eclipse使用技巧(二)

    快速重写构造函数 右键Source->Generate Constructor using Field:勾选构造函...

  • eclipse使用技巧(一)

    显示行号 打开eclipse->windows->preferences->general->editors->t...

  • Eclipse使用技巧总结

    前言平时总会使用工具eclipse的时候,感觉获得或少的使用什么;提供一些总结和记录。 基本使用 1. Eclip...

  • eclipse使用入门技巧

    1. 工作区字体更改 依次打开Window->preferences,按照图中所示,依次单击 选中Textfont...

  • 【转载】Eclipse使用技巧

    习惯了eclipse开发java程序,公司最近的项目都是idea开发的,同时android studio也是ide...

  • eclipse常见的使用技巧

    查看java源代码 JDK里提供的类,比如 String,Integer,System 都是开源的,免费提供其源代...

网友评论

    本文标题:Eclipse使用技巧

    本文链接:https://www.haomeiwen.com/subject/jkqplqtx.html