New Eclipse Plugin Release 5/16/2013

A new update to the BrightScript Eclipse Plugin is available via the updates site:
http://rokudev.roku.com/updates/

The full Eclipse Plugin Guide can be found here:
http://sdkdocs.roku.com/display/sdkdoc/ … ugin+Guide

Release Notes:
While there where several unrelated bugfixes and new features, this release focused primarily on finishing the foundation of the type system and improving other feature groups that benefit from the expanded type system.

The type system is the basis of other feature groups including autocompletion (code assist), hover docs, and various type-related parse and build-time checks.

The type system had previously provided the knowledge of BrightScript global functions, but has been expanded to include Components, Interfaces, Events, and each of their associated functions and subs. The embedded docs (used in hover and autocompletion) for each of these items are a work-in-progress and will be improved over the next few releases.

Autocompletion is now invoked automatically after a short delay in typing (user preference, defaults to 200ms), when the last character typed is a dot (“.”). The manual invocation of autocompletion at any point is still available via CTRL-Space. The relevant type system additions (interfaces, functions/subs) now show up in the autocompletion suggestions list window, along with their docs in the associated docs window. Additionally, the suggestions list includes variables defined in the current function/sub, including associative array member variables.

Hover docs - A documentation window will display when you hover the cursor over most variables function/sub calls, interface references, etc… Note: there are several known bugs related to the new type system that sometimes prevent this from happening.

The docs processing has been improved with added support for annotation tags, similar to the docs annotation systems used by other languages (e.g. javadocs, doxygen, etc).
Both the built-in type system and user code (i.e. functions/subs and variables) will be able to use these tags. More details on this topic in the coming releases as specifics are finalized.

The Debug console usability has been improved in a few ways. The long-standing cursor positioning bug has been fixed - the cursor should now be automatically and correctly shown at the end of the console output. The left arrow is also now prevented from moving into the prompt and output areas, although you may still manually place the cursor there for cut/paste purposes.

The Debug console now includes simple command history support. The up and down arrows move thru the command history stack. User-preferences for the command history size (defaults to 1000) and whether or not to persist across sessions (defaults to false) have been added.

Task tags (TODO, FIXME, user-defined, etc.) are now working as expected.

Bugfixes:
Code folding - “initially folding” options are ignored
Autocompletion - does not recognize interface names in already typed dot expression
Autocompletion - fails when item to be completed is the last line (or part of last statement) of a function/sub
Autocompletion - suggestions list does not include interface names
Debug Console - Cursor incorrectly is always at the beginning of the line
Language Parser - GetGlobalAA global function missing from parser grammar
Language Parser - Some global function calls cause editor open failure with nullpointerexception
Selection Engine - Highlighting a function reference and then selecting Show in-> Outline View does not do anything
Selection Engine - Open Declaration does not do anything
TODO tasks don’t show up in the Task view
Type system - Erroneous type func/sub call error - says func/sub must be disambiguated by interface name, when the name matches but not the signatures do not
Type System - Non-Windows platforms get stacktrace (NullPointerException) when attempting to open BrightScript source editor

Enhancements:
Debug Console - Add support for command history recall
Docs system - Add support for docs annotation tags to improve help display
Editor - Add line number display to left-hand margin
Export Wizard - Improve error handling and error message for failed connections and provide exposed user preferences for each type of connection
Language Parser - Add context-specific, fine-grained error recovery to parser
Language parser - Add syntax checking, code completion, and help support for all pre-defined components
Language parser - add type inference system to support type-related parse and build-time error checking and warning generation
New Resource Wizards - Add a “New BrightScript File” wizard and menu entry
Type System - Add a user preference to determine whether or not to perform type related warning/error checks

I updated the plugin and now, when I try to open a source file I get:

Editor could not be initialized.

