Using the attached code, incorrect outer lines are highlighted in the source window, and the following is printed to console: java.lang.ArrayIndexOutOfBoundsException: 0 at frysk.gui.srcwin.SourceWindow.updateShownStackFrame(FryskGui) at frysk.gui.srcwin.SourceWindow$SourceWindowListener.currentStackChanged(FryskGui) at frysk.gui.srcwin.CurrentStackView.notifyObservers(FryskGui) at frysk.gui.srcwin.CurrentStackView.selectionChangedEvent(FryskGui) at org.gnu.gtk.TreeSelection.fireSelectionEvent(libgtkjava-2.8.so) at org.gnu.gtk.TreeSelection.handleChanged(libgtkjava-2.8.so) at org.gnu.gtk.Gtk.gtk_main(libgtkjava-2.8.so) at org.gnu.gtk.Gtk.main(libgtkjava-2.8.so) at frysk.gui.Gui.gui(FryskGui) at frysk.gui.FryskGui.main(FryskGui)
Created attachment 1442 [details] file #1
Created attachment 1443 [details] file #2
Highlighting of lines in any file is being applied to the text from any other file in the window. Exception was caused by bad parsing, fixed by new DOM attributes in DOMFunction added by Rick.
frysk-core/frysk/dom: 2006-12-04 Mike Cvet <mcvet@redhat.com> * DOMFunction.java (createDOMFunction): Strip spaces out of incoming function_call String. * DOMTagTypes.java (DOMTagTypes): Added FUNCTION_CALL. * cparser/CDTParser.java (enterFunctionBody): Dump function header information into FUNCTION_CALL. (enterMethodBody): Ditto. frysk-gui/frysk/gui/srcwin: 2006-12-04 Mike Cvet <mcvet@redhat.com> * SourceBuffer.java (setCurrentLine): Don't bother highlighting anything if the function from this frame is in the wrong file. (highlightLine): Check for filenames, only highlight in the correct file. (createTags): Look for FUNCTION_CALL TagType for function declaration. * SourceView.java (scrollToFunction): Remove String parsing and handling code, already done by the parser. * SourceWindow.java (populateStackBrowser): Removed redundant view reset. (updateShownStackView): More intelligently handle null DOMSources and DOMSources belonging to different files. Load DOMSource if the new frame is from different files. Set new currentFrame here. (currentStackChanged): Set new currentFrame later.