Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rshendershot
Visitor

Re: New Eclipse Plugin Release 5/16/2013

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.
0 Kudos
malloys
Visitor

Re: New Eclipse Plugin Release 5/16/2013

"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
0 Kudos
rshendershot
Visitor

Re: New Eclipse Plugin Release 5/16/2013

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!
0 Kudos
breger
Visitor

Re: New Eclipse Plugin Release 5/16/2013

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.
0 Kudos
malloys
Visitor

Re: New Eclipse Plugin Release 5/16/2013

"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
0 Kudos
malloys
Visitor

Re: New Eclipse Plugin Release 5/16/2013

"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
0 Kudos
rshendershot
Visitor

Re: New Eclipse Plugin Release 5/16/2013

@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.
0 Kudos
malloys
Visitor

Re: New Eclipse Plugin Release 5/16/2013

"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
0 Kudos
rshendershot
Visitor

Re: New Eclipse Plugin Release 5/16/2013

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!
0 Kudos