「Eclipse」 安装及相关配置参考文档

一、README

此文档仅用于 Windows 环境下安装 eclipse 参考

官方网站下载地址:

https://www.eclipse.org/downloads/packages/release

1、准备安装文件

# 提示:eclipse 最新版本兼容 jdk11 或 11以上更高版本【安装版本不宜过新】
eclipse-jee-2021-03-R-win32-x86_64.zip

2、解压安装即可

# 安装目录
D:\Program Files\eclipse

二、JFinal 插件 —— JBolt

官方网站下载地址:

http://www.jbolt.cn/

1、解压

# cn.jbolt.eclipse.jfinalide_2.0.6.zip

# 目录结构
|-- cn.jbolt.eclipse.jfinalide_2.0.6
|   |—— cn.jbolt.eclipse.jfinalide.reqlibs_2.0.6.jar
|   |-- cn.jbolt.eclipse.jfinalide_2.0.6.jar

2、安装

# 复制解压目录中的所有文件
cn.jbolt.eclipse.jfinalide.reqlibs_2.0.6.jar
cn.jbolt.eclipse.jfinalide_2.0.6.jar

# 粘贴至 eclipse 安装目录下的 plugins 目录中即可完成安装
D:\Program Files\eclipse\plugins

3、JBolt 更新

# 打开 eclipse 	JBolt 工具栏	下拉点击 Check for Updates		更新 JBolt
# 打开 eclipse 	JBolt 工具栏	下拉点击 Update Libs			更新 Libs

三、eclipse 相关配置

1、字体大小

配置参考地址:

https://blog.csdn.net/sunnyzyq/article/details/98446095

# Window -> Preferences -> General -> Appearance -> Colors and Fonts -> Basic -> Text Font -> Edit -> 粗体 14 -> 确定 -> Apply -> Apply and Close

2、编码格式

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

https://blog.csdn.net/weixin_39886469/article/details/114430912

# Window -> Preferences -> General -> Workspace -> Text file encoding -> Other -> UTF-8 -> Apply -> Apply and Close

# Window -> Preferences -> General -> Workspace -> New text file line delimiter -> Other -> Unix -> Apply -> Apply and Close

# Window -> Preferences -> General -> Content Types -> Java Class File -> Default encoding	-> UTF-8 -> Update -> Apply and Close

# Window -> Preferences -> General -> Content Types -> Text -> Default encoding	-> UTF-8 -> Update -> Apply and Close

# Window -> Preferences -> Web -> CSS Files -> Encoding -> UTF-8 -> Apply -> Apply and Close

# Window -> Preferences -> Web -> HTML Files -> Encoding -> UTF-8 -> Apply -> Apply and Close

# Window -> Preferences -> Web -> JSP Files -> Encoding -> UTF-8 -> Apply -> Apply and Close

# Window -> Preferences -> XML -> XML Files -> Encoding -> UTF-8 -> Apply -> Apply and Close

# 项目 -> 右键 -> Properties -> Resource -> Text file encoding -> Other -> UTF-8 -> Apply -> Apply and Close

# 项目 -> 右键 -> Properties -> Resource -> New text file line delimiter -> Other -> Unix -> Apply -> Apply and Close

# Window -> Preferences -> Data Management -> SQL Development -> Execution Plan View Options -> Export encoding -> Other -> UTF-8 -> Apply -> Apply and Close

# Window -> Preferences -> Data Management -> SQL Development -> SQL Results View Options -> Export Format Options -> Default output encoding -> Other -> UTF-8 -> Apply -> Apply and Close

3、自动保存

配置参考地址:

https://blog.csdn.net/yilaguandemei/article/details/79376140

https://blog.csdn.net/weixin_39278265/article/details/114855458

# Window -> Preferences -> General -> Editors -> Autosave -> Enable autosave for dirty editors -> Apply -> Apply and Close

# Window -> Preferences -> General -> Workspace -> Build -> Save automatically before manual build -> Apply -> Apply and Close

# Window -> Preferences -> Run/Debug -> Launching -> Save required dirty editors before launching -> Always -> Apply -> Apply and Close

4、properties 编辑器

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

https://blog.csdn.net/hodge11/article/details/109307281

# Help -> Install New Sofware... -> Add -> properties Editor -> http://propedit.sourceforge.jp/eclipse/updates/ -> Add -> HyperlinkDetector -> PropertiesEditor -> Next -> Next -> I accept the terms of the license agreements -> Finish

5、背景颜色

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

# Window -> Preferences -> General -> Editors -> Text Editors -> Background color -> Color -> 自定义颜色 -> 规定自定义颜色 -> R:204 -> G:238 -> U:208 -> 确定 -> Apply and Close

6、注释模板

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

# Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Types -> Edit... -> 
/**
 * @des 描述
 * @author ${user}
 * @date ${date}
 * ${tags}
 */
# -> OK -> Apply -> Apply and Close

# Window -> Preferences -> Java -> Code Style -> Code Templates -> Comments -> Methods -> Edit... -> 
/**
 * @des 描述
 * @author ${user}
 * @date ${date}
 * ${tags}
 */
# -> OK -> Apply -> Apply and Close

7、Code Recommenders 提示插件

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

https://www.cnblogs.com/shenrong/p/7401992.html

