Common shortcuts in eclipse and eclipse startup parameters

Source: Internet
Author: User

CTRL + 1 quick fix (the most classic shortcut, you don't need to talk about it)

CTRL + D: Delete the current row

CTRL + ALT + ↓ copy the current row to the next row (copy added)

CTRL + ALT + ↓ copy the current row to the previous row (copy added)

Alt + ↓ interaction position between the current row and the following row (especially practical, you can save cutting and pasting)

Alt + ↑ interaction between the current row and the previous row (same as above)

Alt + ↓ previous edited page

Alt + → next edited page (of course for the above)

Alt + enter display the properties of the currently selected resource (project, or file)

Shift + enter insert empty rows in the next row of the current row (the mouse can be at any position of the current row, not necessarily the last row)

Shift + Ctrl + enter insert blank lines in the current line (same principle)

CTRL + q locate the Last edited location

CTRL + l locate in a line (for those with more than 100 programs, there will be good news)

CTRL + M maximize the current edit or view (then press it, and vice versa)

CTRL +/comment out the current row, and then press it to cancel the comment

CTRL + O quick outline display

CTRL + T quickly display the inheritance structure of the current class

CTRL + W disable the current editer

CTRL + k quickly locate to the next one by referencing the selected word

CTRL + E: Click it to quickly display the drop-down list of the current editer (if the current page is not displayed, it is displayed in bold)

CTRL +/(keypad) collapse all code in the current class

CTRL + × (keypad) show all the code in the current class

CTRL + Space Code assistant inserts some code (but it is usually in conflict with the input method. You can modify the key of the input method or replace it with ALT +/for the moment)

CTRL + Shift + e display the managers that manage all Opened Views (you can choose to close or activate them)

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 not found in stutes line. It is particularly useful when querying a word. This function was available two years ago)

CTRL + Shift + J reverse incremental search (the same as the previous one, but only from the back to the front)

CTRL + Shift + F4 close all open editer

CTRL + Shift + x change all selected text to lowercase

CTRL + Shift + y change all selected text to lowercase

CTRL + Shift + F format the current Code

CTRL + Shift + P locate the matched character (for example, {}) (when positioning from the front, the cursor must be inside the matched character, followed by the front, and vice versa)

The following shortcut keys are commonly used in refactoring. I like them and want to sort them out frequently (note: the keys for refactoring generally start with ALT + shift)

Alt + Shift + R Rename (one of my favorite ones, especially the rename of variables and classes, which saves a lot of labor compared with manual methods)

Alt + Shift + M extraction method (this is one of the most common methods in refactoring, especially useful for a lot of mud code)

Alt + Shift + C modify the function structure (more practical. N functions call this method and modify it once)

Alt + Shift + L extract local variables (you can directly extract some magic numbers and strings into one variable, especially when multiple calls are performed)

Alt + Shift + F convert the local variable in the class to the field variable (more practical)

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 restructured regret medicine (UNDO)

CTRL + Shift + u select the selected text, which is very similar to the UE list Query

 

Eclipse startup parameters--

Eclipse command line parameters
The description includes the English version and the Chinese version. It is particularly worth mentioning that the-nl parameter can specify the language used when the program starts. For example:
Eclipse-nl en_us
The English language will be started. This feature is particularly useful after the international language pack is installed and allows you to easily switch the versions of each language. Note that IBM wsad v5.1 also supports this feature.

Run eclipse
Install (decompress) the eclipse driver to a directory (for example, C:/eclipse) and run the eclipse executable file in the top-level installation directory to start the "workbench ". In Windows, the executable file is called eclipse.exe, and in Linux it is called Eclipse. Note: The following describes the settings on Windows. The settings on Linux are similar.

If not specified separately, the platform creates a sibling directory (for example, C:/Eclipse/workspace) for the default workspace directory ). This workspace directory is used as the default content area of the project and saves any required metadata. To perform shared installation or multi-workspace installation, specify the location of the workspace rather than the default value. There are two ways to control the workspace location: use the current working directory or use the-Data command line independent variable.

Set the workspace location in the current working directory
In this solution, the workspace location is the workspace directory in the current working directory.

The easiest way to achieve this is to use the following steps to create a shortcut:

