现在的位置: 首页 > 综合 > 正文

MyEclipse工具

2012年12月22日 ⁄ 综合 ⁄ 共 888字 ⁄ 字号 评论关闭

1.从代码把一部分重复的代码提取出来成为独立的方法。
选中代码-->右击-->Refactor-->Extract Method-->填入Method name-->OK

2.提示信息:alt+/

3.格式化代码:ctrl+shft+f

4.注释:ctrl+/,ctrl+shft+/

5.快速对多个相同的名字进行重命名:ctrl+1-->Rename in file.

6.查看继承类:ctrl+T

7.从类的方法中抽取接口
在类上右击-->Refactor-->Extract Interface-->Interface name:...和选择要抽取接口的方法

8.移动类
在类上右击-->Refactor-->Move-->选择所要移动到的包

9.新建与使用用户库

在类上右击-->Properties-->Java Build Path-->AddLibrary-->User Library-->next-->user Librarys...-->new-->User library name:...

-->Add JARs...-->....

10.编写spring配置文件时,不能出现帮助信息
由于spring的schema文件位于网络上,如果机器不能连接到网络,那么在编写配置信息时候就无法出现提示信息,解决方法有两种:
1).让机器上网,eclipse会自动从网络上下载schema文件并缓存在硬盘上。
2).手动添加schema文件,方法如下:
windows->preferences->myeclipse->files and editors->xml->xml catalog
点"add",在出现的容器中的Key Type中选择URI,在location中选"File system",然后在spring解压目录的dist/resources目录中选择spring-beans-2.5.xsd,回到设置窗口的时候不要急着关闭窗口中的Key Type改为Schema Location,key改为http://www.springframework.org/schema/beans/spring-beans-2.5.xsd

 

抱歉!评论已关闭.