Summary of Eclipse's solution for jamming when editing jsp and js files

  • 2020-12-10 00:36:06
  • OfStack

When using Eclipse to edit jsp and js files, the phenomenon of dead card often occurs. I have searched N on The Internet for several times, and after the optimization and adjustment of N, the phenomenon of dead card is gradually improved. It is not easy to tell which method has played a role. List all the methods used as follows:

1. Cancel validation

windows � > perferences � > validation

Leave out all the dots under manual, leaving classpath dependency Validator

2. Turn off spell check

windows � > perferences � > general � > editors- > Text Editors- > spelling

3. For MyEclipse, edit tool when modifying JSP page

Window > perferences > General > Editors > File Associations >

Select *.jsp from File types > In Associated editors, set "MyEclipse JSP Editor" as the default.

4. Eliminate jar packet access to the network

When editing JSP with eclipse or myeclipse, using smart tips can cause ide to die.

This is because eclipse will be prompted to access the network according to javadoc location specified in the JAR package.

Solution: window > preferences-- > java-- > installed JREs, jre for editing, set rt.jar and ES103en.jar javadoc location to null (none). Of course, you can also download javadoc to the machine, the relevant Settings can also be solved.

Also: Do the same for all jar packages used in your project.

5. Modify the shortcut key to open the link

When Editing code in MyEclipse recently, using the shortcut key to copy and paste often caused the editor to pause briefly, the cursor didn't follow, and the editor almost froze to death.

I thought and thought about what configuration should be on the edit or what function of IDE caused it, so I entered Preferences to look for edit function, carried out 1 test, and finally found that it was the hyperlink function of the code that caused it.

Access method: Window - > Preferences - > General - > Editors - > Text Editors - > Hyperlinking

Change hyperlink shortcuts to other keys such as Alt (not shift)

Note: In Eclipse, you can often use Ctrl+ with a mouse click to direct the editing interface to the relevant methods, properties, or classes.

This function is really easy to use, but because the shortcut key of copy-paste function is ALSO Ctrl, so when I was doing the operation quickly, Eclipse could not react and could not analyze my operation. Now I only need to change one other shortcut

6. Modify the.project file of the project

The default js editor in eclipse is very slow, especially when it comes to copy-paste code

eclipse3.9 for javaEE of the standard version of the official website is not installed any plug-ins, JS writing card is unbearable, try to remove all validate, including the menu and project attributes have no effect, later in the project root directory. In project, it was found that the following red lines were still in Validator. After deleting all the configuration paragraphs corresponding to red, the problem was solved. Edit JS no longer looks like snail.


<buildSpec>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch</value>
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
<arguments>
<dictionary>
<key>LaunchConfigHandle</key>
<value>&lt;project&gt;/.externalToolBuilders/org.eclipse.wst.validation.validationbuilder.launch</value>
</dictionary>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>

7. Adjust Eclipse running memory.

Edit the eclipse.ini file with EditPlus in the eclipse installation directory and change the parameters to:


-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms512m
-Xmx512m
-XX:PermSize=256M 
-XX:MaxPermSize=256M
-XX:-UseGCOverheadLimit

From the above 7 aspects, this paper summarizes the solutions to the problem of jamming when Eclipse edits jsp and js files, hoping to be helpful to you.


Related articles: