Project: appceleratorstudio
Issue TISTUD-6195: Syntax Highlight and Autocomplete Fail
While I'm working in a project the syntax hightlight and autocompletion stops working. {code} !ENTRY com.aptana.editor.js.formatter 4 0 2014-02-26 15:23:35.838 !MESSAGE (Build 3.2.1.201402041146) [ERROR] com.aptana.formatter.epl/debug Cannot recover from the syntax error !STACK 0 beaver.Parser$Exception: Cannot recover from the syntax error beaver.Parser.recoverFromError(Parser.java:601) com.aptana.js.core.parsing.JSParser.recoverFromError(JSParser.java:489) beaver.Parser.parse(Parser.java:498) beaver.Parser.parse(Parser.java:439) com.aptana.js.core.parsing.JSParser.parse(JSParser.java:374) com.aptana.js.core.parsing.JSParser.parse(JSParser.java:331) 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.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:217) com.aptana.parsing.ParserPoolFactory.parse(ParserPoolFactory.java:200) com.aptana.editor.js.formatter.JSFormatter.format(JSFormatter.java:245) com.aptana.formatter.ScriptFormattingStrategy.doFormat(ScriptFormattingStrategy.java:185) com.aptana.formatter.ScriptFormattingStrategy$1.run(ScriptFormattingStrategy.java:115) org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) com.aptana.formatter.ScriptFormattingStrategy.format(ScriptFormattingStrategy.java:111) org.eclipse.jface.text.formatter.MultiPassContentFormatter.formatMaster(MultiPassContentFormatter.java:193) org.eclipse.jface.text.formatter.MultiPassContentFormatter.format(MultiPassContentFormatter.java:142) org.eclipse.jface.text.source.SourceViewer.doOperation(SourceViewer.java:979) org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1507) org.eclipse.ui.texteditor.TextOperationAction$1.run(TextOperationAction.java:128) org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) org.eclipse.ui.texteditor.TextOperationAction.run(TextOperationAction.java:126) org.eclipse.jface.action.Action.runWithEvent(Action.java:499) org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:119) org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90) sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:243) org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:224) org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132) org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:167) org.eclipse.core.commands.Command.executeWithChecks(Command.java:499) org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:285) org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:504) org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:555) org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:376) org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:322) org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:84) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Display.filterEvent(Display.java:1080) org.eclipse.swt.widgets.Display.sendEvent(Display.java:4165) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1466) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1489) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1474) org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1503) org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1499) org.eclipse.swt.widgets.Canvas.sendKeyEvent(Canvas.java:496) org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1060) org.eclipse.swt.widgets.Display.windowProc(Display.java:5648) org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) org.eclipse.swt.internal.cocoa.NSResponder.interpretKeyEvents(NSResponder.java:68) org.eclipse.swt.widgets.Composite.keyDown(Composite.java:594) org.eclipse.swt.widgets.Display.windowProc(Display.java:5558) org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) org.eclipse.swt.widgets.Widget.callSuper(Widget.java:221) org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2104) org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2318) org.eclipse.swt.widgets.Display.windowProc(Display.java:5620) org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5057) org.eclipse.swt.widgets.Display.applicationProc(Display.java:5206) org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3648) org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138) org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) org.eclipse.equinox.launcher.Main.run(Main.java:1450) {code} Steps to Reproduce: 1. Create a new Mobile Application (Alloy). 2. Create a new Controller. 3. Paste the following code in the controller file. {code} var args = arguments[0] || {}; var requestComments = function(){	var xhr = Ti.Network.createHTTPClient({	onload: function() {	Ti.API.info('Comments: '+this.responseText);	var comentarios = JSON.parse(this.responseText);	for (var idx in comentarios)	{	var row = Ti.UI.createTableViewRow({	backgroundColor: '#fff',	width: Ti.UI.SIZE,	height: Ti.UI.SIZE,	});	var rowLabel = Ti.UI.createLabel({	text: comentarios[idx].message,	font: {	fontSize: 10,	fontFamily: 'Helvetica Neue',	},	color: '#0e0e0e',	left: 5,	top: 5,	});	row.add(rowLabel);	$.detailTView.appendRow(row);	}	var rowMore = Ti.UI.createTableViewRow({	backgroundColor: '#fff',	font: {	fontSize: 12,	},	height: 30,	});	var rowMoreTxt = Ti.UI.createLabel({	title: 'Ver Mas',	tintColor: '#34aadc',	});	$.detailTView.appendRow(rowMore);	},	});	xhr.open('POST',Alloy.Globals.serverRequest);	xhr.send({ request: 'comments', postId: args.id }); }; function onClickCancel() {	$.detailWin.close(); } function sendComment() {	alert('Comment Sent.'); } $.detailWin.addEventListener('open', function(){	var secretRow = Ti.UI.createTableViewRow({	width: Ti.UI.SIZE,	height: Ti.UI.SIZE,	backgroundColor: '#fff',	layout: 'vertical',	});	var secretText = Ti.UI.createLabel({	text: args.message,	top: 10,	left: 10,	right: 10,	font: {	fontSize: 12,	fontFamily: 'Arial',	},	});	var spaceView = Ti.UI.createView({	height: 10,	width: Ti.UI.FILL,	});	secretRow.add(secretText);	secretRow.add(spaceView);	secretRow.selectionStyle = Ti.UI.iPhone.TableViewCellSelectionStyle.NONE;	$.detailTView.appendRow(secretRow);	$.detailTView.appendRow(Ti.UI.createTableViewRow({backgroundColor: '#fff', height: 35, selectionStyle: Ti.UI.iPhone.TableViewCellSelectionStyle.NONE}));	$.detailTView.appendRow(Ti.UI.createTableViewRow({height:10, selectionStyle: Ti.UI.iPhone.TableViewCellSelectionStyle.NONE}));	requestComments(); }); var backBtn = Ti.UI.createImageView({	width: 14,	height: 21,	image: 'icon_left_white.png', }); backBtn.addEventListener('click',function(){	$.tabGroupDetail.close(); }); $.detailWin.leftNavButton = backBtn; $.comentario.keyboardToolbar = $.footerComment; /* $.comentario.addEventListener('change', function() {	$.autoHeightLabel.text = $.comentario.value;	$.comentario.height = $.autoHeightLabel.height;	$.footerComment.height = $.autoHeightLabel.height; }); */ {code} Thanks
Story points: 5