Common configurations in Eclipse

Source: Internet
Author: User
Tags lowercase zip

1. Set the encoding for all types of files when compiling and saving: window->preferences->general->content Types: Select file type to set its default encoding;

2. Set the font type of the code in the edit window, font size: window->preferences->general->appearance->colors and Fonts: Select the file type to set;

3. View and edit shortcut keys:window->preferences->general->keys;

4. Specify how the project's source code files and class files are stored: Window->preferences->java->build path (typically selected folders);

5. Create the user's own class library: Window->preferences->java->build path->user libraries;

6. Set the template for editing code: Window->preferences->java->code Style->code Templates;

7. Set the version compatibility of compiled source code:window->preferences->java->compiler;

8. Set up the template for the Code AutoComplete feature:window->preferences->java->editor->templates;

9. Specify multiple JRE (actually specifying the root directory of the JDK): window->preferences->java->installed JREs;

10. Set up the application server used by the Web application: Specify multiple JRE (actually specify JDK): Window->preferences->myeclipse->application Servers;

11. Set up a template for the JSP file (for example, the default encoding of the file): Window->preferences->myeclipse->files and editors->jsp;

12. Configure the jar packages used in the Java EE Engineering Framework (e.g.: hibernate,spring,struts, etc.): Window->preferences->myeclipse->project Capabilities: can be configured for the jar packages used by various frameworks under it;

Second, Eclipse plug-in installation:

1. Internationalization plug-in (resourcebundleeditor): Download Resourcebundleeditor_v0.7.7.zip Online (the version number may differ), unzip it, and then copy the folder in the plugins directory to " MyEclipse Install directory \eclipse\plugins "directory, restart the myeclipse. When editing a resource file, select the resource file you want to edit, and then right-click and choose the Resource File Editor option under the Open with menu to edit the file.

2. Installation of Chinese Language pack: Create language directory under Eclipse, extract Nlpack1-eclipse-sdk-3.2.1-win32.zip to language directory, note directory structure, language should have subdirectories Eclip SE, you will not see the features directory and the plugins directory until you enter the Eclipse subdirectory. Establish the links directory under the Eclipse installation directory to hold the configuration file for the specified plug-in path. Enter the links directory to create a new text file named Language.ini, edit the file to add a "full path to the Path=language folder".

Iii. Eclipse Usage Tips:

1. Cancellation of automatic validation:validation There is a heap, what XML, JSP, JSF, JS and so on, we do not have to go to the automatic check, but only when the need to manually check, the speed of upgrading several grades immediately. Cancellation method:windows-->perferences-->myeclipse-->validation; except manual The check boxes below are all selected, all others are not selected. Manual verification Method: On the file to be verified, right-click-->myeclipse-->run validation;

2. Debug technology: When you set breakpoints in a line of code that requires debugging, Eclipse automatically enters the debug perspective after you run the program in debug mode. Debug shortcut keys are as follows:

F5: One-step debugging, in the execution of code if you encounter a method call, will go inside the method to view;

F6: One-step debugging, do not enter the method of internal view when executing code;

F8: Executes the code to the next breakpoint and, if there is no next breakpoint, executes to the end of the program;

Iv. shortcut keys for Eclipse:

Ctrl+1 Quick Fix (the most classic shortcuts, you don't have to say more)

Ctrl+d: Delete When moving forward

Ctrl+alt+↓ Copy the current row to the next row (replication incremented)

Ctrl+alt+↑ Copy the current line to the previous row (replication incremented)

Alt+↓ the current line and the next line of interaction (especially useful, can be omitted first cut, then pasted)

Alt+↑ the current line and the upper row interaction position (IBID.)

alt+← the previous edited page

alt+→ next Edit page (of course, for the above article)

Alt+enter displays the properties of the currently selected resource (project, or file or file)

Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)

Shift+ctrl+enter Insert blank line in current line (principle above)

Ctrl+q positioning to the last edited place

Ctrl+l positioning in a row (for people with programs over 100 have the gospel)

Ctrl+m maximize the current edit or view (and vice versa)

ctrl+/comment on the current line, and then uncomment it

Ctrl+o Quick Display OutLine

Ctrl+t quickly displays the inheritance structure of the current class

Ctrl+w Closing the current editer

Ctrl+k the selected word quickly navigates to the next

Ctrl+e quick display of the current Editer drop-down list (in bold if the current page does not appear)

ctrl+/(numpad) collapses all code in the current class

Ctrl+x (keypad) expands all code in the current class

Ctrl+space Code Helper to complete the insertion of some code (but the general and IME conflict, you can modify the input method hotkey, you can also take up alt+/to replace)

Ctrl+shift+e Display manager that manages all of the currently open view (you can choose to close, activate, and so on)

Ctrl+j forward Incremental lookup (after pressing CTRL+J, each letter editor you enter provides a quick match to navigate to a word, if not, it is not found in the Stutes line, check a word, especially useful, this function idea two years ago)

CTRL+SHIFT+J Reverse incremental lookup (same as above, except forward)

Ctrl+shift+f4 Close all open editer

Ctrl+shift+x the text that is currently selected is all stale lowercase

Ctrl+shift+y turns the currently selected text to lowercase

Ctrl+shift+f formatting of the current code

Ctrl+shift+p position to the match (for example {}) (after locating from the front, the cursor is in the match, back to front, or vice versa)

The following shortcut keys are commonly used in refactoring, I like and commonly used to tidy up (note: General refactoring of the shortcut keys are alt+shift beginning of the)

Alt+shift+r rename (is my own favorite, especially the variables and classes of rename, than the manual method can save a lot of labor)

Alt+shift+m Extraction Method (This is one of the most common methods of refactoring, especially useful for a whole bunch of mud codes)

Alt+shift+c Modify the function structure (more practical, there are n functions called this method, modified once done)

Alt+shift+l extract Local variables (you can directly extract some magical numbers and strings into a variable, especially when multiple calls are made)

Alt+shift+f change the local variable in class to a field variable (more useful function)

Alt+shift+i Merge variables (this may be a bit inappropriate inline)

ALT+SHIFT+V moving functions and variables (not commonly used)

Alt+shift+z reconstruction of Regret medicine (Undo)

Edit

scope function Shortcut keys

Global Find and replace Ctrl+f

Text Editor Find previous Ctrl+shift+k

Text Editor Find Next

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.