Tabs Studio Blog (organizing Visual Studio document tabs)

August 19, 2009

Tabs Studio Extensibility

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 6:29 am

I’m working on an add-in infrastructure for Tabs Studio. I decided to start from writing several simple add-ins and then, based on this experience, form requirements for the Tabs Studio SDK. So, right now SDK is minimal and will change much in the future.

Tabs Studio add-in is a .NET dll that should be placed to the TabsStudioAddins subdirectory of Addins directory. If Tabs Studio was installed to C:\Documents and Settings\[user_name]\My Documents\Visual Studio 2008\Addins then add-in .dll should be copied to C:\Documents and Settings\[user_name]\My Documents\Visual Studio 2008\Addins\TabsStudioAddins directory.

Add-in class should implement TabsStudioExt.ITabsStudioAddin interface to be loaded by Tabs Studio at startup:

namespace TabsStudioExt
{
    public interface ITabsStudioAddin
    {
        void OnConnection(ITabsStudioEngine engine, EnvDTE80.DTE2 dte);
        void OnDisconnection();
    }
}

Only one add-in class per dll is allowed. TabsStudioExt interfaces are declared in the TabsStudioExt.dll that is installed along with the TabsStudio.dll.

TabsStudioExt.ITabsStudioEngine interface offers Tabs Studio methods and events that add-in can use for Tabs Studio customization. Right now it contains only single TabCreated event:

namespace TabsStudioExt
{
    public delegate void TabCreatedEventHandler(object sender, TabCreatedEventArgs e);

    public interface ITabsStudioEngine
    {
        event TabCreatedEventHandler TabCreated;
    }
}

TabCreatedEventArgs has TabItem and TabPanel properties. TabItem is an instance of System.Windows.Controls.TabItem that was just created. TabPanel is an instance of System.Windows.Controls.Primitives.TabPanel tab group for which tab was created.

EnvDTE80.DTE2 dte parameter in OnConnection method offers access to the Visual Studio extensibility model.

2 Comments

  1. Awesome framework! I just made an add-in that does color coded tabs based on the containing project. Keep up the great work!

    Comment by Scott — August 20, 2009 @ 6:44 pm

    • Scott,
      Very impressive that you achieved it with the current SDK! I planned to add much more functionality to make color coded tabs based on the containing project possible.

      Comment by Sergey Vlasov — August 21, 2009 @ 1:15 am


RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Blog at WordPress.com.