哈哈,使用eclipse也有一段时间了,从当初的懵懂无知到现在的小有了解,
我准备写一篇eclipse新手使用教程,给刚接触这个软件的新手一些帮助。
1. Create a Project
- Build a Java project (named after has been finished and direct point next point finsh).
- Packages, classes' interfaces, and so created are as shown below, their process is the same.
2. Use the shortcut keys
Ctrl + shift + L: Displays all shortcuts
Commonly used keyboard shortcuts:
-
ctrl + D: Delete this line
-
alt + /: prompt (for example, you want to enter the main function, can be a very long main, this time can be automatically generated by the shortcut keys that moment)
在这儿说一件啼笑皆非的事情: 大家都知道System.out.println();这个代码 吧。 我一开始认为我输出println它就会有提示,但是事实上并没有。 我就纳闷了,这关键字就是println啊,怎么就没有呢,后来,才发现只要输出sys它就有提示了。
-
ctrl + a: Select
-
ctrl + c: Copy
-
ctrl + v: Paste
enmm,这三个可以凑成一套剽窃大法。哦吼吼。
-
ctrl + shift + o: automatically imported package
-
ctrl + F11: run
此处必须要说明以下了,作为一个新新新手,我曾经发出疑惑,为什么我这么按不行, 后来由于电脑不一样,有些电脑 F11=Fn+F11 .
-
shift + 0: restore the cursor.
我解释一下什么叫做光标恢复: 有时候会发现,光标突然变成黑色的小方块而不是一条竖线了, 这时候写代码会很麻烦,容易吞代码,把它恢复成原本样子,这个就叫做光标恢复。
3. Project Import Export
Import:
- Click the file
- Click to import
- 选择Existing Project into Workspace
- Click to select the project path you want to import selected, click finish
Export:
- Select the items you want to export
- Select export
- Select the Archive File General in
- Click to select the project path you want to import selected, click finish
4.debug mode on and off
- Establish endpoint: Double-click breakpoints can be set up in the red circle
- Enter debug mode operation
- Enter debug interface (Click the red circle)
- ctrl + F11 to jump into the next breakpoint
- Back before the screen just press circle at