我想創建一個標籤屬性視圖按給定的文章的標籤屬性查看動態標籤:The Eclipse Tabbed Properties View添加在Eclipse
按照文章,org.eclipse.ui.views.properties.tabbed.propertyTabs
擴展點可用於添加新的選項卡。
<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs">
<propertyTabs contributorId="mview.views.SampleView">
<propertyTab
category="sample"
id="mview.ButtonTab"
label="Button"/>
<propertyTab
afterTab="mview.ButtonTab"
category="sample"
id="mview.AdvancedTab"
label="Advanced"/>
</propertyTabs>
</extension>
但在我的情況下,屬性視圖的選項卡因所選項目而異。所以我必須動態地將選項卡添加到擴展中,具體取決於所選的項目。
請建議如何操作。
更新: 這樣做的一種方法(我不確定是否提供建議)正在使用IExtensionRegistry.addContribution()方法。這裏我提供了一個包含所需擴展詳細信息的inputstream對象。這在運行時將標籤添加到屬性視圖。但是,如果選擇列表查看器中的項目,屬性視圖不會更新。請建議,如果這是正確的做法。
非常感謝! – DrKaoliN 2013-09-10 08:45:58