在pde中隐藏选项卡

时间:2009-10-12 14:54:04

标签: java eclipse eclipse-plugin eclipse-rcp eclipse-pde

我有一位编辑(emf编辑)。我只想要编辑器中的一个选项卡。 如果我不添加其他页面,我仍然会在选项卡选项中看到一个选项卡。我可以隐藏选项卡,因此用户不会看到它是多重编辑器吗?

2 个答案:

答案 0 :(得分:1)

好的......发现它:

//the text must be empty so it will not be shown in the tab
setPageText(index, "");

//hide the tab
CTabFolder tabFolder = (CTabFolder)super.getContainer();
tabFolder.setSingle(true);

答案 1 :(得分:0)

不,MultiPageEditorPart用于多个页面,因此如果您想要一个页面,只需使用EditorPart即可。

我不确定你要做什么?你说你有'EMF编辑'。这是你自己设计的编辑还是你试图覆盖某些东西?