Skip to content

Extending: Adding a new Tab

Josh Steinhauer edited this page Dec 12, 2018 · 1 revision

Tabs can be added to the GitGud Window, where one tab is active at a time. All tabs extend the Tab class, and you must use the TabAttribute to allow the window to find it. You can specify a order you wish the tab to be in if you wish.

Example Tab:

//Index 0, so before any of the default tabs
[Tab(index = 0)]
public class MyTab : Tab
{
    public override string GetName()
    {
        return "My Tab";
    }
    
    public override void Render(GitGudWindow window)
    {
        //Do stuff
    }
}

The built-in tabs (Changes, History, Settings) are at index 10,20 and 30, so if you choose index 0, your tab will be before any of the built-in tabs.

Clone this wiki locally