http://my.oschina.net/zhaoqian/blog/66545
Encoding settings under 1.eclipse:
- when you use a template to create a new jsp,xhtml file in Eclipse , the default encoding is: Iso-8859-1. ISO-8859-1 encoding is not supported for Chinese display, if you want to support Simplified Chinese, the encoding should be GBK or GB2312 or UTF-8 (recommended) and so on. Right-click the menu bar-----preferences the JSP in type filter text; --Select the following JSP--Select the encoding in the creating Files group to encode UTF-8.
- If you want to make the new project, Java files directly to UTF-8, you need to do the following:
1. Windows->preferences ... Open the Preferences dialog, navigate to the left navigation tree, navigate to General->workspace, right text file encoding, select Other, change to UTF-8, and later create a new project in its Properties dialog box, text file Encoding is the UTF-8.
2. Windows->preferences ... Open the Preferences dialog box, left navigation tree, navigate to general->content Types, right context Types tree, click Text, select Java Source File, under Default Enter UTF-8 in the Encoding input box and click Update to set the Java file encoding to UTF-8. Other Java application development related files such as: properties, XML, etc. have been specified by the Eclipse default, respectively, Iso8859-1,utf-8, such as the development of the need to change the encoding format can be specified here.
3, after the above two steps, the new Java file is UTF-8 encoding, Eclipse compile, run, debug all no problem, but do rcp application product output, or plug-in output, always error, or can not compile through (the output to re-compile), Or the output of the plug-in runtime Chinese display garbled. At this time need to re-rcp application, or plug-in plugin project Build.properties add a line, javacdefaultencoding. = UTF-8. Let the output compile when you know the Java source file UTF-8 encoded. This setting needs to ensure that all Java source files are UTF-8 encoded, and if not all, refer to the Eclipse Help (Plug-in development environment Guide > Reference > Feature and Plug-in Build configuration), it is recommended that all Java source files are UTF-8 encoded.
2. Cancel the word spell check
MyEclipse Menu Window--general--editors--text editors--spelling--to the right of the Enable spell checking to remove the line, that is, to cancel the spelling of the word check.
3. Remove modules that do not need to be loaded
Open the Configuration window via Windows-preferences, then select the General-startup and Shutdown on the left, this time on the right shows the module that was loaded at eclipse startup, and can remove some modules according to your actual situation.
Windows–>perferences–>general–>startup and shutdown
Turn off the useless startup item:
WTP WebService UI Plug-in,equinox Provisioning platform Automatic Update support
One is the UI view, and one is the automatic update. I got rid of it.
4. Cancel automatic validation of project configuration files at startup
By default, Eclipse automatically validates each project's profile when it is started, which is a time-consuming process where you can select Myeclipse-validation in the Preferences window, and then leave only the validator list on the right The Manual item is ready. If you need to verify the time only need to select the file, and then right-click on the Myeclipse-run validation.
Windows–>perferences–>myeclipse–>validation
Drop all except the manual below, build only leave classpath dependency Validator
Manual Verification Method:
On the file that you want to verify, right-click –>myeclipse–>run validation
5. Modify the Eclipse.ini file of the Eclipse installation directory to increase the non-heap memory of the JVM
The settings for eclipse are as follows:
Open Eclipse Config file Eclipse.ini, change the-XMX (its value represents the maximum amount of memory that the JVM can use)
-xms256m
-xmx1024m
6. Editing tools when editing pages such as Eclipse edit jsp,xhtml
Window > Perferences > General > Editors > File associations >
In file types, select *.jsp > Set your own settings to default in associated editors.
7. Set the font size
and Fonts->Text Font 单击change 修改
the same variable is highlighted in 8.Eclipse
Problem Description:
Use shortcut keys or other reasons in eclipse, accidentally pressing the wrong, so that the variable highlighting is gone.
1. Workaround
:
Choose:
windows-> Preferences->java->editor->mark occurences
Select the top check box, and the following is a lot.
One of the
Local VariablesIs the highlight of the variable.
2. There are also simpler ways to do this:
Online Search, originally toggle Mark occurrences (Alt + Shift + 0)
This button does not press the icon in the shape of the small yellow color pen in the toolbar.
3. Change its color:
Choose:
windows-> Preferences->java->editor->mark occurences-> first line has a "Annotations" click to enter, display the list, find occurrence annotation to the right, select color. Comment Modification of 9.Eclipse ctrl+alt+j
Create a new XML file. Enter the contents:
<?xml version="1.0" encoding="UTF-8" standalone="No"? ><templates><template autoinsert="True" context="Typecomment_context" deleted="False" description="Comment for created types" enabled="true" id= "org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment" >/** * < P> Project:credo ' s base</p> * <p>description: < /p> * <p> Copyright (c) ${year} lioncredo.all rights reserved.</p> * @author <a href="[Email Protected] "> lioncredo< /a> */</template></templates>
The import is OK. 10.Eclipse sets the number of words per line to prevent line break settings
Web Wrapping is set in the main menu--web.11.
about Eclipse Profile export issues:
Eclipse's default configuration generally does not meet our requirements, we will generally modify some of the configuration, such as fonts, background color, shortcut keys and some template, and so on, so as to facilitate our development. But when we create a new workspace, Eclipse uses the default configuration, how do we export our custom configuration and then import the new workspace?
method One: Use the export feature of Eclipse (not recommended, many configurations cannot be exported)
Working directory Right-click to select Export->general->preference, so that you can export the EPF file, the new workspace can import the configuration file with import, this method can import most of the configuration, but not all, Many configurations are lost after importing.
Method Two: The workspace/.metadata/.plugins/ Org.eclipse.core.runtime. Settings folder is copied out, inside is all the configuration files, the new workspace when the. Settings folder is replaced by the. Settings folder in the new workspace. (a netizen is to replace the. plugings folder, but the. plugings folder is too large to replace the. Settings folder,. Settings only hundreds of K. )
12. Whether the label is an interface or an enumeration class on a class file
Check "Java Type indicator" to see the effect
12. Displays the Java type, whether it is an interface or an abstract class or an enumeration.
Tick general--appearance--lable Desirations--java Type Indicator
13.html page, the property is in Chinese, the corresponding font settings
Console output Complete information
Limit console output do not tick
15. Turn off tern-go to definition for Eclipse page
Go to Window - Preferences - General- Editors - Text Editors - Hyperlink ing preference page,remove.
16. Delete Launchbar
Go to Window - Preferences -run-debug-launching--launchbar,close
Eclipse Setup and optimization