Eclipse Common Tips

Source: Internet
Author: User

Shortcuts0. Ctrl + 1 (quick fix)
1. Ctrl + D (delete current line)
2. Ctrl + Alt +↓ (copy the current line to the next line)
3. Alt +/or Ctrl + space (because the latter conflicts with the IME shortcut keys, so I usually use the former) role: Quick Insert.
4. Alt+shift+r renaming is very useful.
5. Ctrl + Q to locate the last edited place.
6. Ctrl + Shift + O automatically import the package.
7. ctrl+/comment The current line, and then cancel the comment by pressing it.
8. Ctrl+k Quick Find.
9. Ctrl + Shift + F auto indent.
Common shortcut keysEclipse's full keyboard shortcuts, familiar with shortcut keys, can help you develop more and save more time to do meaningful things.
Ctrl+1 Quick Fix (the most classic shortcuts, you don't have to say more)
Ctrl+d: Delete When moving forward
Ctrl+alt+↓ Copy the current row to the next row (replication incremented)
Ctrl+alt+↑ Copy the current line to the previous row (replication incremented)
Alt+↓ the current line and the next line of interaction (especially useful, can be omitted first cut, then pasted)
Alt+↑ the current line and the upper row interaction position (IBID.)
alt+← the previous edited page
alt+→ next Edit page (of course, for the above article)
Alt+enter displays the properties of the currently selected resource (project, or file or file)
Shift+enter inserts a blank row on the next line of the current row (at which point the mouse can be at any position in the current row, not necessarily the last)
Shift+ctrl+enter Insert blank line in current line (principle above)
Ctrl+q positioning to the last edited place
Ctrl+l positioning in a row (for people with programs over 100 have the gospel)
Ctrl+m maximize the current edit or view (and vice versa)
ctrl+/comment on the current line, and then uncomment it
Ctrl+o Quick Display OutLine
Ctrl+t quickly displays the inheritance structure of the current class
Ctrl+w Closing the current editer
Ctrl+k the selected word quickly navigates to the next
Ctrl+e quick display of the current Editer drop-down list (in bold if the current page does not appear)
ctrl+/(numpad) collapses all code in the current class
Ctrl+x (keypad) expands all code in the current class
Ctrl+space Code Helper to complete the insertion of some code (but the general and IME conflict, you can modify the input method hotkey, you can also take up alt+/to replace)
Ctrl+shift+e Display manager that manages all of the currently open view (you can choose to close, activate, and so on)
Ctrl+j forward Incremental lookup (after pressing CTRL+J, each letter editor you enter provides a quick match to navigate to a word, if not
There, then in the Stutes line display did not find, check a word, especially practical, this function idea two years ago.
CTRL+SHIFT+J Reverse incremental lookup (same as above, except forward)
Ctrl+shift+f4 Close all open editer
Ctrl+shift+x all the currently selected text to uppercase
Ctrl+shift+y turns the currently selected text to lowercase
Ctrl+shift+f formatting of the current code
Ctrl+shift+p position to the match (for example {}) (after locating from the front, the cursor is in the match, back to front, or vice versa)
The following shortcut keys are commonly used in refactoring, I like and commonly used to tidy up (note: General refactoring of the shortcut keys are alt+shift beginning of the)
Alt+shift+r rename (is my own favorite, especially the variables and classes of rename, than the manual method can save a lot of labor)
Alt+shift+m Extraction Method (This is one of the most common methods of refactoring, especially useful for a whole bunch of mud codes)
Alt+shift+c Modify the function structure (more practical, there are n functions called this method, modified once done)
Alt+shift+l extract Local variables (you can directly extract some magical numbers and strings into a variable, especially when multiple calls are made)
Alt+shift+f change the local variable in class to a field variable (more useful function)
Alt+shift+i Merge variables (this may be a bit inappropriate inline)
ALT+SHIFT+V moving functions and variables (not commonly used)
Alt+shift+z reconstruction of Regret medicine (Undo)
plug-in developmentEclipse's plug-in mechanism is a lightweight software component architecture. On the client platform, Eclipse uses plug-ins to provide all of the additional functionality, such as support for languages other than Java. Existing decoupled plug-ins have been able to support C/D + + (CDT), Perl, Ruby,python, Telnet, and database development. The plug-in architecture enables the addition of arbitrary extensions to existing environments, such as configuration management, and is never limited to supporting a variety of programming languages [8].
Eclipse's design idea is that everything is plug-ins. The eclipse core is small and all other features are attached to the Eclipse core as plug-ins. The Eclipse basic kernel includes: Graphics API (SWT/JFACE), Java Development Environment Plug-in (JDT), plug-in development environment (PDE), etc.
plug-in installationthe Eclipse plugin is installed in the following ways:
The first type: Direct Copy methodassuming that the installation directory for Eclipse is in C:\eclipse, unzip the downloaded Eclipse plugin or install the Eclipse plugin into the specified directory AA (for example: C:\AA) folder, open the AA folder, In the AA folder contains two folders features and plugins, and then the files in two folders are copied to C:\eclipse under the corresponding folder under features and plugins, The most straightforward and stupid way to copy plug-in files directly into the Eclipse directory is the most common. Because it is very difficult to remove these plugins in the future, it is not recommended.
Note: After extracting the plug-in package directly under the Plugins folder, restarting Eclipse may not load the new plugin.
The workaround is to:1. Open the command line to the current Eclipse directory, enter Eclipse-clean, and restart Eclipse, so eclipse will add a new plugin.
2, if the plug-in does not take effect, please delete the Eclipse\configuration\org.eclipse.update directory and then start eclipse;
You can see the newly installed plugins in the Eclipse menu "Help" and "About Eclipse SDK"--"Feature details" and "plug-in details".
The second type: Using the link file methodA. Assuming that the installation directory for Eclipse is in C:\eclipse, under this folder, create a new directory structure C:\eclipse\PluginsEclipse\jode\eclipse;
B. Unzip the downloaded Eclipse plugin or install the Eclipse plugin into the specified directory BB (for example: C:\BB) folder, open the BB folder, and then copy the two folders in the BB folder features and plugins to the newly-created one, In this way, there are two plug-in directories features and plugins in Eclipse.
C. Create a new links (C:\eclipse\links) directory in the C:\eclipse directory and create a text file with the link extension in the links directory, such as, as follows path=c:/eclipse/ Pluginseclipse/jode or Path=c:\\eclipse\\pluginseclipse\\jode (the plugin's directory), after saving the Eclipse plugin will be installed to complete.
Note: The path path of the Path= plugin directory in the link file is separated by \ \ or/
Java code
/eclipse/links/ ... Newly installed plugins can be found in the Eclipse menu "Help" and "Abouteclipse SDK"-"Feature Details" and "plug-in details".
Third: Install using Eclipse's own graphical interfaceSelect Help > Software Updates > Manager Configuration, then add > Extension location to find the directory where you want to install the plugin. Use Eclipse's help->softwareupdates->find and install ... search for new features ... Enter the software installation address to install strongly recommend this method, many advantages such as can be easily added to delete, do not write your own link file!
Note: The directory structure of the Eclipse plugin
Java code
. eclipseextension
The directory referred to in the 2.3 method refers to the "Eclipse" directory,
If you use the 3rd method, you must have a file in the Eclipse directory. Eclipseextension, if the downloaded plugin does not have this file,
Then just do it in the Eclipse installation directory, as long as there is such a file on it, the content is useless, mainly some version information. For example:
Java code
Id=org.eclipse.platform Name=eclipse Platform
Id=org.eclipse.platform Name=eclipse Platform version=3.1.1
Fourth: Install plug-ins using DropinsStarting with Eclipse3.5, there is a dropins directory in the installation directory. Simply unzip the plugin and drag it to the directory to install the plugin.
For example, installing the SVN plugin requires only the following three steps:
1, using WinRAR and other compression software to extract the compressed package to a folder, such as subclipse-1.8.16
2. Move/Copy this directory to the Dropins directory in the Eclipse installation directory
3. Restart Eclipse.
Because this kind of installation can install different plug-ins in different directories, and do not bother to write configuration files, so it is very convenient to manage, recommended to use.
Fifth type: Using Eclipse macketplace
Choose Help > Software Updates in the new Eclipse >eclipse Macketplace, here is the Eclipse plug-in market, you can directly search the installation needs of plug-ins, do not have to configure, one-click installation, the use of more convenient. Sixth type: Eclipse version update
version code platform version major release date SR1 release date SR2 release date
callisto 3.2 June 26, 2006 n/a n/a
europa 3.3 June 27, 2007 September 28, 2007 February 29, 2008
ganymede 3.4 June 25, 2008 September 24, 2008 February 25, 2009
galileo 3.5 June 24, 2009 September 25, 2009 February 26, 2010
helios 3.6 June 23, 2010 September 24, 2010 February 25, 2011
indigo 3.7 June 22, 2011 September 23, 2011 February 24, 2012
juno 3.8 and 4.2 June 27, 2012 September 28, 2012 March 1, 2013
kepler 4.3 June 26, 2013 September 27, 2013 February 28, 2014
luna 4.4 June 25, 2014 September 25, 2014 February 27, 2015
mars 4.5 June 24, 2015 n/a n/a

Eclipse Common Tips

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: 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.