Navigate to eclipse.exe in Windows Resource Manager and right-click and drag it to create a shortcut for eclipse.exe.
Edit the shortcut attributes so that the start position: Field identifies the parent directory of the workspace location (for example, C:/users/Robert ).
Close the Properties dialog box and double-click the shortcut (if the directory provided is C:/users/Robert, the workspace location will be C:/users/Robert/workspace ).
Of course, you can also use a command prompt (by switching the directory to the parent directory of the workspace and then running eclipse.exe) to achieve the same effect.

Use-data to set the specific location of the Workspace
To use the-Data command line independent variable, you only need to set-data your_workspace_location (for example,-data C:/users/Robert/myworkspace) add the target field to the shortcut property or explicitly include it on the command line.

Use-VM to set Java VM
We recommend that you explicitly specify the Java VM to be used when running eclipse. Use the-VM command line independent variable (for example,-vm c:/JRE/bin/javaw.exe) to achieve this purpose. If-VM is not used, eclipse uses a Java VM found on the O/s path. When installing other products, they can change your path, resulting in the next time you start eclipse, use another Java VM.

Run advanced topics in eclipse
The eclipse executable file and platform itself provide many execution options for developing or debugging eclipse components of interest. The general format for running eclipse executable files is:

Eclipse [platform options] [-vmargs [Java VM arguments]
Eclipse startup parameter command description reason
-Arch Architecture
Define the processor architecture on which the eclipse Platform runs. The eclipse platform usually uses common values of the Java OS. Arch attribute to calculate the best settings. If this item is specified here, this is the value used by the eclipse platform. The value specified here can be used as bootloader. getosarch () for the plug-in. Example values: "x86", "iSCSI", "PA-RISC", and "PPC ". 2.0
-Application applicationid
The application to run. Applications are declared by providing extensions to the org. Eclipse. Core. runtime. Applications extension points. This independent variable is usually not required. If this option is specified, the value overwrites the value provided by the configuration. If this option is not specified, "Eclipse workbench" is run ". 1.0
-Boot bootjarurl
(We recommend that you do not use it; Use-configuration instead; 1.0 compatibility is supported ). The position of the Guide plug-in code (boot. Jar) on the eclipse platform, which is expressed as a URL. If this option is specified, it is used to set the class path for the class loader that loads the eclipse platform bootstrap loader. You only need to change the relative positions of startup. jar and boot. jar. Note that relative URLs are not allowed. * 1.0
-Classloaderproperties
If specified, use the Class Loader attribute file at the given position to activate the enhancement of the platform class loader. The file independent variable can be the file path or URL. Note that relative URLs are not allowed. Click here for more details. 2.0.2
-Configuration configurationfileurl
The location of the configuration file on the eclipse platform, which is expressed as a URL. The configuration file determines the location of the eclipse platform, available plug-in sets, and main functional components. Note that relative URLs are not allowed. When the eclipse platform is installed or updated, the configuration file is written to this location. 2.0
-Consolelog
Mirror the error logs of the eclipse platform to the console used to run eclipse. It is easy to use when combined with-Debug. 1.0
-Data workspacepath
The path of the workspace where you want to run the eclipse platform. The workspace location is also the default position of the project. The relative path is interpreted relative to the directory from which eclipse is started. 1.0
-Debug [optionsfile]
Place the platform in the debugging mode and load debugging options (if specified) from the file at the given location ). This file indicates which debugging points can be used for plug-ins and whether they are enabled. If no file location is provided, the platform searches for a file named ". Options" in the directory where eclipse is started. The URL and file system path can be used as the file location. 1.0
-Dev [classpathentries]
Place the platform in the development mode. Add optional class path entries (separated by commas) to the runtime class path of each plug-in. For example, when the work zone contains the plug-in to be developed, specifying-dev bin adds a class path entry for the directory named bin for each plug-in project, allowing the latest class files to be stored. Removes redundant or non-existent class path entries. 1.0
-Endsplash Params
Internal options used to disable the screen flashing when the eclipse platform is started and running. This option has different syntaxes and semantics in different locations in the flash screen processing chain. 2.0
-Feature featureid
The identifier of the main functional component. The main feature provides the product personality for the startup instances of eclipse, and determines the product customization information used. 2.0
-Keyring keyringfilepath
The location of the authorized database (or "key ring" file) on the disk. This independent variable must be used with the-password option. The relative path is interpreted relative to the directory from which eclipse is started. 1.0
-Nl locale
Defines the name of the language environment on which the eclipse Platform runs. The eclipse platform usually automatically calculates the best settings. If this item is specified here, this is the value used by the eclipse platform. The value specified here can be used as bootloader. getnl () for the plug-in. Example values: "en_us" and "fr_fr_euro ". 2.0
-Nolazyregistrycacheloading
Cancel activation and mount the optimized Platform Plug-in registry cache. By default, extension configuration elements are installed from the Registry cache (when available) only when needed to reduce memory usage. This option will force full registry cache loading at startup. 2.1
-Noregistrycache
Attackers can bypass the internal plug-in registry cache file. 2.0
-Nosplash
Run the platform without displaying a pop-up screen. 1.0
-OS operatingsystem
Defines the operating system on which the eclipse Platform runs. The eclipse platform usually uses common values of the Java OS. Name attribute to calculate the best settings. If this item is specified here, this is the value used by the eclipse platform. The value specified here can be used as bootloader. getos () for the plug-in and used to parse the $ OS $ variable in the path mentioned in the plug-in list file. Example values: "Win32", "Linux", "HPUX", "Solaris", and "Aix ". 1.0
-Password
The password of the authorized database. Use with the-keyring option. 1.0
-Perspective perspectiveid
The perspective that needs to be opened in the active workbench window at startup. If this parameter is not specified, the perspective of the activity when it is disabled is enabled. 1.0
-Plugincustomization propertiesfile
Location of the property file that contains the default setting of the plug-in preferences. These default settings overwrite the default settings specified in the main feature. The relative path is interpreted relative to the directory from which eclipse is started. 2.0
-Plugins pluginsfileurl
(We recommend that you do not use it; Use-configuration instead; 1.0 compatibility is supported ). Specifies the location of the plug-in file on the eclipse platform, which is expressed as a URL. This file is in the format of an attribute file. The key is any user-defined name and the value is plugin. the explicit path of the XML file or the list that points to the path of the directory containing the plug-in separated by commas. Note that relative URLs are not allowed. If this option is specified, this option will create an appropriate temporary configuration. * 1.0
-Refresh
The global refresh option of the workspace is executed at startup. This will make any changes made in the file system since the last running of the platform consistent. 1.0
-Showlocation
Option used to display the location of the workspace in the title bar of the window. In Release 2.0, this option is only used with the-Data command line argument. 2.0
-Showsplash Params
Internal options used to display the pop-up screen (executed by the executable eclipse platform starter. This option has different syntaxes and semantics in different locations in the flash screen processing chain. 2.0
-VM vmpath
The location of the "Java Runtime Environment" (JRE) to run the eclipse platform. If this option is not specified, JRE is located in JRE (which is the sibling directory of the eclipse executable file ). The relative path is interpreted relative to the directory from which eclipse is started. 1.0
-Ws windowsystem
Defines the Windows system on which the eclipse Platform runs. The eclipse platform usually uses common values of the Java OS. Name attribute to calculate the best settings. If this item is specified here, this is the value used by the eclipse platform. The value specified here can be used as bootloader. getws () for plug-ins, for SWT configuration, and for parsing the $ ws $ variable in the path mentioned in the plug-in list file. Example values: "Win32", "motif", and "GTK ". 1.0

Pass all the independent variables (but not including-vmargs) after the-vmargs entry as the virtual machine independent variables (that is, before the class to be run) directly to the indicated Java VM. NOTE: If eclipse starts the independent variables (for example,-data) provided after the Java VM independent variable (-vmargs), eclipse will not start and you will receive "JVM terminated. Exit code is 1 "error.

Run on different VMS
Run eclipse on j9
When running eclipse on j9 1.5, we recommend that you use the following VM options:

Eclipse.exe [eclipse arguments]-VM path_to_j9w.exe-vmargs-MS: 32-MM: 2048-MO: 32768-moi: 32768-MCA: 32-MCO: 128-mx: 2000000
When running eclipse on j9 2.0, the default independent variable selected by j9w should be the appropriate option. However, to overwrite the parameters automatically set in the eclipse executable file, you must specify-vmargs without any parameters, as shown below:

Eclipse.exe [eclipse arguments]-VM path_to_j9w.exe-vmargs
For more information, see j9 VM documentation and help.

Run eclipse on IBM developer kit, Java (TM) technology edition VM
The default VM settings for IBM developer kit, Java (TM) technology edition 1.3 Linux are suitable for initial research, but are insufficient for large-scale development. For large-scale development, Vm independent variables should be modified to make more heaps available. For example, the following settings allow the Java heap to increase to 256 MB.

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.