Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the skills of using IntellJIDEA

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Today, the editor will share with you the relevant knowledge points of IntellJIDEA skills, which are detailed in content and clear in logic. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.

Command warehouse Ctrl + Shift + A can collect corresponding command shortcuts

1. Basic shortcut keys

1.1. Jump between ubiquitous jump projects

1.1.1, Project

Jump next project window Ctrl+Alt+ between projects [or Ctrl+Alt+]

1.1.2, CLA

Jump recent file between files-- > Ctrl + E recently modified file recent changed file-> Ctrl + Shift + E location of recently edited files last edit location Ctrl + Q recently browsed the file back Alt + left forward Alt + right

1.1.3, Bookmark

Use bookmarks to jump toggle bookmark use Ctrl + Shift + F11 to add tags Ctrl + Shift + digits set bookmark serial numbers use Ctrl + digits to jump between the corresponding bookmark serial numbers and file Alt + Shift + F can complete bookmark creation and collection (classes, methods)

1.1.4, region

Edit area and file area jump to Alt + 1

1.2. Precise search

1.2.1, CLA

Precise search class class Ctrl + Shift + T press this command twice in a row to search for class in the jar package.

1.2.2, Fil

Precise search file file Ctrl + Shift + R press the command twice in a row to search the file in the jar package

1.2.3, symbol

Precise search symbols (functions, attributes) symbol Ctrl + Alt + Shift + N press the command twice in a row to search for symbols in the jar package

1.2.4, string

Precise search string find in path Ctrl + H option (whether to match case, whether it is a word, use regular, mask to specify file search) scope (project, module, folder, custom)

2. Code assistant

2.1, column operation

1. Operate on multiple columns simultaneously:

(1) Select common characters in multiple columns, and use select all occurrences Ctrl + Alt + Y to manipulate multiple columns with selected characters. (2) use case conversion to convert the selected string to case toggle case Ctrl + Shift + U (3) use F2 to quickly locate the wrong position (4) use Ctrl + Alt + L to quickly format the code.

2.2 、 live template

2.2.1. Custom completion function

(1) enter settings (Ctrl + Alt + S) (2) search for live template (3) add group, and add content abbreviation: enter template abbreviation description: template describe the specific content of template text template

2.2.2 、 psfi, psfs

Custom completion properties

2.2.3 、 postfix

Fori sout field (name.field---- > can automatically append a name attribute) return (user.return) nn (user.nn)-null

2.2.4, Alt + Enter

Automatically create a function list replace (when you use for to traverse list, you can use Alt+Enter to change it to another optional traversal method) string format or append to implement the interface word spelling guide package

3. High quality code

3.1. Refactoring

3.1.1, variable reconstruction

Alt + Shift + R

3.1.2. Method refactoring

Method 1: make changes where the function is used, and then use Alt + Shift + C method 2: make changes where the function is used, and then use Alt + Enter

3.2. Extraction

3.2.1. Extract variables

Extraction as method variables: Alt + Shift + L extraction static variables Ctrl + Alt + C extraction member variables Ctrl + Alt + F extraction as method parameters Ctrl + Alt + P

3.2.2, decimation function

Select the code that needs to be extracted as a function, then use Alt + Shift + M

4. Find the modified track

4.1Integration of git

4.1.1, right-click the line number and edit area, select annotate, you can view the submission time of the content and details such as author 4.1.2, move all changes Ctrl + Alt + Shift + up4.1.3, undo, including individual and project changes

Use Ctrl + Alt + Z to undo a single file in a blank location. Use Ctrl + Alt + Z to undo changes that contain content on files, folders, etc., using Ctrl + Alt + Z, etc.

Local history (IDEA native version control tool)

Similar to git, refer to Mu course related tutorials for more content.

5. Association

5.1. association with Spring

Get the location and relationship of the relevant reference bean. For more information, please refer to the related tutorials of Mu course.

5.2.Associate with Database

When editing sql, you can get database tables, fields, and other related information, and you can make changes to the database or mapper files through idea, and you can synchronize the changes to all project-related files. For more information, please refer to the related tutorials of Mu course.

6. Debugging

Add breakpoint Ctrl + Shift + B (click on personal favorite line) 6.2.Step F66.3, resume F8-run only at breakpoint, view breakpoint Ctrl + Shift + F86.5, disable all breakpoint mute breakpoints6.6, right-click conditional breakpoint, enter corresponding conditional expression 6.7 in condition, and check the value of an expression during operation. When debug starts to run, enter the corresponding expression in Ctrl + U where you want to view the value, you can view the current value 6.8, run to a line run to cursor Ctrl + R6.9, set Value modifies the value of a variable 6.10 while running, run where if you can can use shortcut keys within the runnable flag to run the maximum running unit (method, class) within the runnable flag.

7. Other operations

7.1, file operation (no relevant action keys found)

Create a new file under the same level directory of the current file Alt + insert copy the current file move the current file

7.2, text manipulation

7.2.1. Copy Ctrl + C idea on the file name file using .md7.2.2, copy the full path file on Ctrl + Shift + C D:\ develop\ develop\ note\ Learning Notes\ idea\ idea use .md7.2.3, continuously copy multiple clipboard, select to use by calling up the clipboard (Ctrl + Shift + V), and you can call up the corresponding content idea using .md application.properties NoteApplication by the clipboard serial number.

7.3. Structure diagram

7.3.1. View current field,method outline file structure Ctrl + F37.3.2, view maven dependency, class diagram dependency: Ctrl + Alt + Shift + U7.3.3, view class inheritance structure, method invocation hierarchy inherit F4 methods-- use Ctrl + Alt + H on methods

These are all the contents of this article entitled "what are the tips for using IntellJIDEA?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report