Summary of shortcuts in java

Source: Internet
Author: User

Add necessary comments to make it a good habit for a front-end with a sense of responsibility and a moral model,

This greatly improves the maintainability and readability of the Code.

Java code annotation shortcut: ctrl + shift +/First familiarize yourself with the syntax of html, css, and js Annotations: 1. HTML annotation Syntax:

<! -- Comment content --> 2. css comment syntax

/* Comment */
/* ---------- Text style starts ---------- */3. javaScript comments

// Comment content
/* Comment content */The next step is to summarize the positions used by the annotations in these codes. (May vary according to my habits) 1. Location of html annotation: 1) It is generally used after the end of some major node labels, such:

<Div class = "wrap"> <div class = "main">... </div> <! -- Main end --> <div> <! -- Wrap end --> 2) After the end of some cycles, for example:

<Ul class = "list"> <li> 111111 </li> <li> 222222 </li> <li> 333333 </li> </ul> <! -- List loop -->

2. css comments are generally used on top of a module style to describe which module the style applies to, for example:

/* General-Comment */. comment {...} /* album */. photo {...} /* share */. share {...} /* vote */. vote {...} 3. javascript comments are generally added to a function segment, indicating the function, author, author information, and modification time of the function.

// ================================================ ============================/// Truncation character // steepvi // rtx: * ***** // 2010-10-14 // ================================ ================================== last, note is also a character, which also produces traffic. Therefore, when the page is published to the official address, it is best to add an optimization process. Ctrl +/
Ctrl + shift + c
The following is a list of all shortcut keys in myeclipse: Ctrl + 1 quick fix (the most classic shortcut key, you don't have to say much) Ctrl + D: delete the current row Ctrl + Alt + ↓ copy the current row to the next row (copy added) Ctrl + Alt + ↓ copy the current row to the previous row (copy added) alt + ↓ interaction position between the current row and the following row (especially practical, you can save cutting and pasting) Alt + ↓ interaction position between the current row and the preceding row (same as above) alt + ↓ previous edited page Alt + → next edited page (of course for the above) Alt + Enter displays the current selected resource (project, or file) the Shift + Enter attribute of is inserted with an empty row in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row) shift + Ctrl + Enter insert blank lines in the current line (same principle) ctrl + Q locate the last edit location Ctrl + L locate in a line (for more than 100 of the program, there will be a good news) ctrl + M maximize the current Edit or View (then press Ctrl +/) Ctrl +/comment on the current row, press Ctrl + O to quickly display OutLine Ctrl + T to quickly display the inheritance structure of the current class Ctrl + W to close the current Editer Ctrl + K to quickly locate the Next Ctrl + e. Quickly display the drop-down list of the current Editer (if the current page is not displayed in) ctrl +/(keypad) collapse all codes in the current class Ctrl + × (keypad) Expand All codes in the current class Ctrl + Space

The Code assistant inserts some code (but it usually conflicts with the input method. You can modify the Input key, or replace it with Alt +) ctrl + Shift + E display the manager that manages all Opened Views (you can choose to close or activate) Ctrl + J forward incremental search (press Ctrl + J, each letter editor you enter provides a quick match to locate a word. If not, it is not found in stutes line. It is particularly useful when you query a word, this Idea feature was available two years ago.) Ctrl + Shift + J reverse incremental Lookup (same as the previous one, but only from the back to the front) ctrl + Shift + F4 close all open Editer Ctrl + Shift + X change all selected text to lowercase Ctrl + Shift + Y change all selected text to lowercase Ctrl + Shift + F format the current Code Ctrl + Shift + P to locate the matching character (for example {}) (When positioning the back from the front, the cursor must be inside the match character, followed by the front, and vice versa)

The following shortcut keys are commonly used in refactoring. I like them and want to sort them out frequently (note: the keys for refactoring generally start with Alt + Shift) alt + Shift + R Rename (one of my favorite ones, especially the Rename of variables and classes, which saves a lot of labor compared with manual methods) alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially useful for a lot of muddy code) Alt + Shift + C modify the function structure (more practical, N functions call this method and modify it once.) Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, in particular, during multiple calls) Alt + Shift + F change the local variable in the Class to the field variable (more practical) alt + Shift + I merge variables (this may be a bit inappropriate) Alt + Shift + V moving functions and variables (not commonly used) Alt + Shift + Z reconstruction regret (Undo)