java.lang.NullPointerException
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.processFnCallFnRefOrVarRef(BrightScriptASTTranslator.java:2312)
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.exitFnexprtail(BrightScriptASTTranslator.java:2129)
	at com.roku.brightscript.parser.BrightScriptAnalyzer.exit(BrightScriptAnalyzer.java:1329)
	at net.percederberg.grammatica.parser.Parser.exitNode(Parser.java:540)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:300)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:267)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseStart(RecursiveDescentParser.java:177)
	at net.percederberg.grammatica.parser.Parser.parse(Parser.java:389)
	at com.roku.brightscript.ide.eclipse.core.model.parsers.BrightScriptSourceParser.parse(BrightScriptSourceParser.java:78)
	at com.roku.brightscript.ide.eclipse.core.model.parsers.BrightScriptSourceElementParser.parseSourceModule(BrightScriptSourceElementParser.java:83)
	at org.eclipse.dltk.internal.core.AbstractSourceModule.buildStructure(AbstractSourceModule.java:507)
	at org.eclipse.dltk.internal.core.Openable.generateInfos(Openable.java:188)
	at org.eclipse.dltk.internal.core.ModelElement.openWhenClosed(ModelElement.java:184)
	at org.eclipse.dltk.internal.core.BecomeWorkingCopyOperation.executeOperation(BecomeWorkingCopyOperation.java:45)
	at org.eclipse.dltk.internal.core.ModelOperation.run(ModelOperation.java:698)
	at org.eclipse.dltk.internal.core.ModelOperation.runOperation(ModelOperation.java:764)
	at org.eclipse.dltk.internal.core.SourceModule.becomeWorkingCopy(SourceModule.java:68)
	at org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider.createFileInfo(SourceModuleDocumentProvider.java:1254)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
	at org.eclipse.dltk.internal.ui.editor.SourceModuleDocumentProvider.connect(SourceModuleDocumentProvider.java:1487)
	at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4222)
	at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480)
	at org.eclipse.dltk.internal.ui.editor.ScriptEditor.internalDoSetInput(ScriptEditor.java:799)
	at org.eclipse.dltk.internal.ui.editor.ScriptEditor.doSetInput(ScriptEditor.java:1276)
	at com.roku.brightscript.ide.eclipse.core.editors.brs.BrightScriptEditor.doSetInput(BrightScriptEditor.java:53)
	at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3209)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
	at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:1679)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1676)
	at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3227)
	at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3254)
	at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:360)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:301)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:841)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:321)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:242)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:894)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:629)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.showTab(StackRenderer.java:1115)
	at org.eclipse.e4.ui.workbench.renderers.swt.LazyStackRenderer$1.handleEvent(LazyStackRenderer.java:67)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:422)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:389)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:606)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:332)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1029)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3047)
	at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)
	at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2902)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

I installed a new Eclipse (Juno) and added the Roku plugin (and the EMF + DLTK dependent plugins).

Very simple .brs files could be opened, but as soon as a method is called it fails.
So this code opens up fine:


Sub Main()
    'Comment: initTheme() 
End Sub

Sub initTheme()

End Sub

However, the following code generates an exception in Eclipse:


Sub Main()
    initTheme() 
End Sub

Sub initTheme()

End Sub

A popup shows the title: “Problem Occurred” and the content of the popup is: “Save Failed Middle member reference (‘addreplace’) into an AA (‘bandwidths.addreplace’) does not exist but should.”

I have a bunch of .brs files from previous projects. Those files opened up fine in the older plugin (without the extensive color coding). Opening these files in the new plugin fails showing:

  1. White-X-on-red-background-icon with accompanying text: “Failed to create the part’s control”
  2. In the details, the Exception stacktrace is shown:

