Eclipse odd sex skills

Source: Internet
Author: User
Code:

1. Quick jump in source code:

Jump in eclipse is even better than. net is also convenient, the method is to press the ctrl key, then point the mouse to the variable name, method name, class name, there will be a link, click to jump to the definition.

2. Real-time syntax check:

If there is a small red square on the right side of the editing area, click it to jump to the wrong line; the small yellow square is a warning, you can ignore it, but it is best to check; if a function is not completed, you need to mention

What should I do when I wake up? Add a NOTE // todo, and a small blue box will appear on the right, prompting you that this is not complete yet. If no prompt is displayed on the right of a source code, it indicates that the file has

Finished.

3. automatically generate the getter/setter method:

You only need to declare the protected and private class member variables, find the class in package release E, right-click and choose "Source" "generate getters and

Setters ".

4. Change the class name/variable name:

If multiple modifications are involved, do not directly change them in the source code. In package release E, find the class or variable to be renamed, right-click and select "refactor" and "RENAME ",

Eclipse automatically searches for all relevant code and replaces it to ensure that no omission or correction is made.

5. Match try:

If the written code needs to throw or catch exceptions, you must first introduce the exception class in JBuilder, then add try before and after the written code, catch or add an exception after the method.

Throws is completely unnecessary in eclipse. You only need to write the code and press Ctrl + 1. A prompt is displayed, prompting you whether to throw or catch the exception.

Press enter.

6. Fast Writing of cyclic code:

When writing a loop or selecting a Condition Statement, first write the keywords such as if and while, and then press Alt +/To see what are the benefits. The following code is displayed. press tab

Jump in the box, and press OK to jump out of the code prompt.

Hotkeys
CTRL + D: delete a row

CTRL + M: Maximize or minimize the current window

CTRL + L: Jump to the specified row

CTRL + 1: code error correction prompt

Alt +/: Code help prompt

F11: run the last running program

CTRL + e will pop up the drop-down list to list the names of open files. You can use the up and down arrow keys to select the files to be viewed or type the file name, so that the corresponding files will be switched.

Alt + left and ALT + right. By using ALT + left and right arrow keys, you can switch between open files, just like when you use a browser.

CTRL + Shift + E. When you use Ctrl + Shift + e, a window will pop up listing the names of open files. You can use the up and down arrow keys to select the files to view.

CTRL + F6, a list will pop up to list the names of open files. Do not release the ctrl key, the list will always open. You can use the up and down arrow keys or Ctrl + Shift + F6 to select

View the file.

CTRL + Shift + R. The resource dialog box is displayed. type the file name to be viewed and press enter to switch to the corresponding file.

Alt + F, the use of historical records can also achieve the purpose of switching. When you use Alt + F to open the File menu, enter the value in the history.

Template: Alt +/

Modify: WINDOW> preference> workbench> Keys> command> Edit> content assist.
My habits: Shift + space (blank ).
Simple Description: When you edit the program code, the system. Out. println () is automatically displayed when you press the sysout + template startup key ();.
Set the template format: WINDOW> preference Settings> JAVA> editor> template.

Automatic Program code layout: Ctrl + Shift + F

Modify: WINDOW> Settings> workbench> buttons> program code> format.
Personal habits: Alt + Z.
Automatic typographical settings: WINDOW> preference Settings> JAVA> program code format creation program.
Style page-> hide the tab (rather than the space key). deselect this option and enter 4 as the number of spaces. In this way, Space 4 is used for automatic orchestration.

FAST Program Execution: Ctrl + F11

Personal habits: Alt + x
Modify: WINDOW> Settings> workbench> buttons> execute> Start the previous job.
Simple Description: During the first execution, it will ask you about the execution mode,
After setting, you only need to press this hot key to execute it quickly.
... I think it's really good ^ ___ ^

CATEGORY required for automatic import: Ctrl + Shift + O

Simple Description:
Suppose we do not import any category, when we enter in the program:
Bufferedreader Buf = new bufferedreader (New inputstreamreader (system. In ));
At this time, eclipse will warn that there is no import category. At this time, we only need to press Ctrl + Shift + O, and it will automatically help us import the category.

View the original code of the category: Ctrl + left mouse click

Simple Description: You can see the original code of the category you are using.
Annotate the selected text: Ctrl +/
Simple Description: debugging is very convenient.
Modify: WINDOW> Settings> workbench> buttons> program code> comments

Unannotate the selected text: Ctrl + easy description: Same as above.

Modify: WINDOW> Settings> workbench> buttons> program code> cancel Annotation

View switching: Ctrl + F8

Personal habits: Alt + S.
Modify: WINDOW> Settings> workbench> buttons> WINDOW> next view.
Simple Description: It is convenient for us to quickly switch between editing, debugging, and other visual scenes.
3.0 CTRL + ALT + H, you can see the method of calling the current member, and you can go up one by one.
CTRL + O can be quickly switched to other methods.

Secrets:

One set of eclipse can be switched at the same time. It can be displayed in English, traditional Chinese, and simplified Chinese:

1. First, install the Chinese culture package.
2. Add a parameter after the desktop shortcut,
English->-nl "zh_us"; traditional->-nl "zh_tw"; simplified->-nl "zh_cn ". (Other languages and so on)

Like in my 2.1.2 culture, I added the parameter-N1 "zh_us" to the eclipse shortcut on my desktop ".

"C: \ Program Files \ eclipse \ eclipse.exe"-n "zh_us"
The interface changes back to the English language.

Using eclipse, you cannot re-orchestrate the program code when editing documents in word:

Copy the entire code in the eclipse program editing area (CTRL + C) and paste (CTRL + V) directly to word or wordpad, you will find the format of the program code in word

Eclipse has the same settings, including fonts, indentation, and keyword colors. I have tried to copy and paste JBuilder, gel, netbeans..., only in the same scaling format, font

And the color will not change.

Plug-ins:

Plug-in installation: After downloading the package, decompress the package and you will find the features and plugins data clips. Copy or move all the content to features of Eclipse.

And plug-ins, and then restart eclipse.

Eclipse can build a GUI plug-in by dragging like jbuilderx:

1. jigloo SWT/swing GUI builder:
Http://cloudgarden.com/jigloo/index.html

Download this version: jigloo plugin for eclipse (using Java 1.4 or 1.5)
After installation, you can choose files> New> Other> GUI form to select the GUI type to be constructed.

2. Eclipse visual editor project:

Http://www.eclipse.org/vep/

Click Download page at the bottom, and then click latest release 0.5.0 to download.
In addition to ve-runtime-0.5.0.zip, the following two items are required:
EMF build 1.1.1: (build page) (download zip)
GEF build 2.1.2: (build page) (download zip)

I have only tested eclipse 2.1.2 and it is OK!

For users of version 3.0 or later, download:

Eclipse build i20040324:

1.0.0 stream integration build i20040325 Thu, 25 Mar 2004 -- (-0500)
1.0.0 stream nightly build n20040323a Tue, 23 Mar 2004 -- (-0500)
Note: Only build i20040324 can be used normally in versions above 3.0.
After the installation is successful, you can choose new> JAVA> AWT and swing to start designing the GUI type you want to build. The corresponding version of VE must be used properly. Otherwise

Successful, there will still be problems in use.

Use eclipse to develop JSP programs:

Plug-in name: lomboz (download page)
Http://forge.objectweb.org/project/showfiles.php? Group_id = 97

Please select the lombozdownload in the latest version. lomboz.212.p1.zip20.2.1.2, lomboz.3m7.zip indicates M7... and so on. Lomboz installation and setup:

Eclipse development JSP-teaching files

Conversion from Java to EXE:
 
Implementation Method: Eclipse and jsmooth (free of charge ).
1. Create a jar containing manifest by eclipse.
Production Teaching

2. Use jsmooth to package the prepared jar into exe.

Jsmooth download page:
Http://jsmooth.sourceforge.net/index.php

3. The created EXE file can be executed on windows with the JRE device.

Eclipse-Java editor best settings:

Editor font settings: workbench> font> JAVA editor font.
(Set Courier New-regular 10)

Editor settings: WINDOW> preference Settings> JAVA> Editor

Appearance: display the row number, square brackets that emphasize symmetric display, emphasize displaying the current row, display the print margin, select it, set the tab width to 4, and set the printing distance to 80.
Program code assistance: Use presets.
Syntax: You can set the display color of keywords, strings, and so on.
Note: use the default settings.
Input: select all fields.
Floating Description: by default.
Tutorial: select the default settings.
The effect of automatic typographical layout is best suited to Java design conventions:
Automatic typographical settings: WINDOW> preference Settings> JAVA> program code production format.
Line feed: all are not checked.
Branch: the maximum length of a row is 80.
Style: only insert a blank check box after forced transformation.
Number of inner spaces: Set to 4.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.