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

How to turn on the automatic completion function of Code in eclipse by java programming

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

Share

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

How to turn on the method of automatic code completion in java programming in eclipse. In view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

If we do not pass the setting in the java development tool eclipse, it will take us more time to write the code, so today we will share with you the relevant content about "java programming to open the automatic code completion function in eclipse". The specific methods are as follows:

1. Click "Window" → "Perferences":

2. Click "Java" → "Editor":

3. Double-click "Content Assist (content assist)" → and check "Enable auto activation":

4. Enter 26 letters after the column "Auto activation triggers for Java (automatic activation trigger of Java)" (that is, any letter can trigger the automatic association function):

5. Click "Apply and Close (apply and close)":

Then we have completed the setup above.

Here's the editor to share the shortcut keys in java programming:

Ctrl+shift+r: open a resource

Ctrl+o: quick outline (view the method of the current class)

Ctrl+e: quick conversion Editor

Ctrl+2,L: assigning values to local variables

Alt+shift+r: renaming

Alt+shift+l and alt+shift+m: extracting local variables and methods

Shift+enter and ctrl+shift+enter

Alt+ direction key

Ctrl+m

Ctrl+. And ctrl+1: next error and quick fix

More shortcut key combinations can be viewed by holding down ctrl+shift+L in Eclipse.

Ctrl + Shift + O: introduce and manage imports statements

Ctrl + Shift + T: open Open Type to find class files

Ctrl + Shift + F4: close the open window where you are located

Ctrl + O: Open declarations

Ctrl + E: open editor (toggle window)

Ctrl + /: comment on this line

Alt + Shift + R: rename

Alt + Shift + L: extract local variables

Alt + Shift + M: extraction method F3: Open Declaration

Ctrl + D: delete this line

Ctrl + SHIFT + F: shaping

Ctrl + Alt + ↓ (↑): copy the line down (up)

Alt + ↓ (↑): move the line down (up)

Alt +. Output prompt

(1) in the java class, to output the main method, simply type main and press enter with this shortcut; to output System.out.println (), you simply type syso and then press enter with this shortcut; for example, if you want to override the toString () method of the parent class, you simply type to and press enter with this shortcut For example, if you want to use a class without import (such as Calendar), you only need to type Ca and then use this shortcut key to select; another example is that if you want to generate the get,set method of a field, you only need to type get and then use this shortcut to generate (default is public); and for example …

(2) in the jsp page, you can use this prompt to enter the tag (prompt tag attribute within the tag).

(3) this shortcut can also be used in xml.

26.alt+shift+j adds doc comments to the function

27.Ctrl + Shift + O: introduce and manage imports statements that have not been used after using the FormatOnSave plug-in, and automatically import when saving.

Ctrl + Shift + T: open Open Type to find class files

Ctrl + Shift + F4: close the open window where you are located

Use Ctrl + W # Ctrl + O: Open declarations

Ctrl + E: open editor (toggle window)

Ctrl + /: comment on this line

Alt + Shift + R: rename

Alt + Shift + L: extract local variables

Alt + Shift + M: extraction method

F3: Open Declaration

A menu pops up after using Ctrl+Mousealt+shift+x

Ctrl shift + F automatic format adjustment

What are the characteristics of Java? what are the characteristics of Java? what is the 1.Java language that represents the static object-oriented programming language? it implements the object-oriented theory and allows programmers to carry out complex programming in an elegant way of thinking. 2.Java has the characteristics of simplicity, object-oriented, distributed, security, platform independence and portability, dynamic and so on. 3. Using Java, you can write desktop applications, Web applications, distributed systems, embedded system applications, and so on.

This is the answer to the question about how to turn on the automatic code completion function of java programming in eclipse. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

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