java.lang.IllegalArgumentException: Middle member reference ('addreplace') into an AA ('bandwidths.addreplace') does not exist but should.
	at com.roku.brightscript.ide.eclipse.core.model.ast.typedexpressions.literals.BrightScriptAssociativeArrayLiteral.getDotExprMemberByName(BrightScriptAssociativeArrayLiteral.java:46)
	at com.roku.brightscript.ide.eclipse.core.model.BrightScriptModelUtils.getLastAssignmentExpressionBeforePosition(BrightScriptModelUtils.java:721)
	at com.roku.brightscript.ide.eclipse.core.model.BrightScriptModelUtils.getLastAssignmentExpression(BrightScriptModelUtils.java:678)
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.getProgramMethodCallExpressionForLocalAssignment(BrightScriptASTTranslator.java:2466)
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.processFnCallFnRefOrVarRef(BrightScriptASTTranslator.java:2323)
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.exitFnexprtail(BrightScriptASTTranslator.java:2129)
	at com.roku.brightscript.parser.BrightScriptAnalyzer.exit(BrightScriptAnalyzer.java:1329)
	at net.percederberg.grammatica.parser.Parser.exitNode(Parser.java:540)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:300)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:267)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:267)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:333)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:298)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:218)
	at net.percederberg.grammatica.parser.RecursiveDescentParser.parseStart(RecursiveDescentParser.java:177)
	at net.percederberg.grammatica.parser.Parser.parse(Parser.java:389)
	at com.roku.brightscript.ide.eclipse.core.model.parsers.BrightScriptSourceParser.parse(BrightScriptSourceParser.java:78)
	at com.roku.brightscript.ide.eclipse.core.model.parsers.BrightScriptSourceElementParser.parseSourceModule(BrightScriptSourceElementParser.java:83)
	at org.eclipse.dltk.internal.core.AbstractSourceModule.buildStructure(AbstractSourceModule.java:507)
	at org.eclipse.dltk.internal.core.Openable.generateInfos(Openable.java:188)
	at org.eclipse.dltk.internal.core.ModelElement.openWhenClosed(ModelElement.java:184)
	at org.eclipse.dltk.internal.core.ModelElement.getElementInfo(ModelElement.java:171)
	at org.eclipse.dltk.internal.core.ModelElement.getChildren(ModelElement.java:356)
	at org.eclipse.dltk.internal.core.ModelElement.getChildren(ModelElement.java:351)
	at org.eclipse.dltk.internal.core.ModelElement.accept(ModelElement.java:727)
	at org.eclipse.dltk.internal.core.ModelElement.accept(ModelElement.java:729)
	at org.eclipse.dltk.internal.core.ModelElement.accept(ModelElement.java:729)
	at org.eclipse.dltk.internal.core.ModelElement.accept(ModelElement.java:729)
	at com.roku.brightscript.ide.eclipse.core.model.BrightScriptModelUtils.findModelElementByScopeAndTypeAndName(BrightScriptModelUtils.java:634)
	at com.roku.brightscript.ide.eclipse.core.model.BrightScriptModelUtils.getUserMethodByName(BrightScriptModelUtils.java:462)
	at com.roku.brightscript.ide.eclipse.core.model.ast.typedexpressions.BrightScriptProgramMethodDeclaration.getBsMethod(BrightScriptProgramMethodDeclaration.java:128)
	at com.roku.brightscript.ide.eclipse.core.model.ast.typedexpressions.BrightScriptProgramMethodCallExpression.getBsMethod(BrightScriptProgramMethodCallExpression.java:53)
	at com.roku.brightscript.ide.eclipse.core.model.parsers.BrightScriptSourceElementParser.processMethods(BrightScriptSourceElementParser.java:279)
	at com.roku.brightscript.ide.eclipse.core.model.parsers.BrightScriptSourceElementParser.parseSourceModule(BrightScriptSourceElementParser.java:120)
	at org.eclipse.dltk.internal.core.AbstractSourceModule.buildStructure(AbstractSourceModule.java:507)
	at org.eclipse.dltk.internal.core.Openable.generateInfos(Openable.java:188)
	at org.eclipse.dltk.internal.core.ModelElement.openWhenClosed(ModelElement.java:184)
	at org.eclipse.dltk.internal.core.ModelElement.getElementInfo(ModelElement.java:171)
	at org.eclipse.dltk.internal.core.ModelElement.getElementInfo(ModelElement.java:153)
	at org.eclipse.dltk.internal.core.AbstractSourceModule.getSourceRange(AbstractSourceModule.java:342)
	at org.eclipse.dltk.internal.ui.editor.selectionaction.GoToNextPreviousMemberAction.update(GoToNextPreviousMemberAction.java:73)
	at org.eclipse.dltk.internal.ui.editor.selectionaction.GoToNextPreviousMemberAction.<init>(GoToNextPreviousMemberAction.java:52)
	at org.eclipse.dltk.internal.ui.editor.selectionaction.GoToNextPreviousMemberAction.newGoToNextMemberAction(GoToNextPreviousMemberAction.java:40)
	at org.eclipse.dltk.internal.ui.editor.ScriptEditor.createActions(ScriptEditor.java:1141)
	at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3565)
	at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
	at org.eclipse.dltk.internal.ui.editor.ScriptEditor.createPartControl(ScriptEditor.java:1777)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:138)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:313)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:861)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:841)
	at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:113)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:321)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:242)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:161)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:141)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:894)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:629)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:731)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:702)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:696)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:681)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:92)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4687)
	at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:187)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:422)
	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:389)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:606)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:332)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1029)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3047)
	at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)
	at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2902)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

I hope you can provide a quick fix for this.

