How to solve the freezing problem when editing jsp and js files in Eclipse _ javascript skills

Source: Internet
Author: User
When using Eclipse to edit jsp and js files, the phenomenon of freezing often occurs. Baidu has been online for N times. after N optimization adjustments, the phenomenon of freezing has gradually improved, here are several solutions to this problem through the script home platform. when you use Eclipse to edit jsp and js files, you may often experience freezing. Baidu has been online for N times, after N optimization adjustments, the stuck phenomenon gradually improved. the specific method plays a role, which is not easy to explain. List all used methods as follows:

1. cancel verification

Windows-> perferences-> validation

Drop all vertices except manual. only classpath dependency Validator is left in build.

2. disable spelling check.

Windows> perferences> general> editors> Text Editors> spelling

3. for MyEclipse, the editing tool for modifying JSP pages

Window> perferences> General> Editors> File Associations>

In File types, select *. jsp> set "MyEclipse JSP Editor" to default in Associated editors.

4. prevent jar packages from accessing the network

When JSP is edited using eclipse or myeclipse, smart prompts may cause the ide to become stuck.

This is because the eclipse prompts that the network will be accessed according to the javadoc location specified by the JAR package.

Solution: window --> preferences --> java --> installed JREs. edit the jre and set the javadoc location of rt. jar and charsets. jar to null (none. Of course, you can also download javadoc to the local machine for relevant settings.

In addition, all jar packages used in your project are processed in the same way.

5. modify the shortcut key for opening the link

Recently, when editing code in MyEclipse, using the shortcut key for copying and pasting often causes the editor to pause for a short time, and the cursor does not follow, so it is almost impossible to respond.

I want to think about the configuration on the editor or the functions of the IDE. so I went to the Preferences search for the edit function and tested it one by one. Finally, I found it was caused by the code's hyperchain function.

Method: Window> Preferences> General> Editors> Text Editors> Hyperlinking

Change the hyperlink shortcut key to another key, such as Alt (cannot be changed to shift)

Note: in Eclipse, you can often use Ctrl + mouse to directly direct the editing interface to related methods, attributes, or classes.

This function is really very useful, but because the shortcut key of the copy and paste function is Ctrl, so that when I am performing quick operations, Eclipse cannot respond and cannot analyze my operations, now you only need to change one of the other shortcuts

6. modify the. project file of the project.

By default, the js editor in eclipse is very slow, especially when copying and pasting code.

The official website's standard version eclipse3.9 for javaEE is not installed with any plug-ins, and the card is simply intolerable when writing JavaScript. it is useless to try to remove all validate, including menu and project attributes, later in the project root directory .. in the project, the following red lines are still Validator. after deleting all the red configuration segments, the problem is solved, and the JS editing is no longer a snail bait.

 
  
   
    org.eclipse.ui.externaltools.ExternalToolBuilder
   
   
    full,incremental,
   
   
    
     LaunchConfigHandle
    
    
     
      /.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
     
    
   
  
  
   
    org.eclipse.jdt.core.javabuilder
   
  
  
   
    org.eclipse.wst.common.project.facet.core.builder
   
  
  
   
    org.eclipse.ui.externaltools.ExternalToolBuilder
   
   
    full,incremental,
   
   
    
     LaunchConfigHandle
    
    
     
      /.externalToolBuilders/org.eclipse.wst.validation.validationbuilder.launch
     
    
   
  
 
 
  
   org.eclipse.jem.workbench.JavaEMFNature
  
  
   org.eclipse.wst.common.modulecore.ModuleCoreNature
  
  
   org.eclipse.wst.common.project.facet.core.nature
  
  
   org.eclipse.jdt.core.javanature
  
  
   org.eclipse.wst.jsdt.core.jsNature
  
 

7. adjust the runtime memory of Eclipse.

In the eclipse installation directory, use EditPlus to edit the eclipse. ini file and change the parameters:

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

From the above seven aspects, I have summarized the solutions to the problem of freezing when Eclipse edits jsp and js files, and hope to help you.

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.