How to programmatically change name or icon of Eclipse view?
Asked Answered
H

2

8

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.

Hargrave answered 24/11, 2008 at 23:42 Comment(0)
D
9

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.

Derbent answered 25/11, 2008 at 10:0 Comment(1)
I have tried setTitleImage(null) hoping this would result no icon, but it just displays a default icon. I believe this is contrary to what the documentation says.Bayles
H
0

setPartName(..) in the ViewPart class.

Hargrave answered 25/11, 2008 at 1:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.