Bug 3512

Summary: Sourcewindow parses comments as variables
Product: frysk Reporter: Mike Cvet <mcvet>
Component: generalAssignee: Rick Moseley <rmoseley>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1633, 3392    
Attachments: A look at the text

Description Mike Cvet 2006-11-12 20:24:51 UTC
I've just opened the SourceWindow on funit-rt-threader.c, and it seems to have 
found some variables in the big Frysk license at the top of the file. When you 
hover over the text, the following is printed:

java.lang.StringIndexOutOfBoundsException
   at java.lang.String.substring(libgcj.so.7rh)
   at frysk.gui.srcwin.SourceBuffer.getVariable(FryskGui)
   at frysk.gui.srcwin.SourceView.mousedOverText(FryskGui)
   at frysk.gui.srcwin.SourceView$SourceViewListener.mouseMotionEvent(FryskGui)
   at org.gnu.gtk.Widget.fireMouseMotionEvent(libgtkjava-2.8.so)
   at org.gnu.gtk.Widget.handleMouseMotion(libgtkjava-2.8.so)
   at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so)
   at frysk.gui.Gui.gui(FryskGui)
   at frysk.gui.FryskGui.main(FryskGui)
Comment 1 Mike Cvet 2006-11-12 20:25:17 UTC
Created attachment 1415 [details]
A look at the text
Comment 2 Mike Cvet 2006-11-12 20:33:04 UTC
Also appears to print:

<AST>:0:0: unexpected end of subtree
<AST>:0:0: unexpected end of subtree


Futher down, may highlight the '++' of a variable increment such as 'a++;' red 
instead of green.
Comment 3 Rick Moseley 2006-11-22 19:22:18 UTC
This was an error in CDTParser.java where the callbacks were being called for
symbols/variables found inside of #include files which were inside #include
files.  Now the symbol being returned is checked against the current line being
parsed in the source file and if it is not there, the callback immediately
returns with no marking up being done.