“NicoJ” wrote:
I have a bunch of .brs files from previous projects. Those files opened up fine in the older plugin (without the extensive color coding). Opening these files in the new plugin fails showing:

  1. White-X-on-red-background-icon with accompanying text: “Failed to create the part’s control”
  2. In the details, the Exception stacktrace is shown:

java.lang.IllegalArgumentException: Middle member reference ('addreplace') into an AA ('bandwidths.addreplace') does not exist but should.
	at com.roku.brightscript.ide.eclipse.core.model.ast.typedexpressions.literals.BrightScriptAssociativeArrayLiteral.getDotExprMemberByName(BrightScriptAssociativeArrayLiteral.java:46)
	at com.roku.brightscript.ide.eclipse.core.model.BrightScriptModelUtils.getLastAssignmentExpressionBeforePosition(BrightScriptModelUtils.java:721)
...

I hope you can provide a quick fix for this.

That stacktrace is specific to just 1 of your source files (you may or may not have other similar errors with stacktraces that contain slightly different info for other source files), and the example you gave in the previous post is definitely not the source of the error/stacktrace. Look for a source file that contains “bandwidths.addreplace” (you should still be able to open up .brs files with the text editor in eclipse).

Unfortunately, I can’t isolate the problem with out the source file that’s causing the error.
I’ve PM’d you with my email address.

Cheers

“marcelo.cabral” wrote:
I updated the plugin and now, when I try to open a source file I get:

Editor could not be initialized.

java.lang.NullPointerException
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.processFnCallFnRefOrVarRef(BrightScriptASTTranslator.java:2312)
	at com.roku.brightscript.ide.eclipse.core.model.ast.BrightScriptASTTranslator.exitFnexprtail(BrightScriptASTTranslator.java:2129)
...

That isn’t likely to be happening for all source files… It’s more likely specific to 1 source file, which I would need to see to isolate the problem.
You’ll need to figure out which source file(s) is associated with the problem by closing all projects/files, and then opening them 1-by-1 to see which file is causing this, and then emailing it to me.
I’ve PM’d you with my email address.

Cheers

“malloys” wrote:

That isn’t likely to be happening for all source files… It’s more likely specific to 1 source file, which I would need to see to isolate the problem.
You’ll need to figure out which source file(s) is associated with the problem by closing all projects/files, and then opening them 1-by-1 to see which file is causing this, and then emailing it to me.
I’ve PM’d you with my email address.

Cheers

In my case is happening to all source files, even the files I got from the SDK examples, you can pick for instance the “Scroll” example, that has only two source files and try.

“marcelo.cabral” wrote:

“malloys” wrote:

That isn’t likely to be happening for all source files… It’s more likely specific to 1 source file, which I would need to see to isolate the problem.
You’ll need to figure out which source file(s) is associated with the problem by closing all projects/files, and then opening them 1-by-1 to see which file is causing this, and then emailing it to me.
I’ve PM’d you with my email address.

Cheers

In my case is happening to all source files, even the files I got from the SDK examples, you can pick for instance the “Scroll” example, that has only two source files and try.

OK, then the stacktraces are a red herring - you are almost certainly running into a java out-of-memory condition.
Java sometimes neglects to complain about the out-of-memory problem before other things fail from it.

This has become a somewhat unpredictable issue with some of the 64-bit versions/platforms of eclipse after the BrightScript type system was added, due to issues with
how a particular library that we depend on caches type info (and the size/number of the BrightScript built-ins).

I haven’t seen 32-bit versions have this issue, but it is possible.

Luckily there is a workaround:

Increase the -Xmx setting in your eclipse.ini file (in the same directory as the eclipse executable you are using).
The setting is usually the last line in the file.
The default (on Eclipse Juno 64-bit) is 384m, but I’m able to open all my projects with 1024m.

Some things to keep in mind:
You’ll need to restart Eclipse after any changes to this file.
Your mileage may vary on the value - just keep on increasing the -Xmx setting until you no longer get new errors… you may find that it requires more or less than the 1024m that works for me.
You may also have to do a clean rebuild on any given project to clear the errors and be able to refresh and re-open your source files.
Depending on your machine’s available memory and your open projects, you may also find that its necessary to close projects you aren’t currently working on to get the memory you need.

Cheers

It seems you got the issue, but for me still not working for all projects, I increased the value up to 4096 (my laptop has 6gb RAM) and there are some files that still cannot be opened.
In he previous version of the plugin I could open any file quickly, any way I can downgrade?

