<p>So I'm writing a page which does some reporting and it's pretty dynamic, the user has the ability to group data and sort columns. I've been able to get my dynamic grouping down and then the sorting except now my generated linq-to-sql sql order by statement is backwards from what I want it to be. I think I need to figure out how to get at the Result returned from the LinqDataSource when the Sorting event is fired in the ListView so that I can then append my grouping order by clauses.</p>

<p>Currently I'm overriding the LinqDataSource selecting event to provide it's result and do the dynamic grouping there, but then the Result is modified by the Sort on the listview and I was thinking there must be some way to get at that result during the Sorting or Sorted event.</p>

<p>Any insight would be appreciated, in the meantime I will be attempting to figure this out myself.</p>

I've used the
PMD NetBeans plugin
, and
here
are the installation instructions (may be a little outdated, due to the speed of NetBeans development, but I got them to work).
Here's a list of
tools for static analyisis
.  Maybe you can cross-check for others that offer NetBeans support.
EDIT:
Those instruction are a little bit old, so I put a more up-to-date set
here
(links to my blog).