source: trunk/org.modelica.mdt/src/org/modelica/mdt/PerspectiveFactory.java @ 51

Last change on this file since 51 was 37, checked in by boris, 19 years ago
  • minor improvments of modelica prespective
File size: 1.3 KB
Line 
1package org.modelica.mdt;
2
3import org.eclipse.ui.IFolderLayout;
4import org.eclipse.ui.IPageLayout;
5import org.eclipse.ui.IPerspectiveFactory;
6import org.eclipse.ui.console.IConsoleConstants;
7
8public class PerspectiveFactory implements IPerspectiveFactory
9{
10
11    public void createInitialLayout(IPageLayout layout)
12    {
13        /* add 'modelica projects' view */
14        IFolderLayout resources = 
15            layout.createFolder("org.modelica.mdt.resourcesArea", 
16                    IPageLayout.LEFT, 0.26f, IPageLayout.ID_EDITOR_AREA);
17        resources.addView("org.modelica.mdt.ProjectsView");
18       
19        /* add console view */
20        IFolderLayout consoleArea = 
21            layout.createFolder("org.modelica.mdt.consoleArea", 
22                    IPageLayout.BOTTOM, 0.75f, IPageLayout.ID_EDITOR_AREA);
23        consoleArea.addView(IConsoleConstants.ID_CONSOLE_VIEW);
24        consoleArea.addPlaceholder(IPageLayout.ID_PROBLEM_VIEW);       
25       
26        /* add new wizards */
27        layout.addNewWizardShortcut("org.modelica.mdt.NewProjectWizard");
28        layout.addNewWizardShortcut("org.modelica.mdt.NewClassWizard");
29        layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");
30        layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");
31       
32        /* add view shortcuts */
33        layout.addShowViewShortcut("org.modelica.mdt.ProjectsView");
34        layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
35    }
36}
Note: See TracBrowser for help on using the repository browser.