In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the use of Eclipse skills, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Optimize eclipse
Eclipse will check the file, syntax format, code, etc., check will often be very performance-consuming, and some we simply do not use, no matter how good tools have 80% of the features are not needed. We can turn off some automatic inspection according to the actual situation, Window-- > Preferences-- > Validation.
I only keep an automatic inspection, you can set up according to the actual situation, turn off automatic inspection, when the need for inspection can be carried out manually, check the required documents, the method is to right-click the file, click validate for manual inspection.
Adjust the eclipse interface
There are many small icons on the eclipse toolbar, using notebook children's shoes, the screen is small, small icons may occupy three lines, your editable area will be small, very inconvenient, but some of these icons on the toolbar, some of which you may not have used once in three or five years, not to mention we have shortcut keys to call it up, right? How to selectively hide and adjust the small icons?
Window-- > Perspective-- > Customize Perspective...
Is it much more refreshing?
Change the font of Eclipse
Change the default font
Window- > Preferences- > General- > Appearance- > Colorsand Fonts-> Basics- > Text Font
Change the editor font
Window- > Preferences- > General- > Appearance- > Colorsand Fonts- > Java- > Java Editor Text Font (default font will be used if you do not change it)
Change the console font
Window- > Preferences- > General- > Appearance- > Colorsand Fonts- > Debug- > Console Font (default font will be used if you do not change it)
Custom shortcut key
Window- > Preferences- > General- > Keys
Select the item for which you want to assign the shortcut key and enter the shortcut key in Binding
Change spell check settings (similar to word's spell check)
Window- > Preferences- > General- > Editors- > Text Editors- > Spelling
Can choose whether or not to Enable spell checking
Custom code template
Window- > Preferences- > Java- > Editor- > Templates
Select the New button to add a new code template
Custom formatting reference template
Window- > Preferences- > Java- > CodeStyle- > Formatter
Eclipse comes with 3 template files, all of which are immutable. We can click the New button to create a new template file so that we can change it.
Have Eclipse automatically generate some methods (such as get and set methods for member variables)
Right-click on the editor panel to select the Source menu item. The menu item that begins with Generate is the option for the system to automatically generate code, such as Generate Getters and Setters. Are get and set methods that automatically generate member variables
Configure the code autoprompt function of eclipse
Window-- > Preferences-- > Java-- > Editor-- > Content Assist
Change the input box content pointed to by the arrow to .abcdefghijklmnopqrstuvwxyz. The reason is that eclipse will pop up an automatic completion window for you to choose only when you type'.'(dot character). This is the default setting, and now it will give you code hints when you type out dots and all the letters. the disadvantage is that the poor performance of the computer may make you doubt your life.
Eclipse Shortcut Keys
Ctrl+1 Quick fix (the most classic shortcut key)
Ctrl+D deletes the current line
Ctrl+Alt+ ↓ copies the current line to the next line (replication increases)
Ctrl+Alt+ ↑ copies the current line to the previous line (replication increases)
The current line of Alt+ ↓ interacts with the following line (especially useful, you don't have to cut and paste first)
The current line of Alt+ ↑ interacts with the previous line (ibid.)
Page previously edited by Alt+ ←
Alt+ → 's next edited page (for the above, of course)
Alt+Enter displays the properties of the currently selected resource (project, or file, or file)
Shift+Enter inserts a blank line on the next line of the current line (where the mouse can be anywhere on the current line, not necessarily the last)
Shift+Ctrl+Enter inserts a blank line in the current line (same principle as above)
Ctrl+Q locates to the last edited place
Ctrl+L is located in a certain line (good news for people with more than 100 programs)
Ctrl+M maximizes the current Edit or View (and vice versa)
Ctrl+/ comments the current line, then uncomment it by pressing
Ctrl+O Quick display of OutLine
Ctrl+T quickly displays the inheritance structure of the current class
Ctrl+W closes the current Editer
Ctrl+K references the selected Word to quickly navigate to the next
Ctrl+E quickly displays the drop-down list of the current Editer (boldface if the current page is not displayed)
Ctrl+/ (keypad) collapses all code in the current class
Ctrl+ × (keypad) expand all the code in the current class
The Ctrl+Space code assistant completes the insertion of some code (but it usually conflicts with the input method, you can modify the hotkeys of the input method, or you can temporarily use Alt+/ instead)
Ctrl+Shift+E displays the manager that manages all currently open View (you can choose to close, activate, etc.)
Ctrl+J forward incremental search (after pressing Ctrl+J, each letter editor you enter provides a quick match to locate a word, if not, it is shown that no one is found in stutes line, which is especially useful when looking up a word.
The function Idea was available two years ago)
Ctrl+Shift+J reverse incremental search (same as above, but from back to front)
Ctrl+Shift+F4 closes all open Editer
Ctrl+Shift+X capitalizes all the currently selected text
Ctrl+Shift+Y lowercase all currently selected text
Ctrl+Shift+F formats the current code
Ctrl+Shift+P navigates to the match for (for example, {}) (when positioning the back from the front, the cursor is inside the match, and vice versa)
The following shortcuts are commonly used in refactoring, so I will sort out the ones I like and often use. (note: generally, the shortcuts for refactoring begin with Alt+Shift)
Alt+Shift+R renaming (one of my own favorites, especially the Rename of variables and classes, which saves a lot of labor than manual methods)
Alt+Shift+M extraction method (this is one of the most commonly used methods in refactoring, especially for a large pile of mud code)
Alt+Shift+C modifies the function structure (more practical, N functions call this method, modify it at once)
Alt+Shift+L extracts local variables (you can directly extract some magic numbers and strings into a single variable, especially if there are multiple calls)
Alt+Shift+F changes local variables in Class into field variables (a more practical feature)
Alt+Shift+I merges variables (it may be a bit inappropriate to say so, Inline)
Alt+Shift+V movement functions and variables (
Regret medicine for Alt+Shift+Z reconstruction (Undo)
Edit scope function shortcut key
Find and replace Ctrl+F globally
The text editor finds the previous Ctrl+Shift+K
Text editor to find the next Ctrl+K
Global undo Ctrl+Z
Global replication Ctrl+C
Global restore previous selection Alt+Shift+ ↓
Global cut Ctrl+X
Global fast correction Ctrl1+1
Global content assist Alt+/
Check Ctrl+An all globally
Delete Delete globally
Global context information Alt+? Alt+Shift+? Ctrl+Shift+Space
Java editor displays tooltip description F2
Java Editor Select Encapsulation element Alt+Shift+ ↑
The Java editor selects the previous element Alt+Shift+ ←
The Java editor selects the next element, Alt+Shift+ →
Text editor incremental lookup Ctrl+J
Text editor incremental reverse lookup Ctrl+Shift+J
Paste Ctrl+V globally
Global redo Ctrl+Y
View scope feature shortcut keys
Global magnification Ctrl+=
Global reduction of Ctrl+-
Window scope function shortcut key
Global Activation Editor F12
Global toggle Editor Ctrl+Shift+W
Global previous editor Ctrl+Shift+F6
Global previous view Ctrl+Shift+F7
Global last perspective Ctrl+Shift+F8
Global next editor Ctrl+F6
Global next view Ctrl+F7
Global next perspective Ctrl+F8
The text editor displays the ruler context menu Ctrl+W
Global display View menu Ctrl+F10
Global display system menu Alt+-
Navigation scope function shortcut key
The Java editor opens the structure Ctrl+F3
Global open type Ctrl+Shift+T
Open type hierarchy F4 globally
Global Open statement F3
Open external javadoc Shift+F2 globally
Open resource Ctrl+Shift+R globally
Global fallback history Alt+ ←
Global forward History Alt+ →
Last Ctrl+ globally
Global next Ctrl+.
Java Editor displays outline Ctrl+O
Open type Ctrl+Shift+H globally in the hierarchy
Go globally to matching parentheses Ctrl+Shift+P
Go globally to the previous editing location Ctrl+Q
The Java editor goes to the previous member Ctrl+Shift+ ↑
The Java editor goes to the next member Ctrl+Shift+ ↓
Text editor goes to line Ctrl+L
Search scope function shortcut key
Global appears in the file Ctrl+Shift+U
Open the search dialog box Ctrl+H globally
Declaration Ctrl+G in the global workspace
Reference Ctrl+Shift+G in the global workspace
Text editing scope function shortcut key
Text editor rewrite toggle Insert
Scroll Ctrl+ ↑ on the text editor
Scroll down the text editor to Ctrl+ ↓
File scope function shortcut key
Save Ctrl+X Ctrl+S globally
Print Ctrl+P globally
Turn off Ctrl+F4 globally
Save Ctrl+Shift+S all globally
Turn off Ctrl+Shift+F4 all globally
Global property Alt+Enter
Create a new Ctrl+N globally
Project scope function shortcut key
Build Ctrl+B all globally
Source code scope function shortcut key
Java editor formatting Ctrl+Shift+F
The Java editor uncomments Ctrl+/
Java Editor comment Ctrl+/
Java Editor add Import Ctrl+Shift+M
Java Editor organizes Import Ctrl+Shift+O
Java Editor
Run scope function shortcut key
Global step back to F7
Skip F6 in a global step
Step into F5 globally
Global step-in Select Ctrl+F5
Global debugging the last time F11 was started
Global continue F8
Step into Shift+F5 using a global filter
Globally add / remove breakpoint Ctrl+Shift+B
Global display Ctrl+D
Global run Last time Ctrl+F11 was started
Run globally to line Ctrl+R
Global execution of Ctrl+U
Refactoring scope function shortcut key
Global undo refactoring Alt+Shift+Z
Global extraction method Alt+Shift+M
Global extraction of local variable Alt+Shift+L
Global inline Alt+Shift+I
Global Mobile Alt+Shift+V
Rename Alt+Shift+R globally
Global redo Alt+Shift+Y
Thank you for reading this article carefully. I hope the article "what are the skills for using Eclipse" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.