Edit scope function shortcut key global search and replace Ctrl + F text editor find the previous Ctrl + Shift + K text editor find the Next Ctrl + K global undo Ctrl + Z global copy Ctrl + C global recovery select Alt + Shift + ← global cut Ctrl + X global quick correction Ctrl1 + 1 Global content assist Alt +/globally select Ctrl + A globally Delete global context information Alt +? Alt + Shift +? Ctrl + Shift + Space Java editor display tooltip description F2 Java editor select encapsulation element Alt + Shift + export Java editor select previous element Alt + Shift + export Java editor select next element Alt + shift + → text editor incremental search Ctrl + J text editor incremental reverse search Ctrl + Shift + J global paste Ctrl + V Global redo Ctrl + Y
The shortcut key for viewing the scope function is Ctrl + = Ctrl +-

Window scope function shortcut key global activation editor F12 global switch editor Ctrl + Shift + W global Previous editor Ctrl + Shift + F6 global previous view Ctrl + Shift + F7 global previous perspective Ctrl + shift + F8 Global next editor Ctrl + F6 Global next view Ctrl + F7 Global next perspective Ctrl + F8 text editor display ruler context menu Ctrl + W global display View menu Ctrl + F10 global Display System menu Alt +-

Navigation scope function shortcut key Java editor open structure Ctrl + F3 global open type Ctrl + Shift + T global open type hierarchy F4 global open declaration F3 global open external javadoc Shift + F2 global open resource Ctrl + Shift + R global back history Alt + ↓ global forward history Alt + → Global last Ctrl +, ctrl +. java editor display outline Ctrl + O global open type Ctrl + Shift + H Global go matching brackets Ctrl + Shift + P global go to previous edit location Ctrl + Q Java Editor go to the previous Member Ctrl + Shift + ← Java editor and go to the next member Ctrl + Shift + ↓ text editor and go to the row Ctrl + L

The search scope function shortcut key appears globally in the file Ctrl + Shift + U the global Open Search dialog box Ctrl + H the Declaration Ctrl + G Reference Ctrl + Shift + G in the global Workspace
Text editing scope function shortcut key text editor rewrite switch Insert text editor roll row Ctrl + ←

File Scope function shortcut key global save Ctrl + X Ctrl + S global print Ctrl + P global close Ctrl + F4 global save Ctrl + Shift + S global all close Ctrl + Shift + F4 global attribute alt + Enter create Ctrl + N globally
Project Scope function shortcut key global build Ctrl + B

Source code scope function shortcut key Java editor formatting Ctrl + Shift + F Java editor uncomment Ctrl + \ Java editor comment Ctrl +/Java editor add import Ctrl + Shift + M Java editor organization import Ctrl + shift + O Java editor uses try/catch Block to enclose unset, it is too common, so we recommend that you set it here. You can also use Ctrl + 1 for automatic correction.
Run scope function shortcut key global one step return F7 Global One Step skip F6 Global One Step Jump F5 Global One Step Jump select Ctrl + F5 global debug last start F11 global continue F8 global use Filter Single Step execute Shift + F5 global Add/remove breakpoint Ctrl + Shift + B global display Ctrl + D global run last start Ctrl + F11 global run to row Ctrl + R global execute Ctrl + U
Reconstruction scope function shortcut key global undo reconstruction Alt + Shift + Z global extraction method Alt + Shift + M global extraction local variable Alt + Shift + L global inline Alt + Shift + I Global Movement Alt + shift + V Global rename Alt + Shift + R global redo Alt + Shift + Y

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.