“marcelo.cabral” wrote:
It seems you got the issue, but for me still not working for all projects, I increased the value up to 4096 (my laptop has 6gb RAM) and there are some files that still cannot be opened.
In he previous version of the plugin I could open any file quickly, any way I can downgrade?

There is a way to revert to a previous installation configuration in eclipse, but before you abandon the useful new features and bugfixes of the current plugin, let’s see if we can provide you with an acceptable workaround…

I’ve been able to create and open a project for each of the plugin included project templates (which are the core and generally larger examples from the SDK) without an
out-of-memory condition under 64-bit eclipse with a 1024m setting. So, either you’ve got an exceptionally large amount of source code in a single open project (you did close the other projects in your workspace and rebuild the single current open project, right?), or you’re looking at a different remaining issue(s).

Assuming for a moment that this is still the out-of-memory issue…

Are you using a 64-bit version or a 32-bit version of eclipse (either can be used on 64-bit machines)?
Since your max memory setting is 4096, the 64-bit version of eclipse would not provide much advantage, if any, over the 32-bit version.
In fact, depending on the version of java running, the 64-bit version would likely be consuming more memory (ranging from 20-50% more on 64-bit).
Try running under the 32-bit version of eclipse if you haven’t already.

Do you have the most recent version of java installed?
I’ve heard from 2 other people with this issue that upgrading to the current version of java eliminated the out-of-memory situation (depending on how old your version of java is, newer versions have better memory management).

Aside from the above, I could probably help you out a bit quicker if you zipped up the project and emailed it to me so that I can isolate the problem. See your Roku PM inbox for my email address.

Cheers

I can’t update eclipse Indigo since this and I can’t install to Juno, at least not along with PDT PHP. There is a DLTK conflict. Please let me know what would be helpful.

“rshendershot” wrote:
I can’t update eclipse Indigo since this
Can you provide more details? There are currently no known issues with doing updates related to the BrightScript plugin.

“rshendershot” wrote:
and I can’t install to Juno, at least not along with PDT PHP. There is a DLTK conflict. Please let me know what would be helpful.

This is a long-standing known issue.
The BrightScript plugin currently relies on DLTK v2, while several other scripting languages plugins (PDT PHP in your case) rely on other later versions of DLTK.
Since the DLTK plugin set doesn’t maintain backward compatibility across major versions and Eclipse doesn’t support multiple plugin versions per installation instance, this conflict will always be possible (although less likely once we’ve managed to migrate to the latest version of DLTK, since many of the other scripting language plugins try to stay in lock-step with the DLTK release cycle).

Workaround:
Eclipse allows for multiple installations per machine, each with its own set of plugins and configuration.
So the solution, if you need to use scripting language plugins other than BrightScript, is to install a separate instance of Eclipse on your machine. I personally maintain 1 eclipse instance for each language and framework that I develop in, just to avoid these kinds of issues.

Cheers

updating Indigo is also a DLTK problem. I think BrightScript Plugin was the last thing I was able to update, but I guess the DLTK problem may have started earlier - it’s an old installation. So I wanted to clean it up and move to Juno. I do have PHP and Brightscript installed together on Indigo and my project uses both. It will be ungainly but for now…

When is updating to a more compativle DLTK planned?

Thanks!

So I tried upgrading to the new Eclipse plug in, and now I’m dead in the water. I’ve increased -XmX in the eclipse.ini file up to 1024. Any higher and I get a “Can’t start the java virtual machine” error message and eclipse closes. Once eclipse opens several files show errors. All of them are errors such as “Expecting End” and eclipse would be highlighting the letters ‘rin’ out of ‘print’ as the error.

Most of my files will in some cases prevent the editor to open. I get an error message…

Save Failed
Middle member reference ('addparam') into an AA ('http.addparam') does not exist but should.

I’ve tried removing those lines from the file, but I get the same result. Everything worked before the upgrade.

Please tell me how to downgrade back to the previous eclipse plugin.

“rshendershot” wrote:

When is updating to a more compativle DLTK planned?

Its on the active to-do list, and I’m hoping to get us in sync with their latest by the next major BrightScript plugin release, but I can’t comment on a specific timeframe - partly due to the fact that DLTK isn’t documented very well ( and especially so for its changes from release to release ). When it happens, it will be called out very clearly in the plugin release notes.

