My wife and kids are leaving for holiday (without me). Bad thing is that I will miss them, good thing is that I will finally finish my SSMS add-in I promised. If you are not aware about it, read here why I am developing it.
After this SSMS add-in development experience I truly admire Red Gate developers for what magic they can do within their SSMS add-ins (especially Red Gate Source Control). It is really biggest development headache I ever had. One example for all – I was trying to be precise as guys from Red Gate are and put icon to SSMS menu items (I can’t sleep without that!). It perfectly distinguishes which menu items belong to which add-in, especially if you have several different add-ins installed:
It was easy but you can’t use traditional TreeView techniques because SSMS disposes and recreates context menu on every click. That’s why I solved it by ContextMenuStripChanged event and push my commands if context menu exists.
It’s not interesting as next point.
This was to put icon on SSMS Tools menu item:
I thought – ok, you’re former MS Certified Solution Developer for Winforms .NET, no problem to put it there… NO! It’s even not possible in C# I had to ask my friend who is familiar with C++ to do that!
You must create satellite assembly in C++ and register your menu item using this code:
var command = commands.AddNamedCommand2( (AddIn)addInInst, "ShowSQLTreeoSettings", "SQL Treeo", "Displays the SQL Treeo Settings Dialog", false, 101, ref contextGuids)
Where 5th is information to get icon from own resource and 6th parameter is identifier of the icon resource. Whole Google and Interet is almost silence about that, it took couple of hours
Anyway, here is “list” of features which should work now:
- Create custom folders in SSMS’s object explorer using drag&drop. It works for databases, stored procedures, functions, views and tables
- Ctrl+click on object will bring ALTER script (my favourite)
- Perform bulk operations in explorer-style management dialog – I did that because I while I was refactoring and re-foldering more objects, drag&drop was not enough
If you’re interested in more features you can let me know here.
Please bear with me, it will be available soon.
PS: I found out that I wasn’t receiving any emails from contact form during last week, if you registered for notification of release, I probably didn’t get your email.
Jakub Dvorak @ www.sqltreeo.com