code icon indicating copy to clipboard operation
code copied to clipboard

ValaSymbolOutline: Lose global header

Open jeremypw opened this issue 2 years ago • 2 comments

Fixes #378

Because SourceList requires the toplevel items to be headers, it seems, it was necessary to add another header "Other Symbols" when there are symbols that would not otherwise appear (e.g. those outside of classes or an existing namespace). This complicates the code significantly.

The CSymbolOutline was not touched as there are usually a large number of symbols at the top level.

jeremypw avatar Jan 19 '24 17:01 jeremypw

I'm not sure if this really solves the issue since in most cases we just end up with another single toplevel item. Perhaps we should revisit this after/as part of GTK 4 porting not using SourceList?

danirabbit avatar Jan 19 '24 21:01 danirabbit

@danirabbit I think solves the issue as strictly stated in the original report in that it gets rid of the redundant "Symbols" header which has nothing to do with the structure of the code. The presence of remaining topevel items reflects the structure of the code as returned by the parser so cannot be fixed without applying further rules to hide some Vala symbols and not others which I am :-1: on but, if desired, should be raised in (another) issue.

You're probably right that it would have been easier to address the original issue by changing the widget in Gtk4 but that will not in itself fix the expanded issue.

jeremypw avatar Jan 20 '24 15:01 jeremypw

Closing as design reservations expressed.

jeremypw avatar Aug 05 '24 17:08 jeremypw