2012-03-25 111 views
0

我创建了一个IFolderLayout在我看来,当用户关闭该文件夹中的所有视图时,文件夹本身也将被关闭。我想让它留在那里。Eclipse rcp:IFolderLayout,当它关闭所有视图时如何保持文件夹打开

layout.setEditorAreaVisible(false); 
     IFolderLayout functionsViewFolder = layout.createFolder("functionsViewsFolder", IPageLayout.RIGHT, 0.2f, layout.getEditorArea()); 
     functionsViewFolder.addPlaceholder(FunctionView.ID + ":" + FunctionView.SECONDARY_ID + "*"); 

回答

2

覆盖这在WorkbenchWindowAdvisor

public boolean isDurableFolder(String perspectiveId, String folderId) { 
    return true; 
} 

默认情况下,这个返回为假,因此,当文件夹中所有的意见都关闭的文件夹关闭。

重写此方法,并限制为特定的文件夹/透视图或返回true,如上所示将此行为强制为所有透视图/文件夹

相关问题