# Help -> Install New Sofware... -> Add -> Code Recommenders -> jar:file:/D:/Program Files/kit/Code_Recommenders_stable-2.5.4.zip!/【Archive...从本地文件选择】 -> Add -> 全选 -> Next -> Next -> Next -> I accept the terms of the license agreements -> Finish

8、Codota 提示插件

官方插件地址:

https://marketplace.eclipse.org/content/codota

# Help -> Eclipse MarketPlace -> Find:Codota -> 回车 -> 0 matches.Browse for more solutions. -> Install -> Confirm -> I accept the terms of the license agreements -> Finish

9、文件校验

配置参考地址:

https://www.cnblogs.com/xiao-lei/p/6660261.html

https://blog.csdn.net/ws_dj_love/article/details/78911430

# Window -> preferences -> Validation

# Window -> preferences -> Web

# Window -> preferences -> XML

10、自动补全

配置参考地址:

https://blog.csdn.net/Angelia620/article/details/85285141

# Windows -> preferance -> java -> Editor -> Content Assist -> Auto Activation -> Auto activation delay(ms): -> 2 -> Auto activation triggers for Java: -> .abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ -> Apply -> Apply and Close

# Windows -> preferance -> java -> Editor -> Content Assist -> Advanced -> 勾选 Java Proposals(Code Recommenders) -> Apply and Close

# Windows -> preferance -> XML -> XML Files -> Editor -> Content Assist -> Auto Activation -> Prompt when these characters are inserted: -> <=:.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ (注意后面还有一个空格) -> Apply -> Apply and Close

# Windows -> preferance -> Web -> HTML Files -> Editor -> Content Assist -> Auto Activation -> Prompt when these characters are inserted: -> <=:.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ (注意后面还有一个空格) -> Apply -> Apply and Close

11、多行注释导致代码排版混乱问题

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

# Window -> Preferences -> Java -> Code Style -> Formmater -> New... -> my -> ok -> Comments -> 取消勾选 Enable block comment formatting -> Apply -> ok -> Apply -> Apply and Close

12、复制粘贴字符串自动转义格式混乱问题

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

# Window -> Preference -> Java -> Editor -> Typing -> In string literals -> 取消勾选 Escape text when pasting into a string literal -> Apply -> Apply and Close

13、设置右键 new 菜单选项

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

# Window -> Perspective -> Customize Perspective... -> Shortcuts -> Submeuns:New -> Java、JBolt -> Apply and Close

14、lombok

官方网站下载地址:

https://projectlombok.org/download

maven 仓库下载地址:

仓库地址:https://mvnrepository.com/artifact/org.projectlombok/lombok/1.18.20

# 粘贴至 eclipse 安装目录下即可
D:\Program Files\eclipse\lombok.jar
D:\Program Files\eclipse\lombok-1.18.20.jar

# 修改 eclipse.ini
# 添加一行:-javaagent:D:\Program Files\eclipse\lombok.jar

15、Alibaba Java Code Guidelines 编程规约插件

# Help -> Install New Sofware... -> https://p3c.alibaba.com/plugin/eclipse/update -> 回车 -> 勾选 Ali-CodeAnalysis -> Next -> Next -> I accept the terms of the license agreements -> Finish

四、开发相关配置

1、Java 配置

配置参考地址:

https://blog.csdn.net/q283614346/article/details/119572531

# Window -> Preferences -> Java -> Compiler -> JDK Compliance -> Compiler compliance level:1.8 -> Apply -> Apply and Close

# Window -> Preferences -> Java -> Installed JRES -> Edit -> 选中默认 -> Remove -> Add... -> Standard VM -> Next -> JRE home:D:\Program Files\Java\jdk1.8.0_201 -> JRE home:jdk1.8.0_201 -> Finish -> Apply -> Apply and Close

2、Maven 配置

配置参考地址:

https://www.cnblogs.com/LilLazy/p/14754535.html

https://blog.csdn.net/q283614346/article/details/119572531

# Window -> Preferences -> Maven -> Installations -> Add... -> Installation home:D:\Program Files\apache-maven-3.6.0 -> Installation name:apache-maven-3.6.0 -> Finish -> 勾选已修改配置 -> Apply -> Apply and Close

# Window -> Preferences -> Maven -> User Settings -> Global Settings: -> Browse... -> D:\Program Files\apache-maven-3.6.0\conf\settings.xml -> User Settings: -> Browse... -> D:\Program Files\apache-maven-3.6.0\conf\settings.xml -> Update Settings -> Apply -> Apply and Close

3、Tomcat 配置

配置参考地址:

https://blog.csdn.net/yerenyuan_pku/article/details/51830104

https://blog.csdn.net/mengxiangxingdong/article/details/80623522

# Window -> Preferences -> Server -> Launching -> Save dirty editors before starting the server -> Always -> Apply -> Apply and Close

# Window -> Preferences -> Server -> Runtime Environments -> Add... -> Apache Tomcat v8.5 -> Next -> Name:Apache Tomcat v8.5 -> Tomcat installation directory: -> Browse... -> D:\Program Files\apache-tomcat-8.5.68 -> JRE:jdk1.8.0_201 -> Finish -> Apply and Close

# 项目 -> 右键 -> Web Project Settings -> Context root:/ -> Apply -> Apply and Close

4、Outline 配置

# Window -> Show View -> Other... -> Outline -> 回车
posted @ 2022-04-28 15:06  无明之辈  阅读(323)  评论(0编辑  收藏  举报