Cheers

“breger” wrote:
I’ve increased -XmX in the eclipse.ini file up to 1024. Any higher and I get a “Can’t start the java virtual machine” error message and eclipse closes.

That message means you don’t have 1GB of memory free to allocate to Eclipse.
Sounds like you either have very little memory installed on your machine, or you have a lot of other things running at the same time that are consuming lots of memory.

However
It’s not yet clear that low memory was your original problem (based on the error messages, it’s likely it’s not).

“breger” wrote:

Once eclipse opens several files show errors. All of them are errors such as “Expecting End” and eclipse would be highlighting the letters ‘rin’ out of ‘print’ as the error.
I’d need to see a complete source code file example to know what’s causing the “Expecting End” errors.
The error offset highlighting issue is separate and is a known eclipse bug (a race condition in updating the offsets for error markers). Doing a clean rebuild usually clears those up.

“breger” wrote:

I get an error message…

Save Failed
Middle member reference ('addparam') into an AA ('http.addparam') does not exist but should.

I’ve tried removing those lines from the file, but I get the same result.

If you truly removed all those lines (are you certain you got all instances in all source files?), then it should remove the errors following the invocation of a clean full build.
Note, in eclipse, a build is often necessary to remove previous error markers - editing alone is not sufficient.
Changing a file doesn’t automatically result in a rebuild unless you have “Build Automatically” checked in the project menu.
And… Eclipse sometimes gets into a confused state and leaves previous error markers behind anyway - so sometimes you must manually invoke a clean build ( Clean… from the project menu ) even if “Build automatically” is checked.

In any case, that error message is due to a known bug in the BrightScript plugin involving ifAssociativeArray and ifEnum function/sub calls from context (m.*) variables.
The bug’s been fixed, but the new plugin version containing the fix has not been published yet.
I’m lobbying the people in charge of plugin releases to publish a hotfix release ASAP, and they’re looking at it.

If you can’t wait, there is also a code workaround that’s possible:

Use a text editor on the offending source files (you can temporarily switch to a text editor on .brs files in eclipse, just remember to switch back when done),
and replace any instance of an ifAssociativeArray and ifEnum function/sub call that starts with an “m.*” with 2 lines:

The first line is a new variable assignment of the m.* prefix up to just before the func/sub call itself, and…
The second line is the function/sub call using that new variable.

e.g.:

instead of something like this:

m.x.foo.addReplace(y,“bar”)

replace it with this:

mxf = m.x.foo
mxf.addReplace(y,“bar”)

“breger” wrote:

Everything worked before the upgrade.
Please tell me how to downgrade back to the previous eclipse plugin.

If you can’t wait for the plugin hotfix, and the workaround mentioned above is too much to deal with… and you can live without the current plugin’s bugfixes, enhancements, and new features, then…
Eclipse has a built-in revert mechanism: http://help.eclipse.org/juno/index.jsp? … ks-123.htm

Cheers

@malloys - I’m using JEE Juno for PHP and Java Juno for Brightscript. That requires separate workspaces, but they can share the project (which is in git) so all in all it’s working. I wanted to let you know, but also to ask about syntax highlighting. In the PHP instance I’m using javascript which is ~OK, but even with the brs plugin there are inconsistencies. elseif/else if, and folding are the first that come to my mind. Is there a roadmap out there somewhere?

@breger - I had something similar so I’d suggest that you force the type of editor. In the Project Explorer, right-click on the .brs file you want to open, and choose Open With. Brightscript Editor should be the default, but when I had the problem that didn’t work unless I chose it specifically. So click on Brightscript Editor even if it appears to be the default. HTH.

“rshendershot” wrote:
… but even with the brs plugin there are inconsistencies. elseif/else if, and folding are the first that come to my mind. Is there a roadmap out there somewhere?

There is no published roadmap, but even if there was, roadmaps typically list target releases/timeframes for new features and enhancements, not bugfixes.

Re: elseif/else if
“elseif” as a token is currently accepted by the Roku box, but the plugin marks it as a syntax error. This is a known bug and on the to-do list (for complicated reasons related to the parser we use combined with the details of the BrightScript language, it’s a non-trivial bugfix, so no promises on the timing of a release that includes it).

Re: Folding.
AFIK, folding works as expected in the current plugin release. Can you be more specific?

Cheers

I’m not able to find the place where folding seemed to break. If I stumble on it again I’ll let you know. Thanks!