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.
How to programmatically change name or icon of Eclipse view?
Asked Answered
setPartName(String)
and setTitleImage(Image)
, both on WorkbenchPart
are what you're looking for.
Both EditorPart
s 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.
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
© 2022 - 2024 — McMap. All rights reserved.