Summary of shortcut keys in Java

  • 2020-04-01 01:30:09
  • OfStack

Add the necessary comments, the good habits necessary for a responsible, ethical front end,

It can greatly improve the maintainability and readability of code.

Java code annotation shortcut key: CTRL +shift+/ first familiar with HTML, CSS, js annotation writing: 1, HTML annotation syntax:

< ! -- annotated content --> 2. CSS annotation syntax


3. JavaScript comments

// comment the content
What follows is a summary of where comments are used in these types of code and how they are written. (it may not be the same according to personal habits) 1. The position where the HTML annotation is used: 1) it is generally used after the end of the tag of some major nodes, such as:

< Div class = "wrap" > < Div class = "main" > . < / div> < ! - the main end - > < Div> < ! - wrap end - > 2) used after the end of some loops, such as:

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

2. CSS comments are usually used at the top of a module style definition to indicate which module the style is applied to, such as:

. Comment {... }. Photo {... }. Share {... }. That {... }3. Javascript comments generally add comments at the top of a function, indicating the function, author, author information, and modification time of the function.

/ / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = / /           Truncated character //          Steepvi / /           RTX: * * * * * * * / /           2010-10-14 / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =     Finally, comments are also characters and traffic is generated. Therefore, when the page is published to the official address, it is best to add a step to optimize the process. CTRL + /
CTRL + shift + c
Here is a list of all the shortcuts in myeclipse: Ctrl+1 quick fix (classic shortcut, no need to say) Ctrl+D: Delete the current line Ctrl + Alt + left copy current line down to the next line (copy) on the Ctrl + Alt + write copy current line to one line (copy) Alt + left below the current line and a line of interactive location (particularly useful, can save first cut, and then paste) Alt + write current line (ditto) interact with the top row position before the Alt + please a editor page Alt + - > next page (in view of the above that is of course) Alt + Enter to display the currently selected resource (engineering, or file Or file) the properties of the Shift + Enter a line under the current row insert a blank line (at this time the mouse can be in any position, the current row is not necessarily the last) Shift + Ctrl + Enter in the current row insert a blank line principle (ditto) Ctrl + Q location where the final Edit Ctrl + L positioned in a row (for more than 100 people have the Gospel) Ctrl + M to maximize the current Edit or View (then vice) Ctrl + / comment the current line, then uncomment Ctrl + O Rapid display the OutLine Ctrl + T fast current class inheritance structure Ctrl + W to close the current Editer Ctrl + K with reference to the selected Word quickly locate to the next Ctrl + E rapid display the current Editer drop-down list (if the current page is not displayed in bold) Ctrl + / (small keyboard) fold all the code in the current class Ctrl + x (pad) all the code in the current class Ctrl + Space

Code assistant to complete some code inserts (but generally and input method have conflict, you can change the input method of hot keys, can also be made Alt + / replace) Ctrl + Shift + E shows all currently open View of the manager (can choose to shut down, activate the operations such as Ctrl + J positive incremental search (press Ctrl + J, you enter each letter editor provides a quick match positioning to a word, if not, then the stutes Shown in the line is not found, look up a word, particularly useful, this feature Idea two years ago, there was) Ctrl + Shift + J reverse incremental search (and on the same, only from the front after check) Ctrl + Shift + F4 to close all open Editer Ctrl + Shift + X all the currently selected text stale lowercase Ctrl + Shift + Y all the currently selected text to lowercase Ctrl + Shift + Ctrl + Shift + P F format the current code Position to the corresponding character (e.g. {})


The following keyboard shortcuts is commonly used refactoring, I myself like collate and commonly used (note: general refactoring shortcuts are Alt + Shift at the beginning of the) Alt + Shift + R Rename (is my favorite one, especially the Rename variables and class, than manual method can save a lot of labor) Alt + Shift + M extraction method (this is refactoring inside one of the most commonly used method, especially useful for a lot of mud pie code) Alt + Shift + C Modify the function structure (practical, have N function calls the method, change a) Alt + Shift + L extract local variable (can put some magic Numbers and strings extracting directly into a variable, especially when several calls) Alt + Shift + F the local variable into a field in the Class variables (practical) Alt + Shift + I combined variable (may say that is a bit wrong Inline) Alt + Shift + V mobile functions and variables (less common) Undo reconstructed by Alt+Shift+Z


Edit scope shortcut key global find and replace Ctrl+F text editor find the last Ctrl+Shift+K text editor find the next Ctrl+K global undo Ctrl+Z global copy Ctrl+C global restore the last select Alt+Shift+ left global cut Ctrl+X global quick fix Ctrl1+1 global content assist Alt+/ global select Ctrl+A global Delete Delete global Context information Alt+? Alt + Shift +? Ctrl+Shift+Space Java editor display tooltip description F2 the Java editor selects the encapsulation element Alt+Shift+ write the Java editor selects the previous element Alt+Shift+ please the Java editor selects the next element Alt+Shift+ - text editor increment find Ctrl+J text editor increment find Ctrl+Shift+J global paste Ctrl+V global redo Ctrl+Y
View the scope function shortcut key global zoom Ctrl+= global zoom Ctrl+-


Window scope function shortcut key global activation editor F12 global toggle editor Ctrl+Shift+F6 global top editor Ctrl+Shift+F6 global top view Ctrl+Shift+F8 global top view Ctrl+Shift+F8 global top view Ctrl+Shift+F8 global next view Ctrl+F7 global next view Ctrl+F8 global next view Ctrl+F8 text editor show 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+ please global forward history Alt+ - global top Ctrl+, Global next Ctrl+.java editor show outline Ctrl+O global open type in the hierarchy Ctrl+Shift+H global go to the matching bracket Ctrl+Shift+P global go to an editing position Ctrl+Q Java editor go to a member Ctrl+Shift+ write Java editor go to the next member Ctrl+Shift+ left text editor go to the line Ctrl+L


The search scope function shortcut key global appears in the file Ctrl+Shift+U global open search dialog box Ctrl+H global workspace declaration Ctrl+G global workspace reference Ctrl+Shift+G
Text edit scope function shortcut key text editor overwrite toggle Insert text editor scroll up Ctrl+ write text editor scroll down Ctrl+ left


Ctrl+X Ctrl+S global save Ctrl+X Ctrl+S global print Ctrl+P global close Ctrl+F4 global save Ctrl+Shift+S global close Ctrl+Shift+F4 global Alt+Enter global new Ctrl+N
Project scope function shortcut key global all build Ctrl+B


Ctrl+Shift+F Java editor format Ctrl+Shift+F Java editor uncomment Ctrl+/ Java editor add import Ctrl+Shift+M Java editor organize import Ctrl+Shift+O Java editor use try/catch block to surround unset, too common, so listed here, suggest setting yourself. You can also use Ctrl+1 to auto-correct.
Operation scope function shortcut key global step back F7 single-step skip F6 global step into F5 step into select Ctrl + F5 global start debugging last F11 continue to use a filter step F8 global Shift + F5 global add/remove breakpoints Ctrl + Shift + B global display Ctrl + D global run last launched Ctrl + F11 global run line to Ctrl + R global executive Ctrl + U
Refactor scope function shortcut key global undo refactor Alt+Shift+Z global extract method Alt+Shift+M global extract local variable Alt+Shift+L global inline Alt+Shift+I global move Alt+Shift+V global rename Alt+Shift+R global redo Alt+Shift+Y


Related articles: