1 5 package org.hibernate.eclipse.console; 6 7 import org.eclipse.ui.IFolderLayout; 8 import org.eclipse.ui.IPageLayout; 9 import org.eclipse.ui.IPerspectiveFactory; 10 11 15 public class HibernateConsolePerspectiveFactory implements IPerspectiveFactory { 16 17 public static final String ID_CONFIGURATION_FOLDERVIEW = "org.hibernate.eclipse.console.ConfigurationFolderView"; public static final String ID_RESULT_FOLDERVIEW = "org.hibernate.eclipse.console.QueryResultsFolderView"; public static final String ID_PROPERTY_SHEET_FOLDERVIEW = "org.hibernate.eclipse.console.PropertiesFolderView"; 22 public static final String ID_QUERYEDITOR_VIEW = "org.hibernate.eclipse.console.views.HQLEditorView"; 23 public static final String ID_CONFIGURATION_VIEW = "org.hibernate.eclipse.console.views.KnownConfigurationsView"; 24 public static final String ID_QUERYRESULTS_VIEW = "org.hibernate.eclipse.console.views.QueryPageTabView"; 25 public static final String ID_PROPERTY_SHEET_VIEW = "org.eclipse.ui.views.PropertySheet"; 26 27 30 public void createInitialLayout(IPageLayout layout) { 31 layout.setEditorAreaVisible(false); 32 IFolderLayout side = 33 layout.createFolder( 34 ID_CONFIGURATION_FOLDERVIEW, 35 IPageLayout.LEFT, 36 0.33F, 37 layout.getEditorArea()); 38 39 side.addView(ID_CONFIGURATION_VIEW); 40 41 IFolderLayout leftBottomLeft = 42 layout.createFolder( 43 ID_PROPERTY_SHEET_FOLDERVIEW, 44 IPageLayout.BOTTOM, 45 0.75F, 46 ID_CONFIGURATION_VIEW 47 ); 48 49 leftBottomLeft.addView(ID_PROPERTY_SHEET_VIEW); 50 51 layout.addView(ID_QUERYEDITOR_VIEW, IPageLayout.TOP, 0.33F, layout.getEditorArea()); 53 IFolderLayout bottomRight = 54 layout.createFolder( 55 ID_RESULT_FOLDERVIEW, 56 IPageLayout.LEFT, 57 0.33F, 58 layout.getEditorArea()); 59 60 bottomRight.addView(ID_QUERYRESULTS_VIEW); 61 bottomRight.addView("org.eclipse.pde.runtime.LogView"); 62 63 layout.setEditorAreaVisible(false); 64 65 } 66 67 } 68 | Popular Tags |