Customizing Menus and Icons
In the driver-specific XML file (e.g., SubversionDriver.xml in the <ASCET installation directory>\SCM\Drivers\ETAS.Subversion directory), you can customize the SCM menu and toolbar.
- The <Command ... /> entries define the available commands.
- The sections <MenuDefinitions>...</MenuDefinitions> and <MenuDefinitions state="Offline">...</MenuDefinitions> contain menu and toolbar definitions for online and offline mode.
- The sections <ASCETMenuBar>...</ASCETMenuBar>, <ASCETToolBar>...</ASCETToolBar> and <ASCETContextMenu>...</ASCETContextMenu> define parts of the SCM menu, the toolbar and parts of the Source Control context menu.
Proceed as follows.
- Open the XML file in a suitable editor.
Edit the <Command ... /> entries.
In the iconID="<name>" entry of a <Command ... />, enter the icon you want to use for this command.
<name> is the file name (without extension) of an *.ico file with size 16px x 16px, placed in the <ASCET installation directory>\SCM\Drivers\ETAS.Subversion\icons directory. A path relative to that directory is allowed.
If you enter an unusable *.ico file (e.g., larger than 16px x 16px), the SCM menu and the Source Control context menu show a dummy icon, and the toolbar ignores the command.
In the label="<text>" entry, enter a name for the command.
<text> is used as menu option and context menu option name and as tooltip for the button.
In the validItemVersionStates="<one or more states>" entry, enter one or more item states that shall be able to use the command.
no_scm | The database/workspace item is not under source control. |
revision | The database/workspace item is under version control, but currently not checked out. |
lockedrevision | The database/workspace item is under version control and checked out. |
modified | The database/workspace item has been modified. |
The same states are available for configurations; the configuration states are named configuration.*. |
To specify more than one state, separate the state names with commas (no blanks).
Commands thus marked are available for items in the specified state(s).
See also Example 1 in Customizing Menus and Icons – Examples.
Edit the SCM menu in the <ASCETMenuBar>...</ASCETMenuBar> section.
Enter <MenuItem id="<command ID>"/> to define a menu item.
<command ID> is the value of the id attribute of the <Command ... /> you want to place in the SCM menu.
- Enter <MenuItem /> to define a separator.
Enter a section <MenuItem label="<submenu name>"> ... </MenuItem> to define a submenu.
Multilevel submenus are possible.
To define the submenu entries, place <MenuItem id="<command ID>"/> and <MenuItem /> lines between <MenuItem label="<submenu name>"> and </MenuItem>.
See also Example 2 and Example 3 in Customizing Menus and Icons – Examples.
Edit the SCM toolbar in the <ASCETToolBar>...</ASCETToolBar> section.
Enter <MenuItem id="<command ID>"/> to define a toolbar button.
<command ID> is the value of the id attribute of the <Command ... /> you want to place in the SCM menu.
Enter <MenuItem /> to define a separator (vertical line).
The toolbar has only one level. A <MenuItem label="<name>"> ... </MenuItem> construction is not possible. |
Edit the Source Control context menu in the <ASCETContextMenu>...</ASCETContextMenu> section.
Enter <MenuItem id="<command ID>"/> to define a menu item.
<command ID> is the value of the id attribute of the <Command ... /> you want to place in the SCM menu.
- Enter <MenuItem /> to define a separator.
Enter a section <MenuItem label="<submenu name>"> ... </MenuItem> to define a submenu.
Multilevel submenus are possible.
To define the submenu entries, place <MenuItem id="<command ID>"/> and <MenuItem /> lines between <MenuItem label="<submenu name>"> and </MenuItem>.
See also Example 2 and Example 3 in Customizing Menus and Icons – Examples.
See also
Customizing Menus and Icons – Examples
Online versus Offline Mode
SCM Menu (with Version Management)
Toolbar