Eclipse code prompt function settings (Java & eclipse + cdt c/C ++)

Source: Internet
Author: User
Tags visual studio 2010
 

Http://developer.51cto.com/art/200907/136242.htmhttp://blog.chinaunix.net/u/21684/showart_462486.html

Recently developed in Linux, because Visual Studio 2010 has been used for a long time, it has a special liking for the code prompt function. Now, in Linux, using eclipse for development will inevitably miss the powerful Visual Studio code prompts, so I searched some articles on the Internet and sorted out the methods for setting the eclipse code prompt function.

Java:

Enhance the code prompt function of eclipse. How can I configure it? The following describes the steps: 1. Open eclipse, and then "window" → "Preferences" 2. Select "Java", expand, "Editor", and select "content assist ". 3. Select "content assist" and then see the "auto activation triggers for Java" option under "auto-activation" on the right. In fact, it refers to the "." symbol that triggers the code prompt. 4. The "Auto activation triggers for Java" option should be followed by an ABC letter after "." To facilitate later search and modification. Then, "Apply" and click "OK ". 5. Then, select "file"> "Export", select "perferences" in the pop-up window, and click "Next ". 6. Select the export file path, export it to the desktop, enter "test" as the file name, and click "save ". 7. Find the file "test. EPF" you just saved on the desktop, right-click and choose "open with Notepad ". 8. You can see a lot of eclipse configuration information 9. Press the "Ctrl + F" shortcut key, enter ". ABC", and click "find next ". 10. Find the configuration information of ". ABC" as follows: 11. Change ". ABC" to ". abcdefghijklmnopqrstuvwxyz (,", save and disable "test. EPF ". 12. return to the eclipse interface, "file"> "import", select "perferences" in the pop-up window, click "Next", and select the "test. open the EPF file and click Finish ". This step is similar to the preceding export step. 13. Finally, of course, the code is tested. Create a project and a class. Enter switch and foreach in the Code for testing. You will immediately find that there are prompts, and there will be a lot of related prompts no matter which letter you typed, It is smooth and convenient. C/C ++: Open the terminal: input: $ gcc-V to get the GCC version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) you can easily see the current version. Start eclipse. Go to windows --> preferences --> C/C ++ and find environment. Add two variables: cplus_include_path:/usr/include/C ++/4.1.3 (My GCC version) c_include_path:/usr/includec/C ++. and-> trigger, although not as powerful as in Java, It is enough. This is the most powerful part of code prompts. Addition: Alt +/(some configurations are Ctrl + space) can also trigger code prompts, and the function is more powerful, and almost always provides prompts that meet the requirements, however, I don't know how to enable eclipse to automatically trigger prompts in more cases. If so, eclipse is as strong as vistual studio. Alt +/is the key for word completion. Set it in Windows> preferences> General> keys. Select Emacs for scheme.

Recently developed in Linux, because Visual Studio 2010 has been used for a long time, it has a special liking for the code prompt function. Now, in Linux, using eclipse for development will inevitably miss the powerful Visual Studio code prompts, so I searched some articles on the Internet and sorted out the methods for setting the eclipse code prompt function.

Java:

 
Related Article

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.