Custom UI to when double clicking an Issue in the results pane

Once FxCop is finished running all the rules, i'd like to be able to show a custom UI when i double click the Issue created by my custom rule. I noticed in the FxCopUI.dll there was a CustomAction class, along with an enum of Triggers. Can these be used to hook the event and show my UI vs the stock FxCop UI?
[311 byte] By [JohnCMCSD] at [2007-12-17]
# 1
Hi John,

The CustomActions code is the code we use to show IL when rightclicking a target, further we use it for hooking our test code into fxcop. It is not meant as a general purpose plugin architecture, I would not depend on this functionality as it can be broken or completely gone in any future version of FxCop.

Regards,
Jeffrey

JeffreyvanGogh at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 2
Ok...so...is there another way to plug in a custom UI that gets called when double clicking a Issue in the results pane?
JohnCMCSD at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 3
Hi, John,

There isn't a supported way to do this. I will take a look in our code and see how many hoops you'd need to jump through in order to get something hooked up.

Can I ask what additional UI you're looking to provide?

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 4

In a nutshell we are writing a set of rules that check for "good" architecture guidelines and some of our rules don’t give out static good or bad results. Several of the rules I'm working on right now collect a lot of data during the rule analysis. Then it saves this to a file and creates a Problem and returns it from the Check method. We then have a separate tool that opens that file and displays several visualizations of this data, so the user can look for certain visual patterns represented (many times people can visually see certain patterns that an algorithm might be hard pressed, computationally or feasibly, to find).

What I’d like (love actually) is for each issue/problem to have a state object that I can put my analysis results into. Then when I double click the issue in the FxCop UI, my plug-in UI is invoked for that rule and the UI would pull the state out of the issue/problem and use it to build the visualization.

The problem is that you guys wrote an incredibly useful engine and wrapped a very restrictive UI around it. My hats off to you for what you have done with the analysis engine. But my problems lie in that my ideas for using the analysis results are much bigger than what the FxCop UI allows. You guys created a monster Big Smile but it’s a great monster.

JohnCMCSD at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 5

That's an entirely fair assessment, the UI is very restrictive. And we haven't continued to invest cycles in the standalone app for well over a year. What we're looking at now is creating a new UI that will share significant components with VS. After making that transition, we should be able to improve extensibility.

It's frustrating for you, I know. But, taking the larger view, it's pretty exciting that we've made sufficient progress in code analysis as a topic that people are clamoring for the capability. Rules development (and features associated with custom rules) are high on the list of customer asks. So it will be a high priority in the future.

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 6
FYI to anyone trying to create their own tools that need to inspect the internals of an assembly, much like what FxCop allows, There is an open source Mono project called Cecil. It's API is very similar to the CCI / FxCop API and allows you to read and write the internals of an assembly.

I had originally started using the CCI library that ships with FxCop, but after a while found the Cecil library i switched. And since the API's were very similar my rewrites only took a few days.

JohnCMCSD at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...

Visual Studio Team System

Site Classified