package org.eparapher.rcp.perspective; import org.eclipse.ui.IFolderLayout; import org.eclipse.ui.IPageLayout; import org.eclipse.ui.IPerspectiveFactory; import org.eclipse.ui.console.IConsoleConstants; import org.eparapher.rcp.views.CryptoProvidersView; import org.eparapher.rcp.views.TrustedCertificateStoreView; import org.eparapher.rcp.views.UserCertificateStoreView; public class CertificateStorePerspective implements IPerspectiveFactory { public static final String ID = "org.eparapher.rcp.perspective.certmgr"; private static final String ID_PROGRESSVIEW = "org.eclipse.ui.views.ProgressView"; public void createInitialLayout(IPageLayout layout) { IFolderLayout folder = layout.createFolder("Nav", IPageLayout.TOP, 0.7f, IPageLayout.ID_EDITOR_AREA); folder.addPlaceholder(UserCertificateStoreView.ID + ":" + TrustedCertificateStoreView.ID); folder.addView(UserCertificateStoreView.ID); folder.addView(TrustedCertificateStoreView.ID); IFolderLayout bottomFolder = layout.createFolder("Consoles", IPageLayout.BOTTOM, 0.3f, layout.getEditorArea()); bottomFolder.addPlaceholder(UserCertificateStoreView.ID + ":*"); bottomFolder.addView(ID_PROGRESSVIEW); bottomFolder.addView( IConsoleConstants.ID_CONSOLE_VIEW ); bottomFolder.addView( CryptoProvidersView.ID ); layout.getViewLayout(UserCertificateStoreView.ID).setCloseable(false); layout.getViewLayout(UserCertificateStoreView.ID).setMoveable(false); layout.getViewLayout(TrustedCertificateStoreView.ID).setCloseable(false); layout.getViewLayout(TrustedCertificateStoreView.ID).setMoveable(false); layout.setFixed(true); layout.setEditorAreaVisible(false); layout.addPerspectiveShortcut(CertificateStorePerspective.ID); layout.addPerspectiveShortcut(MyDocumentsPerspective.ID); layout.addShowViewShortcut(UserCertificateStoreView.ID); layout.addShowViewShortcut(TrustedCertificateStoreView.ID); layout.addShowViewShortcut(CryptoProvidersView.ID); layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW); } }