`

eclipse 小技巧 小设置

阅读更多

使用java开发的同学们,eclipse应该是都熟悉不过了吧,其中有一些小技巧,小设置记录一下,以防不备之需,都是用到时遇到的问题,一下内容也会不停地补充更新:

 

1)在eclipse安装目录下configuration\.settings目录下的 org.eclipse.ui.ide文件,这个文件保存了一些用户的小设置,其中SHOW_WORKSPACE_SELECTION_DIALOG参数决定了在启动时0是否显示workspace。

 

2)ctr + shift + R 或者 ctr + shift + H

查找文件

 

4) Syntax error,annotations are only available if source level is 5.0
解决办法:Project->Properties->Java Compiler->Compiler Compliance Level选择5.0或者以上的jdk版本

 

5) working set管理工作区域

Eclipse鼓励将不同的功能模块划分为独立的项目存在,这样不但结构清晰,组织起来还非常灵活,因为我们可以用feature对这些项目进行不同的组合,输出后得到具有不同功能的产品。

不过这样一来Package Explorer里的项目会以更快的速度增加,当你面对几十上百个项目时,工作效率必然大打折扣。幸好Eclipse提供了工作集(Working Set)的功能,它可以用来划分这些项目。

在Package Explorer视图的下拉菜单里选择Show->Working Sets,然后还是在它的菜单里选择Select Working Sets,在对话框里定义你的工作集,每个工作集要对应至少一个项目,按OK后你的项目就分好类了,没有归类的项目都放在名为Other Projects的工作集里。


6) "Initializing Java Tooling" or "Repository registry initialization" hang out when loading project

From http://tedvinke.wordpress.com/2010/06/21/eclipse-initializing-java-tooling-hangs/

Sometimes using SpringSource Tool Suite (STS) e.g. version 2.3.2- which is based on Eclipse – startup hangs on various operations:

  • Initializing Java Tooling
  • Repository registry initialization

STS/Eclipse does not seem to respond to anything – the UI freezes and that’s it! I’ve had this on several occassions with no apparent cause on my part. Usually it has something to do with fiddling with (adding libraries to) the classpath and/or cleaning the project. Some users report Eclipse hangs at “Initializing Java Tooling” at 30% for 20-30 secs after which everything continues normally, but I don’t have that much luck :)

I’ve tried the most suggested actions in forum posts, such a starting STS/Eclipse with the -clean parameter which most of the times doesn’t work in my configuration. If you inspect the .log files under the workspace’s .metadata folder you might find something of interest, but quite often STS/Eclipse just hangs without anything written to the log in my case. The largeness of your project or the amount of projects quite often seem to be one of the causes. Here are a few workarounds and/or solutions that might prove succesful:

  • Start a new workspace and import the project back in – which is just plain tedious and annoying although it quite often works
  • Close all projects before you exit Eclipse after which Eclipse normally restarts.
  • Some users have reported it does seem related to a configured Tomcat server instance. If you have this configured a possible workaround instead of reimporting your projects in a new workspace, is to rename the .project file in workspace/Servers, restarting, removing and adding the Server configuration again.
  • The solution I found – which seems to work most of the times – is to remove or rename the .projects folder in .metadata/.plugins/org.eclipse.core.resources in the workspace folder. This doesn’t seem to affect any project and the .project folder will be recreated when Eclipse restarts.

Hopefully someone with this problem saves some time because of this. Ofcourse the real problem needs to be addressed by the guys and girls over at Eclipse.

 

7)  Eclipse中Team subclipse在提交或更新时遇到文件被锁的信息

在eclipse里提交和更新文件是抱错。

Attempted to lock an already-locked dir
svn: Working copy 'F:\workspace\WebFrame\WebRoot\attach\prodrelation' locked

执行“清除”操作后,问题解决了。
很多操作,例如中断提交,都会进入这种工作拷贝的锁定状态。

 

8) 在Eclipse中servers中遇到web项目有关无法同步的问题时

请查看如下项目是否都是"Synchronized"状态


如果不是同步状态的话,对应项目使用maven重新maven install编译。

 

9) 调试过程中的临时结果 快捷键

选中代码区 ctr+shift+D

  • 大小: 191.1 KB
  • 大小: 36.9 KB
分享到:
评论

相关推荐

    Eclipse调试小技巧,使用更加快速

    多种快捷方式,Eclipse调试小技巧,使用更加快速

    eclipse 使用技巧

    eclipse 使用技巧 使你成为eclipse高手

    Eclipse全面提速小技巧.zip

    Eclipse全面提速小技巧.zip

    Eclipse使用的小技巧

    eclipse使用的一些小技巧,让初学者可以更好地入门

    Eclipse小技巧收录

    NULL 博文链接:https://liuzidong.iteye.com/blog/1320094

    eclipse小技巧

    主要对eclipse工具的一些小技巧介绍。

    Eclipse设置、调优、使用详解

    Eclipse设置,调优,使用详解,优化Eclipse开启时不卡,使用Eclipse软件时候的小技巧

    eclipse的各种颜色配置

    eclipse使用的一些小技巧,更换eclipse的背景,使得变得更加炫酷!

    编程入门_Eclipse教程

    1. 配置服务器Tomcat 2 1.1. 详细配置如下 2 2. Axis2与Eclipse的整合 7 2.1. Axis2下载,并部署axis2到Tomcat 7 ...5.4. 代码编写小技巧 37 5.5. Eclipse中恢复已删除文件 37 5.6. Eclipse中轻松使用Ant 40

    eclipse 的单步调试的技巧

    很实用的一些小技巧 帮助大家更方便快捷的使用eclipse工具

    Eclipse开发入门与项目实践 源代码

    1.2.5 Eclipse中文本编辑器编码的设置 10 第2章 Eclipse中JDT的开发 11 2.1 Java项目开发初体验 11 2.1.1 新建Java项目 12 2.1.2 导入外部Java类 16 案例2-1 随机抽奖程序的实现 18 2.1.3 打开及关闭...

    Eclipse 使用方法详解

    很不错的Word文件,介绍快捷键等使用小技巧

    Eclipse调试常用技巧

    记得刚刚毕业的时候,自己连断点也不会打,当时还在用JCreate ,就连毕业设计也是用 ...Bug ,才让我第一次认识了断点,也知道了代码修改完了可以进行热替换, 我这个中国教育的半牺牲品才算向美好生活迈进了一小步。

    Eclipse的Debug调试技巧大全(总结)

    主要介绍了Eclipse的Debug调试技巧大全(总结),小编觉得挺不错的,现在分享给大家,也给大家做个参考。一起跟随小编过来看看吧

    J2ME手机程序Eclipse开发基础 源码

    其中,帮助读者掌握手机游戏的开发技巧是本书的最终目的,为了方便读者理解这部分内容,作者选择了有代表性的赛车、贪吃蛇、三子棋、华容道、俄罗斯方块和使用MIDP 2.0开发的Fighter等手机游戏供读者研习。...

    Eclipse从入门到精通3

    “起步篇”介绍了Eclipse及相关插件的安装,还介绍了一些Eclipse开发环境的基本使用技巧;“SWT/JFace篇”详细介绍了SWT、JFace的使用;“插件开发篇”介绍了Eclipse插件开发的各个步骤,并给出了一个基于数据库...

    eclipse使用教程(新版)

    eclipse使用教程(新版)是本人从事开发多年积累的经验,文档中包括eclipse使用的注意事项,及一些不为人知的小技巧

    Eclipse中文教程

    Eclipse中文教程基础篇,详细介绍了Eclipse的使用方法以及一些小技巧,对于初学Java的朋友应该有帮助。

    Java开发工具Eclipse使用技巧全局搜索和更替

    主要介绍了Java开发工具Eclipse使用技巧全局搜索和更替,小编觉得还是挺不错的,具有一定借鉴价值,需要的朋友可以参考下

    android 开发小技巧

    android 开发工具, 小技巧等 1. UI 2. Resource 3. tools

Global site tag (gtag.js) - Google Analytics