views:

668

answers:

2

Can the name and icon of an Eclipse view be programmatically changed? I am referring to the name and icon that appear in the tab for the view - which are specified as XML attributes "name" and "icon" in the <view> element in plugin.xml.

A: 

setPartName(..) in the ViewPart class.

Albert
+3  A: 

setPartName(String) and setTitleImage(Image), both on WorkbenchPart are what you're looking for.

Both EditorParts and ViewPart are extensions of WorkbenchPart.

It should be noted that both these methods are protected so should be called from within the part itself.

jamesh