`

eclipse 总结

 
阅读更多

 

 eclipse, ctrl+o,只会显示本来的field,method,不会显示父类的。

eclipse 图标含义 http://wenku.baidu.com/view/a7790cc9da38376baf1fae1a.html

0、帮助命令:ctrl + shift + l (load)

 

1、自动补全(Content Assist(内容辅助))的快捷键Alt+/ 

位置:Window->Preferences->General->Keys 

重新绑定atl+/为Content Assist即可,Content Assist不要带任何括号后缀的那项。

一般是被Word Completion所替代了

 

 

2、eclipse编译的文件输出(web项目、普通项目都一样):

        右击项目 -- build path -- config build path -- source -- default output folder

源文件夹:src、conf、config、test等还可以继续写,只要代码里面的package声明一样,不同源文件夹下的.java编译后,也能在一个包中。

 

3、项目前大红感叹号

    windows-->preferences-->java-->build path-->classpath variable,选项卡中,new一个M2_REPO(mvn库)的目录,即可。

 

4、eclipse 设置注释模板@author @version 

        4.1、新建文件时自动添加注释

eclipse->window->preference->java->code  styple->code template->Code->New Java files 

        

        点击 Edit 

 

${filecomment}

${package_declaration}

/**

* @author river.wang

* @date ${date} ${time}

*/

${typecomment}

${type_declaration}

 

        

        

        4.2、还有一种方法,是在输入“/**”的时候自动出来的:

        eclipse->window->preference->java->code  styple->code template->comments->typles

        点击 Edit ,就可以根据自己需要编写了

 

5、eclipse-svn插件,在工程树形界面后方显示版本号,但不显示svn提交人

Window-->Preferences-->Team-->SVN-->Lable decorations

点击右侧text decorations选项卡

文件格式:{added_flag}{dirty_flag}{name} {revision}  {date}  {author}

文件夹修饰:{external_flag}{added_flag}{dirty_flag}{name} 

项目修饰:{dirty_flag}{name} [{url_short}]

 

6、Eclipse Debug时显示source not found

在Debug 视图下

-->在调试的线程上 右键单击

-->选择Edit Source Lookup Path

-->选择Add

-->选择Java Project

选择相应的Project(如果有多个,可以直接添加所有的) 进行OK确定即可

 

7、eclipse设置行宽

window-->preference-->java-->code style-->formatter

new一个或edit(内建的不让保存会提示重命名new一个)

在tab的Line Wrapping设置 最大的line width 即可。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics