Tips for using eclipse)

Source: Internet
Author: User
Preface:
Originally, I used jbuilderx as the main IDE, but after using eclipse
I found that... eclipse is also so easy to use... gradually fell in love with it ......
Advantages of Eclipse: free of charge, program code typographical function, cultural package, and incrementing
It has many powerful plug-ins and supports multiple operating systems (windows,
Linux, Solaris, Mac OSX)... and so on.

The purpose of this discussion string is to integrate some of Eclipse's usage tips
In combination... you are welcome to continue adding... due to the large number of eclipse versions.
, We hope that the advanced users can explain your version by the way ~

Eclipse Website: http://www.eclipse.org /;
Chinese culture teaching in Eclipse: Reference to articles in javaworld

(Version used: Eclipse 2.1.2 release + 文)

Hotkey:
Template: Alt +/
Modify: WINDOW> Settings> workbench> buttons> Edit> content assist.
My habits: Shift + space (blank ).
Simple Description: When editing the program code, press the sysout + template startup key.
System. Out. println (); is automatically displayed ();.
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 inserted tab (rather than the space key). Uncheck this option.
Enter 4 as the number of spaces below. In this way, Space 4 is used as the contraction during 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.
<Alt + z (finished layout), ATL + x (executed)>...

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
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

Visual switch: 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.

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 Chinese->-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)
On word or Wordpad, you will find the program code format in word
The settings are exactly the same, including font, thumbnail, and keyword color. I have tried JBuilder
, Gel, netbeans... when using copy and paste, only the same scaling format, Font, face
Color will not change.

Plug-ins:
Plug-in installation: After downloading the package, decompress it and you will find features,
The plugins data folder copies or moves everything in it 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)

3.0 M8 version, please download:
EMF build i200403250631
GEF build i20040330
VE-runtime-1.0M1

After the installation is successful, you can start the uidesign by file-> New-> visual class.
After the installation is successful, you can choose from new-> JAVA-> AWT and swing
The GUI type to be constructed is designed. Ve must work with the corresponding
Version.
Yes.

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 for your desired region. lomboz.212.p1.zip indicates version 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: displays the row number, square brackets that emphasize symmetric display, and displays the current row,
Display the print margin, select it, set the tab width to 4, and set the print padding 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.

Eclipse teaching file:
Eclipse 3.0 series hotkeys-by sungo )~ New ~
Window + GCC + CDT use eclipse to develop C and C ++ (by sungo )~ New ~

Others:
Expand eclipse Java development tools (Chinese)
Use eclipse to develop J2EE applications (Chinese)
Use the eclipse platform for debugging (Chinese)
XML development with eclipse (Chinese)
Develop Eclipse plug-ins (Chinese)
International your Eclipse plug-in (English)
Add the swing editor to eclipse)
How to test that your Eclipse plug-in meets international market requirements)

Eclipse websites:
Http://eclipse-plugins.2y.net/eclipse/index.jsp;
Http://www.eclipseplugincentral.com /;
Eclipse-related teaching [Simplified]

I'm tired of writing a program. Do you want to have a rest ?? Play game is
A good choice. The following describes how to use eclipse to play game plug-in.

Additional plug-ins:
Eclipse-games:
Http://eclipse-games.sourceforge.net /;
Version: latest release 3.0.1 (Release Notes) sat, 3 Jan 2004

After the plug-in is installed, restart eclipse.
Window> Custom View> Other> check game actions.
Shut down eclipse and restart it to start playing grub.
(There are four types: mine I, mine II, snake and warehouse .)

(Eclipse 2.1.2 + playing game in culture-warehouse fan)

Supplement: (use assertion mechanism in eclipse)
Eclipse version: 2.1.3 release.

The newly added assertion mechanism of JDK (Key Words: assert), due to the jdk1.4 Compiler
The default value is 1.3 compatible, so the-source 1.4 parameter must be added during compilation to use assert.

C:/> javac-source 1.4 XXX. Java
The-ea or-enableassertions parameter must be added during execution.

C:/> JAVA-ea xxx

To use the assertion mechanism in eclipse, make the following settings:
Settings 1: (compilation settings)
Windows-> preferance-> JAVA-> compiler-> compliance and classfiles
Page. Change the. JDK compliance level-> compiler compliance level to 1.4.

Settings 2: (execute settings)
Run-> (x) = arguments page, add the-da parameter to VM arguments, and press
Run button to view the execution result after the assertion is started.

(Eclipse 2.1.3 release + assertion test)
<Assert: false, so assertionerror is displayed.>

In the new version (M8 +), you can set VM arguments in eclipse.
Another solution is to add VM arguments at eclipse startup (same as increasing the default memory size of eclipse)
In this way, you do not need to set up VM arguments every time you run

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.