Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
能否以编程方式更改 Eclipse 视图的名称和图标?我指的是视图选项卡中出现的名称和图标 - 在 plugin.xml 的 <view> 元素中指定为 XML 属性“名称”和“图标”。
setPartName(String)和setTitleImage(Image),两者WorkbenchPart都是你要找的。
setPartName(String)
setTitleImage(Image)
WorkbenchPart
EditorParts 和都是ViewPart的扩展WorkbenchPart。
EditorPart
ViewPart
应该注意的是,这两种方法都protected应该从部件本身中调用。
protected
ViewPart 类中的 setPartName(..)。