/** * Initializes a tab for the given part. Sets the text, icon, tool tip, etc. This will also be * called whenever a relevant property changes in the part to reflect those changes in the tab. * Subclasses may override to change the appearance of tabs for a particular part. * * @param tabItem tab for the part * @param part the part being displayed */ protected void initTab(TabItem tabItem, IPresentablePart part) { tabItem.setText(part.getName()); tabItem.setToolTipText(part.getTitleToolTip()); Image tabImage = part.getTitleImage(); if (tabImage != tabItem.getImage()) { tabItem.setImage(tabImage); } }