Tabs Studio Blog (organizing Visual Studio document tabs)

October 24, 2010

Using AvalonEdit as a style editor in Tabs Studio

Filed under: Uncategorized — Tags: — Sergey Vlasov @ 1:25 pm

Tabs Studio v2.1.5 makes possible to customize the style editor and the new AvalonStyleEditor add-in uses the AvalonEdit editor from the SharpDevelop IDE for style editing in Tabs Studio:

AvalonEdit style editor in Tabs Studio

AvalonEdit style editor in Tabs Studio

Out of the box AvalonEdit supports XML syntax highlighting, line numbers and block indent (select several lines and press Tab of Shift+Tab). I’ve also added the Ctrl+OemQuestion keyboard shortcut to comment and uncomment selected text.

AvalonEdit is easily extensible – more features like code completion and folding can be added later. Or completely different style editor control can be added to Tabs Studio in a separate add-in.

Download link: AvalonStyleEditor v1.0.0.

Tabs Studio v2.1.5 released

Filed under: Releases — Sergey Vlasov @ 10:05 am

Tabs Studio v2.1.5 released:

  • Added tab activation when dragging text over the tab header.
  • Added automatic Tabs Studio restart after saving changes in the Add-in Manager dialog.
  • Added ability to customize the style editor in Tabs Studio.
  • Added maximized window state and selected tab restoring when reopening the Options dialog.
  • Added support for PowerBuilder .NET 12.0.
  • Removed an error notification when placing a non Tabs Studio add-in dll to the add-in installation folder.
  • Fixed inability to use the tab character in the style editor.

October 20, 2010

Limiting number of tab rows

Filed under: Uncategorized — Tags: , — Sergey Vlasov @ 8:37 am

Due to popular demand and new tabs panel customization capabilities in Tabs Studio v2.1.2, I’ve created the SingleRow add-in that allows you to limit maximum number of tab rows and show remaining tabs in a drop-down list similar to default Visual Studio behavior:

A single row of tabs and the drop-down list of hidden tabs

A single row of tabs and the drop-down list of hidden tabs


To use SingleRow you need to set tabs layout to Wrap and apply the following style changes:
The Wrap tabs layout option

The Wrap tabs layout option

<Style TargetType="TabsStudio:TabsHost" BasedOn="{StaticResource DefaultTabsHostStyle}">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type TabsStudio:TabsHost}">
        <Grid>
          <Rectangle Width="{TemplateBinding Width}"
                     Height="{TemplateBinding Height}"
                     Fill="{TemplateBinding Background}"/>
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="*"/>
              <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <ContentPresenter Grid.Column="0"/>
            <TabsStudioSingleRow:HiddenTabs Grid.Column="1" TabsPanel="{TemplateBinding ContentControl.Content}"/>
          </Grid>
        </Grid>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

<Style TargetType="TabsStudio:Tab" BasedOn="{StaticResource DefaultTabStyle}">
  <Style.Triggers>
    <Trigger Property="TabsStudioSingleRow:Properties.IsTabHidden" Value="True">
      <Setter Property="Visibility"  Value="Collapsed"/>
    </Trigger>
  </Style.Triggers>
</Style>

<Style TargetType="TabsStudioSingleRow:HiddenTabs">
  <Setter Property="Content" Value=">"/>
  <Setter Property="Margin" Value="2,0,2,0"/>
  <Setter Property="VerticalAlignment" Value="Center"/>
  <Style.Triggers>
    <Trigger Property="TabsStudioSingleRow:Properties.IsHiddenTabs" Value="False">
      <Setter Property="Visibility"  Value="Collapsed"/>
    </Trigger>
  </Style.Triggers>
</Style>

This style adds the TabsStudioSingleRow:HiddenTabs button to open the drop-down list and binds it to the corresponding TabsPanel. SingleRow doesn’t actually hide tabs – it only sets the IsTabHidden property for them. The style above sets tab visibility based on this property. HiddenTabs button’s appearance is also defined in this style and the button is collapsed when there are no hidden tabs.

Tabs are hidden in the least recently used order and don’t automatically reappear even when space becomes available. Hidden tabs in the drop-down list are sorted alphabetically.

Default number of tab rows is 1, but you can change it in the SingleRow add-in options dialog:

SingleRow options dialog

SingleRow options dialog


Two rows of tabs and the hidden tabs list

Two rows of tabs and the hidden tabs list


Download link: SingleRow v1.0.0.

October 2, 2010

Running Tabs Studio as a PowerBuilder .NET 12.0 add-in

Filed under: Uncategorized — Sergey Vlasov @ 12:25 pm

Bruce Armstrong wrote detailed exploration how to run most popular Visual Studio add-ins in PowerBuilder .NET 12.0. Here are two steps required to make Tabs Studio run in PowerBuilder:

1. After Tabs Studio installation, add PowerBuilder HostApplication section to the “C:\Users\username\Documents\Visual Studio 2008\Addins\TabsStudio.AddIn” file:

	<HostApplication>
		<Name>PowerBuilder .NET</Name>
		<Version>12.0</Version>
	</HostApplication>

2. Add the “C:\Users\username\Documents\Visual Studio 2008\Addins” path to Add-in File Paths in the PowerBuilder ToolsOptions window:

Path to Visual Studio 2008 addins in PowerBuilder add-in options

Path to Visual Studio 2008 addins in PowerBuilder add-in options


That’s all. After PowerBuilder restart, Tabs Studio will replace default VS 2008 like tabs with multiple rows of customizable tabs:
Tabs Studio tabs in PowerBuilder .NET 12.0 IDE

Tabs Studio tabs in PowerBuilder .NET 12.0 IDE


I will add the PowerBuilder HostApplication section to the next Tabs Studio installer.

Blog at WordPress.com.