问题
My eclipse stuck while building workspace. The problem started after installing Angular js in a project of eclipse. It's mainly stuck while validating files I installed using "bower" and "Grunt". I installed them in my project using my console from outside of eclipse.If I remove that project,my eclipse again functions normal. Creating another workspace isn't helping. How can I solve this problem without removing Angular js from my project?
回答1:
AngularJS Eclipse is based on tern.java which uses ternjs. When there are a lot of JavaScript files to parse with ternjs, it can take time. I suppose you have a lot of JavaScript files in your project since you use bower which download a lot of JavaScript files.
tern.java 0.9.0 will provide async tern completion which avoid freezing Eclipse. In other words JavaScript files are parsed with ternjs on background with a job.
But if you wish to avoid parsing the whole JavaScript files of your project, you must configure your tern script path with the well folders. If your project has JSDT nature, tern script path is computed by using JSDT Install Path. JSDT Install Path can manage exclude pattern but tern script path doesn't support exclude pattern for the moment. So it will parse the whole JavaScript files of your project.
See here for more informations.
回答2:
After seeing the accepted answer,I solved the problem this way,
- I first installed tern.js 0.9.0.
- Then I went to the project properties, selected tern script path included only the path I needed for validation, My project's javascript folder. I excluded other path like placeholders, Angular.js files, Jquery files.
- I selected the Javascript from the properties again and did the same things in include path's source.
My IDE currently working without freezing. I took help from there.
来源:https://stackoverflow.com/questions/28803945/eclipse-stuck-on-building-workspace-after-installing-angular-js