- 浏览: 263340 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
cuqing:
整体思路还是正确的,请问1F何处有问题?我稍微看了下,没发现什 ...
JS的splice()方法和slice()方法 -
zhao_tuo:
总结的不错
[转] Java注释@interface的用法 -
cheychey:
好好看看你的代码的真确性,再贴出来。。
JS的splice()方法和slice()方法 -
cuqing:
--查询预受理申请审计表中按照业务类别分类的最新创建(最近修改 ...
Oracle分组查询后,获取最大值的记录 -
cuqing:
这种方式足够既能直接分组,又能筛选分组中的最大Id,足够用了。 ...
Oracle分组查询后,获取最大值的记录
CTRL + D
Delete row. Try it! You no more need to grab the mouse and select the line, no more Home, Shift + End, Delete. Quick and clean.
ALT + Up/Down Arrow
Move the row (or the entire selection) up or down. Very useful when rearranging code. You can even select more rows and move them all. Notice, that it will be always correctly indented.
ALT + Left/Right Arrow
Move to the last location you edited. Imagine you just created a class Foo, and now you are working on a class Boo. Now, if you need to look at the Foo class, just press Alt+Left Arrow. Alt+Right Arrow brings you back to Boo.
CTRL+SHIFT+O
Organize imports. What happens when you first use a class you have not yet imported? You will see an error. But when you press this magical combination, all your missing classes will be imported, and the unused imports will vanish.
CTRL+1
Probably the most useful one. It activates the quick fix. Imagine you create a class, which implements some interface. You will get an error, because the inherited methods are not yet implemented. While you are on line where the error occurs, press this combination to activate the quick fix. Now, select the "Add unimplemented methods" option. You can use the quick fix at every error you ever receive.
Quick fix comes handy in other situations too. My favorite is the "Split variable declaration". Sometimes I need to broaden the scope of a variable. I activate the quick fix, split declaration, and use alt + arrow to put it where it belongs. You can find even more usages: Convert local variable to field, rename in file, Inline local variable..
You could use the "Split variable declaration" on the bar variable, and then move it with Alt+Arrows above the try block..
Or you could use the "Add unimplemented methods" fix here.
The best thing you can do if you see an error is to use the quick fix.
CTRL+SHIFT+T
Open Type. Imagine, that you need to have a look at the Foo class. But, where is the Foo class? Is it in the Boo project and in the foo.bar package? Or somewhere else? With this shortcut, you don't need to know. Just press it, type Foo and you are in.
CTRL+E
Shows you a list of all open editors.
CTRL+F6
Use to move between open editors. This is an slower alternative to Ctrl + E. Comes handy in a situation when you want to periodically switch between two editors, something, what is nearly impossible with Ctrl+E as it sorts entries quite randomly. Or you might just use Alt+Arrows..
CTRL+F7
Move between views. When in editor, press Ctrl+F7 to switch to the Package Explorer, or hold Ctrl and press F7 multiple times to switch to other views.
CTRL+F8
Move between perspectives. The same as previous.
CTRL + F11
Runs the application. What gets launched depends on your settings. It will either launch the last launched class (my preffered way) or it will launch currently selected resource (the default way). If you want to change its behavior read the previous post.
CTL + N
Open new type wizard. This is not very quick because you have to select the wizard type (weather you want to create new class, jsp, xml or something else) in the next step. Much faster way would be if you could just hit the shortcut and invoke the particular wizard. It is possible, just keep reading..
CTRL + M
Maximize or umaximize current tab.
CTRL + I
Corrects indentation.
CTRL + SHIFT + F
Formats code. You can make a beautiful looking code out of a mess with this. It requires a bit of setup, but it is well worth it. You can find its settings under Window->Preferences->Java->Code style->Formatter
CTRL + J
Incremental search. Similar to the search in firefox. It shows you results as you type. Don't be surprised, if you hit this combination, nothing happens - at the first glance. Just start typing and eclipse will move your cursor to the first ocurence.
CTRL + SHIFT + L
Shows you a list of your currently defined shortcut keys.
I don't like your shortcuts
Such is life nowadays. Remember, you can always change those bindings to match your preferences. Open Windows->Preferences->General->Keys. Now you can use the filter to find your shortcut and change its binding.
The real fun begins when you cannot find the command you are looking for. The key here, is to have the "Include unbounds commands" checkbox checked. It will show you all commands, even those, which have no keys bound.
While you are here, I recommend to add the following bindings:
CTRL+SHIFT+G
Bind this to "Generate getters and setters". This is a "must have".
ALT+C
Bind this to SVN/CVS "Commit".
ALT+U
Bind this to SVN/CVS "Update".
Now, type "new" (without quotes) in the filter text. You should see a list of all new type wizards. Choose the most frequently used and assign them a shortcut. For example, the most used wizard for me is the new class wizard. Thus I assigned it the CTRL+SHIFT+N keys.
Let me demonstrate a quick way to create new class now.
Hit CTRL + SHIFT + N (or the combination you assigned in the previous step). This should bring up new class wizard. Type in the name and press ALT+E. You can now select a class which will be a superclass for the newly created class. Hit ALT+A and select all implemented interfaces . Now hit ALT+F and your class will be generated. Eclipse will also provide the default implementation for all abstract and interface methods you inherited.
Did you notice the weird underscores everywhere in the dialog? They give you a hint about the shortcut key. Hit ALT and the underlined letter to press the button, check the checkbox or get focus for a textfield.
Did you notice the underscores?
I think that using shortcut keys is the fastest way to productivity and if not, then at least your wrists will say you a silent thanks. Now, don't wait, go on and assign keys to the features you use most.
One final tip from Andriy:
The problem is that there are so many keyboard shortcuts. I used to keep a printout with all the shortcuts I wanted to use. Finally I wrote an Eclipse plugin MouseFeed, which reminds the keyboard shortcuts for the actions called with mouse. You can even tell it to enforce some shortcuts - the action will run only if called with a keyboard shortcut.
So if you are struggling with yourself, if you want to use shortcuts, but always subconsciously touch the mouse, install the plugin and let it enforce the shortcuts - the mouse will be useless and you will be forced to use keyboard.
What shortcuts do you use?
CTRL+ALT+H Open Call Heirarchy. Find out where that method is used.
F4 Open Type Heirarchy. See the subclasses and/or superclasses. This one can be tricky sometimes. If there is a class under the cursor it will open that class's heirarchy, if not it will use the class that contains the cursor (including inner classes).
F3 Open Declaration. Jump to the declaration of the variable, method or class. It will try to find the most specific declaration it can for methods, but depending on your code you might end up in an Interface which is probably not what you want. Then just press F4 to get the type heirarchy and find the implementation you are looking for.
ALT+SHIFT+R Refactor->Rename. Works in the editor and in the package explorer. If you haven't learned the power of refactoring, do so now. Think of this one as a super-smart Find-Replace. The new 3.3 feature of inline rename is awesome.
ALT+SHIFT+V Refactor->Move. Again, works in both the edtor and package explorer. Move the method or field to another class.
ALT+SHIFT+M Extract to method. Break up that monolithic code, takes the selection and trys to make it into a method. Will optionally find duplicate code blocks and use the new method there as well. It might take a few trys to get this to work the way you want. Just try it, rearrange thee code a little and try again.
Europa version CTRL + 3
It is an entry point for pratically everything inside Eclipse, fantstic in my opinion and very useful.
Go to line number N in the source file: Ctrl + L, enter line number
============================分割线===========================
Eclipse常用设置
设置工作空间的项目编码, 防止出现乱码
Window - Preferences - General - Workspace
将"Text file encoding"选为"Other" - "UTF-8"
改变现有项目的编码的步骤: 右击项目属性, 选择"Text file encoding"的编码
设置其它文件的编码
Window -> Preferences -> General -> Content Types
将需要设置的文件设置编码, 最好统一设为UTF-8
设置后, 如Javascript文件可正常显示中文
设置创建JSP页面时,将JSP的默认编码设为UTF-8
Window -> Preferences -> MyEclipse -> Files and Editors -> JSP
将"Encoding"选为"ISO10646/Unicode(UTF-8)
去掉格式化JSP时页面中的空行
Window -> Preferences -> MyEclipse -> HTML -> HTML Source
勾选"Clear all blank lines"
增强Eclipse的自动代码提示功能
默认下, 只有按"."或"Alt + /"才出现代码提示功能, 不够强大, 作小小设置, 可将代码提示功能像VS的一样方便
1. Window -> Preferences -> Java -> Editor -> Content Assist
2. 将"Auto Activation triggers for java"设置为".abc"(默认是"."), 点"Apply"应用
3. 导出目前的Eclipse配置文件: File -> Export -> General -> Perferences, 选择保存路径, 保存得到*.epf文件
4. 用文本编辑器打开刚才保存的*.epf文件, 搜索".abc", 将".abc"部分改为
".abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(," (以上为自动提示的触发字符,
根据个人习惯设置), 保存此配置文件(个人觉得不太好用,容易出错)
5. 导入此配置文件: File -> import -> General -> Perferences, 导入修改后的配置文件.
第一个选项为反应时间,可设为100左右(默认200)
高亮类中同一引用的使用位置
Window -> Perferences -> General - > Editors -> TextEditors -> Annotations
选择"Occurrences",勾引"Text as" -> "Highlighted"(块高亮)或"Squiggles"(虚线)
Link with Editor
打开类后, 自动在包管理器这里显示类的位置
取消Myeclipse的自动文件验证(卡傻的原因)
Windows –> Perferences –>Myeclipse –> Validation
保留manual(手动)部分,build下只留"classpath dependency Validator"
手动验证: 右键文件 -> Myeclipse -> Run Validation
取消拼写错误检查
我爱故意写错单词, 不需要系统帮我检查
Windows –> perferences –> General –> Editors-> Text Editors -> Spelling
去掉"Enable spell checking"勾选
关闭不需要的启动项
MyEclipse:
Windows –> Perferences–> General–> Startup and Shutdown
我只保留了
顺序下来:
1, Tomcat6: 必备的...
2, 内存监视器: 可以查看Myeclipse的使用内存, 我喜欢这工具(在菜单Myeclipse - Utilities - Show Heap Status打开)
3, JSP Debug工具, 其实我也没用过, 怕有一天用到...
4, 文件创建向导(个人经常用到)
5, 向后兼容的意思吧, 怕有一天会用到, 但其实很少用, 可去掉
6, 透视图, 应该可以去掉吧...
其实就只用选择Tomcat6
关闭自动更新
1, Eclipse:
Windows –> Perferences–> Install/Update -> Automatic Updates
不勾选"Automatically find new updates and notify me"
2, Myeclipse:
1)Windows –> Perferences–> MyEclipse... -> Community Essentials
&nb sp; 不勾选"Search for new features at startup"
2)Windows –> Perferences–> MyEclipse... -> Maven4MyEclipse
不勾选"Download repository index updates on startup"
原文:http://yafei.iteye.com/blog/1218507
发表评论
-
[转] Apache SOAP介绍
2011-08-24 22:38 4224最近在项目中用到了APACHE SOAP的客户端调用。 ... -
[转] Java注释@interface的用法
2011-05-16 17:35 25984@interface是用来自定义JAVA Annot ... -
Object转BigDecimal
2011-01-03 12:43 20020项目中遇到类似问题,记下来先: import j ... -
http响应代码
2010-12-19 21:54 1026来源于网络 写 ... -
[转]通过jdbc-odbc桥来访问excel文件
2010-12-19 21:51 1383记录,备用 通过jdbc-odbc桥来访问excel文 ... -
application/xxxx等字符编码的解释说明、请缓存操作以及oracle decode函数示例
2010-11-21 21:33 10061. 关于application/x-www-f ... -
非安装版Tomcat指向JDK目录
2010-09-25 12:16 14811,修改bin文件夹下面的catalina.bat文件, ... -
[转]解决Tomcat Error listenerStart 问题
2010-07-11 21:53 2130原文地址:http://hi.baidu.com/zh ... -
tomcat报错 java.io.EOFException
2010-04-05 23:26 1155今天在修改了一个接口实现方法后保存后,重启tomcat报错: ... -
[转]JTable的自动换行处理
2010-03-31 23:17 4264下面是一个简单示例: 1.创建一个简单的JTabl ...
相关推荐
一、Eclipse常用快捷键 1. **代码编辑快捷键** - `Ctrl + Shift + T`:打开类型(类)搜索,快速定位到所需类。 - `Ctrl + Shift + R`:打开资源搜索,查找项目中的文件。 - `Ctrl + Shift + O`:自动导入所需的...
### Eclipse使用快捷键整理 Eclipse作为一款广泛使用的开源集成开发环境(IDE),为开发者提供了丰富的功能和便捷的操作方式。为了提高工作效率,掌握Eclipse中的快捷键是非常必要的。本文将根据给定的信息,详细...
以上是Eclipse与IntelliJ IDEA在常用快捷键方面的详细对比。两者在快捷键设计上有不少相似之处,但也存在一些差异。对于开发者而言,熟悉这些快捷键可以帮助提高编程效率,减少不必要的操作步骤。希望本文能够帮助你...
以下是一些Eclipse中常用的快捷键及其作用: 1. **Ctrl+1**:快速修复。这是Eclipse中最经典的快捷键之一,当遇到错误或警告时,它能提供解决方案建议,帮助快速修复问题。 2. **Ctrl+D**:删除当前行。这可以快速...
### Eclipse常用快捷键大全 Eclipse作为一款广泛使用的开源集成开发环境(IDE),因其高度可扩展性和丰富的功能而深受开发者喜爱。为了提高编程效率、优化工作流程,掌握一系列高效的快捷键变得尤为重要。以下是对...
以下是从“Eclipse实用快捷键大全.txt”文件中提取并整理的关键知识点,涵盖文件操作、编辑器功能、代码导航、重构与调试等方面。 #### 文件操作 - **Ctrl+C**: 复制选定的文本或元素。 - **Ctrl+V**: 粘贴已复制的...
以下是一些常用的Eclipse快捷键及其详细解释: 1. **代码编辑** - `Ctrl + Space`:自动补全代码,无论是类名、方法名还是变量名,都能快速输入。 - `Alt + Shift + R`:重命名,用于快速修改选定的变量或方法名...
对eclipse常用快捷键进行了整理,满足日常开发使用。使用eclipse版本为4.2.
### Eclipse 常用快捷键详解 #### 一、提高编码效率的基础快捷键 **1. ALT+/(Content Assist)** - **功能介绍**:自动完成代码补全。 - **应用场景**:当输入代码时,按下此组合键,Eclipse会提供当前上下文中...
以下是一些在Eclipse中常用的快捷键及其详细解释: 1. **Alt+左/右箭头**:在编辑窗口之间切换标签,这有助于在多个代码文件之间快速导航。 2. **Alt+上下箭头**:自动选择当前行,并上下移动它,这对于调整代码...
本文将详细介绍一些常用的EclipsePHP快捷键,帮助开发者更加高效地编写和管理代码。 1. **Ctrl+1**:快速修复,当遇到语法错误或警告时,此快捷键会提供解决方案建议。 2. **Ctrl+D**:删除当前行,简化了删除操作...
以下是一些Eclipse中常用的快捷键及其用途: 1. **【ALT+/】**:内容辅助。当你记不清类、方法或属性名称时,这个快捷键会提供自动补全建议,帮助你快速输入正确的代码。 2. **【Ctrl+O】**:显示大纲。这个快捷键...
### Android开发中常用的Eclipse快捷键详细整理 在Android开发过程中,使用Eclipse作为集成开发环境(IDE)是非常常见的选择。为了提高开发效率,熟练掌握Eclipse中的快捷键是必不可少的技能之一。本文将详细介绍一...
#### 二、Eclipse常用快捷键详解 ##### 1. 代码编写与编辑 - **Alt+/**:代码提示。在输入代码时,按此组合键可以弹出代码提示列表,方便快速完成代码补全。 - **Ctrl+/**:注释/取消注释。用于快速注释或取消注释...
### Eclipse 常用快捷键详解 #### 编辑与辅助快捷键 1. **【ALT+/】**:这是Eclipse中的智能提示功能,能够帮助开发者自动补全类、方法和属性名称。当输入类名、方法名或者属性名的一部分时,按下此快捷键即可自动...
### Eclipse Debug调试的快捷键和常用快捷键 在软件开发过程中,使用Eclipse进行调试是一项非常重要的技能。本文将详细介绍Eclipse中与Debug相关的快捷键以及其他常用的快捷键,帮助开发者提高工作效率。 #### 一...
### Eclipse的常用快捷键:程序员必备技能 Eclipse是一款广泛使用的开源集成开发环境(IDE),尤其受到Java开发者们的青睐。掌握其快捷键不仅能显著提升编程效率,还能加深对Eclipse功能的理解与应用。以下是根据...
在本文档中,我们将从 Eclipse 软件中整理出标准的快捷键,未包括 Emacs 快捷键。 编辑作用域功能快捷键 在 Eclipse 中,编辑作用域功能快捷键是最常用的快捷键之一。以下是一些常用的编辑快捷键: * 全局查找并...
以下是 Eclipse 的一些常用快捷键: 代码编辑 * Ctrl + 1:快速修复 * Ctrl + D:删除当前行 * Ctrl + Alt + ↓:复制当前行到下一行 * Ctrl + Alt + ↑:复制当前行到上一行 * Alt + ↓:当前行和下面一行交互...
【尚硅谷】_宋红康_Eclipse快捷键整理 Eclipse是一款广泛使用的Java集成开发环境(IDE),它提供了丰富的功能和高效的工作流程。在编程过程中,熟练掌握Eclipse的快捷键能够极大地提升开发效率,减少鼠标操作,使...