Commit 0bd6450a authored by Martti Käärik's avatar Martti Käärik
Browse files

Updated perspective layout and added some shortcuts.

parent a3fbf344
Loading
Loading
Loading
Loading
+1 −28
Original line number Diff line number Diff line
@@ -7,40 +7,13 @@
            class="org.etsi.mts.tdl.perspective.TDLPerspectiveFactory"
            fixed="true"
            id="org.etsi.mts.tdl.perspective.mainPerspective"
            name="TDL Perspective">
            name="TDL">
      </perspective>
   </extension>
   <extension
         point="org.eclipse.ui.perspectiveExtensions">
      <perspectiveExtension
            targetID="org.etsi.mts.tdl.perspective.mainPerspective">
            <view
                  id="org.eclipse.jdt.ui.PackageExplorer"
                  minimized="false"
                  moveable="false"
                  ratio="0.2"
                  relationship="left"
                  relative="org.eclipse.ui.console.ConsoleView"
                  visible="true">
            </view>
            <view
                  id="org.eclipse.ui.console.ConsoleView"
                  minimized="false"
                  moveable="false"
                  ratio="0.2"
                  relationship="bottom"
                  relative="org.eclipse.ui.editorss"
                  visible="true">
            </view>
            <view
                  id="org.eclipse.ui.internal.introview"
                  minimized="false"
                  moveable="false"
                  ratio="0.5"
                  relationship="bottom"
                  relative="org.eclipse.jdt.ui.PackageExplorer"
                  visible="true">
            </view>
      </perspectiveExtension>
   </extension>

+45 −0
Original line number Diff line number Diff line
package org.etsi.mts.tdl.perspective;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

@@ -9,6 +10,50 @@ public class TDLPerspectiveFactory implements IPerspectiveFactory {
	public void createInitialLayout(IPageLayout layout) {
		// TODO Auto-generated method stub

        layout.addNewWizardShortcut("org.etsi.mts.tdl.ui.wizard.TDLtxNewProjectWizard");
        layout.addNewWizardShortcut("org.eclipse.xtext.ui.wizard.template.TemplateNewFileWizard");
        layout.addNewWizardShortcut("org.etsi.mts.tdl.graphical.viewpoint.projectWizard");
        
        
        layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
        layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
        layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);

        // Editors are placed for free.
        String editorArea = layout.getEditorArea();
        
        IFolderLayout nearLeft = layout.createFolder("nearLeft", IPageLayout.LEFT, 0.25f, editorArea);
        nearLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
        
        IFolderLayout explorerBottom = layout.createFolder("editorBottom", IPageLayout.BOTTOM, 0.55f, "nearLeft");
        explorerBottom.addView(IPageLayout.ID_OUTLINE);
        
        IFolderLayout editorBottom = layout.createFolder("editorBottom", IPageLayout.BOTTOM, 0.6f, editorArea);
        editorBottom.addView(IPageLayout.ID_PROP_SHEET);
        editorBottom.addView(IPageLayout.ID_PROBLEM_VIEW);
        
        /*
        layout.addNewWizardShortcut(PROJECT_WIZARD);
        layout.addShowViewShortcut(MODEL_VIEW);
        layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
        layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);

        // Editors are placed for free.
        String editorArea = layout.getEditorArea();
        
        IFolderLayout nearLeft = layout.createFolder("nearLeft", IPageLayout.LEFT, 0.55f, editorArea);
        nearLeft.addView(MODEL_VIEW);
        
        IFolderLayout farLeft = layout.createFolder("farLeft", IPageLayout.LEFT, 0.4f, "nearLeft");
        farLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
        
        IFolderLayout editorBottom = layout.createFolder("editorBottom", IPageLayout.BOTTOM, 0.6f, editorArea);
        editorBottom.addView(IPageLayout.ID_PROP_SHEET);
        editorBottom.addView(IPageLayout.ID_PROBLEM_VIEW);
        
        IFolderLayout nearBottom = layout.createFolder("nearBottom", IPageLayout.BOTTOM, 0.6f, "nearLeft");
        nearBottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
        */
	}

}