This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[ BUILD # : 200904231401 ] [ JDK VERSION : 1.6.* ] The syntax highlighter is inconsistently highlighting the text. I have attached a screenshot of one page with 4 instances highlighted. The IDE was left for 3+ minutes to allow the syntax highlighter to adjust prior to capturing the image.
Created attachment 80940 [details] Screenshot with inconsistent syntax highlighting.
Likely a problem in jruby-parser, I'll take a look at this. I assume you don't use Ruby 1.9?
currently using 1.87(MRI) and 1.20(JRuby) only.
Do you still see this? There some fixes in jruby-parser wrt. somewhat similar cases. I tried with something similar as in the screenshot, and seemed to work for me, but it may depend on the whole context. Any chance you could paste a minimal code snippet here where you can see the problem? Thanks.
Marking as incomplete for now, I'd need more info on this - please see my previous comment.
Looks like the changes to the parser may have fixed it. Marking as fixed.
Wouldn't you know it. Just after I can't reproduce it and I close the issue, it pops up again in 6.7 final. It appears that it's tied somehow to timing. I typed the contents on line 32 and they were originally mixed brown and green, then black. After saving the file, bouncing to another application and back, and waiting about 2 minutes, the first half changed to green where it had been brown and green intermixed. Interesting thing. I cut the line out, saved the file, and pasted the line back in. When I pasted the line back in, it originally gets pasted in properly highlighted, but within 1-2 seconds, it reverts to the colors in the screenshot. Also, notice the underlining on the parameters to the method in lines 22-24. They are incorrectly highlighting 2 parameters (only selected_date should be marked as unused) and have the positioning incorrect.
Created attachment 84354 [details] Screenshot. See lines 22-24 and lines 32 in the screenshot.
As you can see from the screenshot, the function is not finished. If I finish the function (in this case, just add the 3 "end"s that finish the code, the syntax highlighting corrects itself. Both in the highlighting of what parameters are in use, and in the coloring of all the lines. Then, if I remove the block endings, the syntax highlighting is still correct. This implies to me that the issue is the highlighter trying to complete the content in full context and not in the context of a single line of code. And when it cannot complete the blocks, it somehow gets confused and gives up.
Created attachment 84573 [details] I've seen simmilar issues in c++, here a small example
Are you still seeing this? Can you recall whether this was with Ruby 1.8 or 1.9 (the 1.9 parser has some issues with getting correct source positions, which could be related - although this may also be an issue in the core editor). Unfortunately without a reproducible case this will be very hard to track down..
This was with the 1.8.7 version of Ruby and 1.4 version of JRuby. I think this is a combination of performance and highlighting. The reason I can see it is that I have the tendency to run a very busy machine so I can "see" things happening in the IDE. Second is that the highlighting has had some problems. Is it possible that the highlighter thread "times-out" when running on slow machines?
I see, thanks for the details. I think the highlighter thread shouldn't time out, but I'm not really familiar with that part of the editor infrastructure. Will need to investigate more, but likely not for 6.9 (unless this is too annoying).