Project: appceleratorstudio
Issue TISTUD-2539: JS Parser Validation: Failed to parse file Cannot recover from the syntax error
Saw this in the log. I created two projects, inserted two breakpoints, and ran both in android device. They were default projects, one with an extra event listener. Log: {code} !ENTRY com.aptana.editor.js 4 0 2012-10-16 15:29:36.290 !MESSAGE (Build 3.0.0.201210151149) [ERROR] Failed to parse file:/Users/dhyde/Desktop/TISTUD-RC/workspace/MyProject/Resources/app.js for JS Parser Validation !STACK 1 org.eclipse.core.runtime.CoreException: Cannot recover from the syntax error com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:129) com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:97) com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:145) com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:437) com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) Caused by: beaver.Parser$Exception: Cannot recover from the syntax error beaver.Parser.recoverFromError(Parser.java:697) com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:557) beaver.Parser.parse(Parser.java:498) beaver.Parser.parse(Parser.java:439) com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:383) com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:345) com.aptana.parsing.ParsingEngine.noCacheParse(ParsingEngine.java:424) com.aptana.parsing.ParsingEngine.parse(ParsingEngine.java:229) com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:230) com.aptana.index.core.build.BuildContext.parse(BuildContext.java:150) com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:121)	... 9 more !SUBENTRY 1 com.aptana.index.core 4 0 2012-10-16 15:29:36.290 !MESSAGE Cannot recover from the syntax error !STACK 0 beaver.Parser$Exception: Cannot recover from the syntax error beaver.Parser.recoverFromError(Parser.java:697) com.aptana.editor.js.parsing.JSParser.recoverFromError(JSParser.java:557) beaver.Parser.parse(Parser.java:498) beaver.Parser.parse(Parser.java:439) com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:383) com.aptana.editor.js.parsing.JSParser.parse(JSParser.java:345) com.aptana.parsing.ParsingEngine.noCacheParse(ParsingEngine.java:424) com.aptana.parsing.ParsingEngine.parse(ParsingEngine.java:229) com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:230) com.aptana.index.core.build.BuildContext.parse(BuildContext.java:150) com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:121) com.aptana.index.core.build.BuildContext.getAST(BuildContext.java:97) com.aptana.editor.js.validator.JSParserValidator.buildFile(JSParserValidator.java:145) com.aptana.core.internal.build.LazyBuildParticipant.buildFile(LazyBuildParticipant.java:72) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:333) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:273) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:231) com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:437) com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) {code} app.js {code} // this sets the background color of the master UIView (when there are no windows/tab groups on it) Titanium.UI.setBackgroundColor('#000'); // create tab group var tabGroup = Titanium.UI.createTabGroup(); // // create base UI tab and root window // var win1 = Titanium.UI.createWindow({ title:'Tab 1', backgroundColor:'red' }); var tab1 = Titanium.UI.createTab({ icon:'KS_nav_views.png', title:'Tab 1', window:win1 }); var label1 = Titanium.UI.createLabel({	color:'#999',	text:'I am Window 1',	font:{fontSize:20,fontFamily:'Helvetica Neue'},	textAlign:'center',	width:'auto' }); win1.add(label1); // // create controls tab and root window // var win2 = Titanium.UI.createWindow({ title:'Tab 2', backgroundColor:'#fff' }); var tab2 = Titanium.UI.createTab({ icon:'KS_nav_ui.png', title:'Tab 2', window:win2 }); var label2 = Titanium.UI.createLabel({	color:'#999',	text:'I am Window 2',	font:{fontSize:20,fontFamily:'Helvetica Neue'},	textAlign:'center',	width:'auto' }); win2.add(label2); // // add tabs // tabGroup.addTab(tab1); tabGroup.addTab(tab2); // open tab group tabGroup.open(); win1.addEventListener('click', function(){	win1.backgroundColor = win1.backgroundColor == 'red' ? 'blue' : 'red'; }); {code}
Story points: 3