1 20 21 package org.apache.directory.ldapstudio.schemas.view.perspectives; 22 23 24 import org.apache.directory.ldapstudio.schemas.Activator; 25 import org.apache.directory.ldapstudio.schemas.view.views.HierarchyView; 26 import org.apache.directory.ldapstudio.schemas.view.views.SchemaElementsView; 27 import org.apache.directory.ldapstudio.schemas.view.views.SchemasView; 28 import org.apache.directory.ldapstudio.schemas.view.views.SearchView; 29 import org.eclipse.ui.IFolderLayout; 30 import org.eclipse.ui.IPageLayout; 31 import org.eclipse.ui.IPerspectiveFactory; 32 33 34 41 public class Perspective implements IPerspectiveFactory 42 { 43 44 public static final String ID = Activator.PLUGIN_ID + ".perspective"; 46 47 50 public void createInitialLayout( IPageLayout layout ) 51 { 52 String placeHolderId = "org.apache.directory.ldapstudio.schemas.placeholder"; 54 layout.setEditorAreaVisible( true ); 55 String editorAreaId = layout.getEditorArea(); 56 57 IFolderLayout topLeftFolder = layout.createFolder( placeHolderId, IPageLayout.LEFT, 0.3f, editorAreaId ); 59 layout.addPlaceholder( placeHolderId, IPageLayout.LEFT, 0.3f, editorAreaId ); 60 61 topLeftFolder.addView( SchemaElementsView.ID ); 63 topLeftFolder.addView( HierarchyView.ID ); 64 layout.addStandaloneView( SchemasView.ID, true, IPageLayout.BOTTOM, 0.5f, placeHolderId ); 65 layout.addStandaloneView( SearchView.ID, true, IPageLayout.BOTTOM, 0.7f, editorAreaId ); 66 67 layout.getViewLayout( SchemaElementsView.ID ).setCloseable( false ); 69 layout.getViewLayout( SchemasView.ID ).setCloseable( false ); 70 layout.getViewLayout( SearchView.ID ).setCloseable( false ); 71 72 layout.addPerspectiveShortcut( "org.apache.directory.ldapstudio.browser.ui.perspective.BrowserPerspective" ); layout.addPerspectiveShortcut( Perspective.ID ); 75 76 layout.addShowViewShortcut( HierarchyView.ID ); 78 layout.addShowViewShortcut( SchemaElementsView.ID ); 79 layout.addShowViewShortcut( SchemasView.ID ); 80 layout.addShowViewShortcut( SearchView.ID ); 81 } 82 } 83 | Popular Tags |