ANTLR4ParseTreeVisualizer icon indicating copy to clipboard operation
ANTLR4ParseTreeVisualizer copied to clipboard

Allow expanding collection properties

Open zspitz opened this issue 6 years ago • 4 comments

Properties that return collections should expand to a full datagrid of those items, if they have multiple properties; or a single column if a collection of scalar values.

zspitz avatar Aug 30 '19 02:08 zspitz

Each such collection should return its elements as a string[][], or perhaps a 2D array.

For WPF datagrid binding, a jagged array is probably better.

zspitz avatar Sep 02 '19 19:09 zspitz

We still need to handle an infinite sequence. Perhaps a fixed limit of 100 items?

zspitz avatar Sep 02 '19 20:09 zspitz

I'm not sure how to do this:

  1. How do we handle instances of multiple types? An ArrayList or List<object> could contain multiple types. Even in a List<T>, there could be derived types.
  2. The value at the property could be a never-ending sequence.

I think I will leave this for now.

zspitz avatar Sep 02 '19 21:09 zspitz

Perhaps something like this:

  1. Create a dictionary / property bag for each element in the collection.
  2. Use StringValue to render the property values for each instance.
  3. Construct a custom type descriptor from the superset of all properties

zspitz avatar Sep 10 '19 22:09 zspitz