默认工作环境
general -startup and shutdowun -workspaces
技巧
1、package presentation ->hierarchical 分层分级显示包 东西多的话显示更清楚 项目上面的小三角 而且jar包也可以分层更清晰
2、not found javax.http.HttpServlet 因为没有添加tomcat到runtime 项目右键properties->Project Facets->Runtimes ->tomcat打勾
3、debug模式查看变量的详细信息 就是value window-preferences->搜索hover->variable Values 它上面的那个要去掉 要先debug运行到断点才能看悬停看变量属性
4、serialVersionUID 上面的注释可以通过搜索template->java->code template->comments->fields 中删除
5、直接复制项目的话需要修改虚拟路径 不然还是原来的项目,项目右键属性搜索web->web或者setting什么的修改成所需的名字
6、在工作目录下 打开命令窗口 输入eclipse -clean 可以对插件文件夹进行扫描 即添加插件
7、新建folder后右键build path-》use as source folder 可以作为根路径下的文件在web.xml中添加classpath:的时候可以直接写里面的xxxx.xml和src文件夹一样了
8、如果xml写的过程中alt+/没有提示
8.1、可以preferences搜xml然后在xml catalog中添加约束
8.2、重启试试
9、代码都带上红色的条
可能是converge,show view 中有个converge->窗口中有个X点 一下。
10、eclipse悬浮提示 Preferences 中搜索 hovers 取消勾选 Combined Hover、
11、eclipse优化速度 validator
勾选Suspend all validator 中止所有校验器
12、编辑太长光标自走
Preference -> File and Editors -> Common Editor Preferences取消勾选 enable folding
编码选择
1、Window-->Preferences 搜索Workspace
2、编写properties文件时自动变成ASCII码-》文件右键properties-》resource-》改变编码方式为utf-8或者gbk
518987bug 因为oxygen版本存在无法解析option标签的bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=518987#c0
下载后将plugin的jar包改名字后替换eclipse中plugin的jar包 org.eclipse.wst.web_core
可能在C:\Users\Administrator\.p2\pool\plugins这个路径下 而且替换后需要-clean 启动eclipse
如果http://java.sun.com/jsp/jstl/core 报错 加入jstl.jar包
如果<%@出错 properties->project facets->runtimes->tomcat选择 可能在创建项目的时候没有选择tomcat依赖
因为p2的回收机制,之前删除的jar包没有被回收之前,重装的话就不会进行重新下载动作,但是又找不到所以报错,也就是不能安装新的插件 因此需要通过命令行输入
eclipse -application org.eclipse.equinox.p2.garbagecollector.application -profile D__eclipseworkbench_eclipse
D__eclipseworkbench_eclipse是D:\eclipseworkbench\eclipse\configuration\config.ini中eclipse.p2.profile=D__eclipseworkbench_eclipse
如果卡死 可以等待一下然后卸载掉导致卡死原因的插件
如果页面新增和删除没反应(卡住等待反应)但是修改有反应 可以通过重启eclipse来尝试
在jsp页面复制卡顿
可能是因为和Hyperlinking有冲突 换成alt触发超链接
window->preferences->general->editors->text editors->hyperlinking->换default modifier key
卡在workspace 或者提升加载速度
添加dtd或者xsd约束
修改eclipse.ini文件 下载文件不超时
-Dorg.eclipse.equinox.p2.transport.ecf.retry=15
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.closeTimeout=30000
-Dorg.eclipse.ecf.provider.filetransfer.retrieve.readTimeout=30000
-Dsun.net.client.defaultReadTimeout=30000
问题
1、help里面没有market
-install new software 中添加
eclipse marketplace
Location:http://download.eclipse.org/mpc/indigo/
下载EPP Marketplace Client插件