Community Forums

Feature requests => New SemmleCode features => Topic started by: KirillOsenkov on May 11, 2007, 11:04:13 pm



Title: Displaying query results in a multi-column list view
Post by: KirillOsenkov on May 11, 2007, 11:04:13 pm
It would be nice if one could display the query results not only in a tree view, but also in a multi-column list view. For example, if the query ends with "select c, n, n * 10, Replace("my custom {c} string", c), there should be four columns for every result found, whereas the fourth column (in this case) is calculated string.


Title: Re: Displaying query results in a multi-column list view
Post by: Semmle Coders on May 12, 2007, 02:59:45 pm
Have you got some full examples of queries you would like to specifically output as a multi-column list or do you generally see the multi-column list as an alternative to the tree view?

Thanks again for your interest.


Title: Re: Displaying query results in a multi-column list view
Post by: KirillOsenkov on May 12, 2007, 04:43:15 pm
Sure. This one for example:

from Package p, int loc
where p.fromSource()
  and loc = sum(CompilationUnit cu |
                cu.getPackage() = p |
                cu.getNumberOfLines())
select p, loc

It'd be nice to see the name of the package and the LOC number right next to it at the same time, without the necessity to expand the tree node. Overall, each query that returns a list of tuples would most probably benefit from this new representation, because each tuple from the result maps nicely to a row of the list view, each value filling a separate column. This one wouldn't need to expand the nodes of interest. Besides, with a tree, a lot of screen real estate to the right of the tree gets basically wasted, unless the node names are very long. Multi-line list view would probably help to organize information more efficiently.

And I don't mean that tree view is bad or something, it's just it would be nice to have something else as well. But I guess this must be a low priority feature - there probably are lots of more important things to do right now.

Keep up the good work!


Title: Re: Displaying query results in a multi-column list view
Post by: elnar on May 13, 2007, 08:52:48 pm
Hi Kirill,

thanks for your comments once again. I think you have made a good point and we decided to add a table (multi-column list) view. Hopefully it will be ready in the next release, which is due in a few days. You will receive an email about it if you are subscribed to the SemmleCode updates.

On top of all advantages that you have already listed with regard to the multi-column list view, I could add the ability to quickly reorder results (ascending or descending) based on any of the columns. Of course users will still be able to navigate to the source elements from the table's cells.

Hope you will like the feature. Looking forward to your comments once it is out.
Elnar


Title: Re: Displaying query results in a multi-column list view
Post by: KirillOsenkov on May 15, 2007, 10:54:15 am
WOW, that was fast! :) It works exactly like I was imagining. Thanks!