Home
Options

My Addin API Wishlist

I've been hacking away at LINQPad.CodeAnalysis for a while now, and I've come away with a "wish list" of things I would love to see added or enhanced in the addin APIs. The main goal for me is to make an addin that feels more integrated, like it's part of LINQPad itself rather than part of a specific query.

Of course, I understand that some of this probably isn't easy or feasible and that some of it you probably wouldn't want to do for one reason or another. I could also add these as individual requests to the UserVoice, but I suspect there are a limited number of folks such as myself looking for deeper integration. Anyway, I figured I'd enumerate my wish list here for idea generation in the future, if nothing else.
  • Make the Util class available as a global instance variable rather than a static class. This would allow addins to create new extension methods against it instead of having to create their own static utility class.
    • Alternatively, you could provide an empty class available via something like a Util.Ext property that new extension methods could be written against. The goal here would be to stick all addin "utility" functionality in one place for easier exploration.
  • Allow addins to execute code on startup/load. This becomes relevant in the context of some of the other items below such as registering global event handlers.
  • Provide a global event for query execution. It would be cool if my addin could ask to handle all query executions and then act on them (such as displaying an output window). The main idea here is to allow addins to get closer to the feel of built-in functionality like the always-available IL window.
  • For that matter, other global events like a new query window, closing a query, etc. would be cool.
  • Events for query and text editor actions would be really nice too. For example, caret move, selection, clicking (right, double-click, etc.).
    • The use case in the case of LINQPad.CodeAnalysis is to allow the syntax tree to track the current caret location similar to the way the Visual Studio Syntax Tree does and highlight the node in the tree for the code where the cursor is.
  • Manipulation of the query window: moving the caret, highlighting text, etc. Same use case as above but in reverse (allow the addin to highlight the corresponding locations in the query window when a tree node is clicked).
  • Adding other visual queues to the query window (squiggles, highlights, icons, etc.)
  • Rewriting the text in a query.
  • Create new queries on the fly.
  • Getting a list of all open query tabs and getting/manipulating them with all the same functionality as the currently executing query.
  • A mechanism for addins to register and read custom preferences and settings. Addins can rely on external config files and the like, but being able to hook into the preferences dialog would be awesome.
So this will all get into the version 5 beta, right? :)

Comments

Sign In or Register to comment.