Java 类org.eclipse.ui.IPageLayout 实例源码

项目:neoscada    文件:ScadaPerspectiveFactory.java   
@SuppressWarnings ( "deprecation" )
@Override
public void createInitialLayout ( final IPageLayout factory )
{
    final IFolderLayout topLeft = factory.createFolder ( "topLeft", IPageLayout.LEFT, 0.25f, factory.getEditorArea () );
    topLeft.addPlaceholder ( IPageLayout.ID_RES_NAV );
    topLeft.addView ( JavaUI.ID_PACKAGES );
    topLeft.addPlaceholder ( JavaUI.ID_TYPE_HIERARCHY );
    topLeft.addView ( "org.eclipse.scada.core.ui.connection.ConnectionView" ); //$NON-NLS-1$

    final IFolderLayout bottom = factory.createFolder ( "bottomRight", IPageLayout.BOTTOM, 0.75f, factory.getEditorArea () );
    bottom.addView ( "org.eclipse.pde.runtime.LogView" ); //$NON-NLS-1$
    bottom.addView ( IPageLayout.ID_TASK_LIST );
    bottom.addView ( IPageLayout.ID_PROBLEM_VIEW );

    factory.addView ( IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, 0.75f, factory.getEditorArea () );

    factory.addNewWizardShortcut ( "org.eclipse.pde.ui.NewProjectWizard" ); //$NON-NLS-1$
    factory.addNewWizardShortcut ( "org.eclipse.pde.ui.NewFeatureProjectWizard" ); //$NON-NLS-1$
}
项目:scanning    文件:XcenPerspective.java   
/**
 * Creates the initial layout for a page.
 */
@Override
public void createInitialLayout(IPageLayout layout) {

    layout.setEditorAreaVisible(false);
    layout.addView("org.eclipse.scanning.example.xcen.ui.views.XcenDiagram", IPageLayout.LEFT, 0.40f, IPageLayout.ID_EDITOR_AREA);
    layout.addView("org.eclipse.scanning.example.xcen.ui.views.XcenView", IPageLayout.RIGHT, 0.60f, IPageLayout.ID_EDITOR_AREA);

    /*
        -submit dataacq.xcen.SUBMISSION_QUEUE
        -topic dataacq.xcen.STATUS_TOPIC
        -status dataacq.xcen.STATUS_QUEUE
        -bundle org.eclipse.scanning.example.xcen
        -consumer org.eclipse.scanning.example.xcen.consumer.XcenConsumer
     */
    IFolderLayout folderLayout = layout.createFolder("folder", IPageLayout.BOTTOM, 0.5f, "org.eclipse.scanning.example.xcen.ui.views.XcenView");
    folderLayout.addView(XcenServices.getQueueViewSecondaryId());
    folderLayout.addView("org.eclipse.scanning.event.ui.consumerView");

}
项目:time4sys    文件:Time4SysPerspective.java   
/**
 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
 */
@Override
public void createInitialLayout(IPageLayout layout_p) {
    // Allow editors.
    layout_p.setEditorAreaVisible(true);
    layout_p.createPlaceholderFolder(CENTER_AREA, IPageLayout.LEFT, 0.99f, IPageLayout.ID_EDITOR_AREA);

    IFolderLayout topLeft = layout_p.createFolder(TOPLEFT_AREA, IPageLayout.LEFT,
            (IPageLayout.DEFAULT_VIEW_RATIO / 2), IPageLayout.ID_EDITOR_AREA);
    topLeft.addView(MODEL_EXPLORER_ID);

    IFolderLayout bottomLeft = layout_p.createFolder(BOTTOMLEFT_AREA, IPageLayout.BOTTOM,
            (IPageLayout.DEFAULT_VIEW_RATIO / 0.7f), TOPLEFT_AREA);
    bottomLeft.addView(OUTLINE_ID);

    IFolderLayout bottom = layout_p.createFolder(BOTTOM_AREA, IPageLayout.BOTTOM,
            (IPageLayout.DEFAULT_VIEW_RATIO / 0.7f), IPageLayout.ID_EDITOR_AREA);
    bottom.addView(PROPERTIES_ID);
    bottom.addView(CONTEXTUAL_EXPLORER_ID);
}
项目:subclipse    文件:SVNPerspective.java   
/**
 * Defines the initial actions for a page.  
 */

public void defineActions(IPageLayout layout) {

    // Add "new wizards". They will be present in File/New menu
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); //$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$

    // Add "show views". They will be present in "show view" menu
    layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
    layout.addShowViewShortcut(ISVNUIConstants.HISTORY_VIEW_ID);
    layout.addShowViewShortcut(RepositoriesView.VIEW_ID);
    layout.addShowViewShortcut(ISynchronizeView.VIEW_ID);

    // Add  "perspective short cut"
    layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
    layout.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective"); //$NON-NLS-1$
}
项目:DICE-Platform    文件:DicePerspective.java   
private void defineActions(IPageLayout layout) {
    // Add File New Item
    layout.addNewWizardShortcut("org.dice.rcp.wizard.project.generic");
    layout.addNewWizardShortcut("org.dice.rcp.wizard.project.qualitytesting");
    layout.addNewWizardShortcut("org.eclipse.papyrus.uml.diagram.wizards.createproject");
    layout.addNewWizardShortcut("org.eclipse.papyrus.uml.diagram.wizards.createmodel");

    // Add "show views".
    layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
    layout.addShowViewShortcut("org.eclipse.papyrus.views.modelexplorer.modelexplorer");
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut("org.eclipse.ui.console.ConsoleView");
    layout.addShowViewShortcut("org.tigris.subversion.subclipse.ui.repository.RepositoriesView");
    layout.addShowViewShortcut("org.eclipse.egit.ui.RepositoriesView");
    layout.addShowViewShortcut("es.unizar.disco.simulation.ui.views.InvocationsView");
    layout.addShowViewShortcut("DICE-Configuration-IDE-View");
    layout.addShowViewShortcut("org.eclipse.ui.cheatsheets.views.CheatSheetView");

    // Add Perspectives
    layout.addPerspectiveShortcut(ID);
    layout.addPerspectiveShortcut("org.eclipse.papyrus.infra.core.perspective");
    layout.addPerspectiveShortcut("org.eclipse.jdt.ui.JavaPerspective");
}
项目:DICE-Platform    文件:DicePerspective.java   
private void defineLayout(IPageLayout layout) {
    layout.createFolder("left", IPageLayout.LEFT, 0.2f, layout.getEditorArea());
    layout.createFolder("leftTop", IPageLayout.TOP, 0.33f, "left").addView(IPageLayout.ID_PROJECT_EXPLORER);
    layout.createFolder("leftMiddle", IPageLayout.TOP, 0.5f, "left")
            .addView("org.eclipse.papyrus.views.modelexplorer.modelexplorer");
    layout.createFolder("leftBottom", IPageLayout.TOP, 0.5f, "left").addView(IPageLayout.ID_OUTLINE);

    layout.createFolder("bottom", IPageLayout.BOTTOM, 0.7f, layout.getEditorArea());
    IFolderLayout bottomTabs = layout.createFolder("bottomTabs", IPageLayout.TOP, 1f, "bottom");
    bottomTabs.addPlaceholder("*");
    bottomTabs.addView(IPageLayout.ID_PROP_SHEET);
    bottomTabs.addView("org.eclipse.ui.console.ConsoleView");
    bottomTabs.addView("org.tigris.subversion.subclipse.ui.repository.RepositoriesView");
    bottomTabs.addView("org.eclipse.egit.ui.RepositoriesView");
    bottomTabs.addView("es.unizar.disco.simulation.ui.views.InvocationsView");
    bottomTabs.addView("DICE-Configuration-IDE-View");
    bottomTabs.addView("org.eclipse.ui.cheatsheets.views.CheatSheetView");
}
项目:angular-eclipse    文件:AngularPerspectiveFactory.java   
@Override
public void createInitialLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);
    left.addPlaceholder(IPageLayout.ID_RES_NAV);

    IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
    bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

    bottom.addPlaceholder(TemplatesView.ID);
    bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
    bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
    bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
    bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
    bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
    bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);

    layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);

}
项目:ermasterr    文件:ERDiagramMultiPageEditor.java   
/**
 * {@inheritDoc}
 */
@Override
protected Composite createPageContainer(final Composite parent) {
    try {
        final IWorkbenchPage page = getSite().getWorkbenchWindow().getActivePage();

        if (page != null) {
            page.showView(IPageLayout.ID_OUTLINE);
        }

    } catch (final PartInitException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }

    return super.createPageContainer(parent);
}
项目:CodeCheckerEclipsePlugin    文件:CodeCheckerPerspectiveFactory.java   
private void defineActions(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.26,
            editorArea);
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);

    IFolderLayout middleLeft = layout.createFolder("middleLeft", IPageLayout.BOTTOM, (float)
            0.33, "left");
    middleLeft.addView(ReportListView.ID);
    middleLeft.addView(ReportListViewProject.ID);

    IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT, (float) 0.8,
            editorArea);
    right.addView(IConsoleConstants.ID_CONSOLE_VIEW);
    right.addView(IPageLayout.ID_OUTLINE);
    right.addView(IPageLayout.ID_TASK_LIST);

    IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.8,
            editorArea);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
}
项目:ermaster-k    文件:ERDiagramMultiPageEditor.java   
/**
 * {@inheritDoc}
 */
@Override
protected Composite createPageContainer(Composite parent) {
    try {
        IWorkbenchPage page = this.getSite().getWorkbenchWindow()
                .getActivePage();

        if (page != null) {
            page.showView(IPageLayout.ID_OUTLINE);
        }

    } catch (PartInitException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }

    return super.createPageContainer(parent);
}
项目:typescript.java    文件:TypeScriptPerspectiveFactory.java   
@Override
public void createInitialLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);
    left.addPlaceholder(IPageLayout.ID_RES_NAV);

    IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
    bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

    bottom.addPlaceholder(TemplatesView.ID);
    bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
    bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
    bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
    bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
    bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
    bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);

    layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);

}
项目:ForgedUI-Eclipse    文件:TitaniumPerspectiveFactory.java   
@Override
public void createInitialLayout(IPageLayout layout) {

    final String editorArea = layout.getEditorArea();

    // Top left:
    IFolderLayout topLeft = layout.createFolder(ID_FOLDER_TOP_LEFT, IPageLayout.LEFT, 0.25f, editorArea);
    topLeft.addView(IPageLayout.ID_RES_NAV);
    //topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);

    // Bottom left: Outline view
    IFolderLayout bottomLeft = layout.createFolder(ID_FOLDER_BOTTOM_LEFT, IPageLayout.BOTTOM, 0.50f, ID_FOLDER_TOP_LEFT);
    bottomLeft.addView(IPageLayout.ID_OUTLINE);

    // Bottom: Property Sheet view
    IFolderLayout bottom = layout.createFolder(ID_FOLDER_BOTTOM, IPageLayout.BOTTOM, 0.75f, editorArea);
    bottom.addView(IPageLayout.ID_PROP_SHEET);

    layout.setEditorAreaVisible(true);
}
项目:NEXCORE-UML-Modeler    文件:UMLPerspectiveFactory.java   
/**
 * add Views
 */
private void addViews() {
    // left
    IFolderLayout left = fLayout.createFolder(UICoreConstant.PROJECT_CONSTANTS__LEFT,
        IPageLayout.LEFT,
        0.20f,
        fLayout.getEditorArea());
    left.addView(UICoreConstant.PROJECT_CONSTANTS__PROJECT_EXPLORER_ID);
    left.addView(JavaUI.ID_PACKAGES);

    // bottom
    IFolderLayout bottom = fLayout.createFolder(UICoreConstant.PROJECT_CONSTANTS__BOTTOM,
        IPageLayout.BOTTOM,
        0.72f,
        fLayout.getEditorArea());
    bottom.addView(IPageLayout.ID_PROP_SHEET);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);

    // right
    IFolderLayout right = fLayout.createFolder(UICoreConstant.PROJECT_CONSTANTS__RIGHT,
        IPageLayout.RIGHT,
        0.80f,
        fLayout.getEditorArea());
    right.addView(IPageLayout.ID_OUTLINE);
}
项目:statecharts    文件:ModelingPerspectiveFactory.java   
private void defineLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
            0.16f, editorArea);
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);
    // Included to get rid of a warning issued by the workbench
    left.addPlaceholder("org.eclipse.jdt.ui.PackageExplorer");

    IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT,
            0.84f, editorArea);
    right.addView(IPageLayout.ID_OUTLINE);

    IFolderLayout bottom = layout.createFolder("bottom",
            IPageLayout.BOTTOM, 0.65f, editorArea);
    bottom.addView(IPageLayout.ID_PROP_SHEET);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottom.addView(IPageLayout.ID_TASK_LIST);
}
项目:statecharts    文件:SimulationPerspectiveFactory.java   
private void defineLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.16f, editorArea);
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);
    // Included to get rid of a warning issued by the workbench
    left.addPlaceholder("org.eclipse.jdt.ui.PackageExplorer");

    IFolderLayout bottomleft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.68f, "left");
    bottomleft.addView(IPageLayout.ID_OUTLINE);

    IFolderLayout bottomRight = layout.createFolder("right", IPageLayout.RIGHT, 0.76f, editorArea);
    bottomRight.addView("org.yakindu.sct.simulation.ui.declarationview");
    bottomRight.addView("org.eclipse.debug.ui.BreakpointView");
    bottomRight.addView("org.yakindu.sct.simulation.snapshots.ui.snapshotsview");
    bottomRight.addPlaceholder("org.eclipse.debug.ui.DebugView");
}
项目:JuliaDT    文件:JuliaPerspective.java   
protected void addFolders(IPageLayout layout) {
  IFolderLayout leftFolder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2, //$NON-NLS-1$
      layout.getEditorArea());
  leftFolder.addView(DLTKUIPlugin.ID_SCRIPT_EXPLORER);
  leftFolder.addView("org.eclipse.dltk.testing.ResultView"); //$NON-NLS-1$
  leftFolder.addPlaceholder("org.eclipse.dltk.ui.TypeHierarchy"); //$NON-NLS-1$
  leftFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);

  IFolderLayout bottomFolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, //$NON-NLS-1$
      layout.getEditorArea());
  bottomFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
  bottomFolder.addView(IPageLayout.ID_TASK_LIST);
  bottomFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);

  bottomFolder.addPlaceholder("org.eclipse.dltk.callhierarchy.view"); //$NON-NLS-1$
  bottomFolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
  bottomFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
项目:afbb-bibo    文件:Perspective.java   
@Override
public void createInitialLayout(final IPageLayout layout) {
    final String editorArea = layout.getEditorArea();
    layout.setEditorAreaVisible(false);

    layout.addStandaloneView(NavigationView.ID, false, IPageLayout.LEFT, 0.05f, editorArea);
    final IFolderLayout folder = layout.createFolder("de.afbb.bibo.ui.category.main", IPageLayout.RIGHT, 0.30f,
            NavigationView.ID);
    folder.addPlaceholder(WelcomeView.ID);
    folder.addPlaceholder(BorrowerView.ID);
    folder.addPlaceholder(LendCopyView.ID);
    folder.addPlaceholder(RegisterCopyView.ID);
    folder.addPlaceholder(ReturnCopyView.ID);
    layout.getViewLayout(NavigationView.ID).setCloseable(false);
    layout.getViewLayout(NavigationView.ID).setMoveable(false);
}
项目:mondo-demo-wt    文件:WTSpec4MEditorAdvisor.java   
/**
 * @see org.eclipse.ui.IPerspectiveFactory#createInitialLayout(org.eclipse.ui.IPageLayout)
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void createInitialLayout(IPageLayout layout) {
    layout.setEditorAreaVisible(true);
    layout.addPerspectiveShortcut(ID_PERSPECTIVE);

    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float)0.33, layout.getEditorArea());
    left.addView(ModelExplorer.ID);
    IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, (float)0.90, "left");
    bottomLeft.addView(CurrentUserView.ID);


    IFolderLayout topRight = layout.createFolder("topRight", IPageLayout.RIGHT, (float)0.55, layout.getEditorArea());
    topRight.addView(WhiteboardChatView.ID);
    IFolderLayout right = layout.createFolder("right", IPageLayout.BOTTOM, (float)0.33, "topRight");
    right.addView(ModelLogView.ID);
    IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, (float)0.60, "right");
    bottomRight.addView(IPageLayout.ID_PROP_SHEET);
            }
项目:scouter    文件:PerspectiveStackAnalyzer.java   
public void createInitialLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();
    layout.setEditorAreaVisible(false);

    IFolderLayout agentLayout = layout.createFolder(IConstants.LAYOUT_WASSERVICE_OBJECT_NAVIGATION, IPageLayout.LEFT, 0.20f, editorArea);
    agentLayout.addPlaceholder(ObjectNavigationView.ID + ":*");
    agentLayout.addPlaceholder(ObjectDailyListView.ID + ":*");
    agentLayout.addPlaceholder(GroupNavigationView.ID);
    agentLayout.addView(ObjectNavigationView.ID);
    layout.getViewLayout(ObjectNavigationView.ID).setCloseable(false); 

    IFolderLayout mainLayout = layout.createFolder("perspective.stack.main", IPageLayout.LEFT, 1.0f, editorArea);
    mainLayout.addView(StackAnalyzerView.ID);
    layout.getViewLayout(StackAnalyzerView.ID).setCloseable(false); 

    IFolderLayout explorerFolder = layout.createFolder("perspective.stack.explorer", IPageLayout.BOTTOM, 0.5f, IConstants.LAYOUT_WASSERVICE_OBJECT_NAVIGATION);
    explorerFolder.addView(WorkspaceExplorer.ID);

    layout.addPerspectiveShortcut(getId());
}
项目:SecureBPMN    文件:ActivitiPerspective.java   
/**
 * Defines the initial actions for a page.
 * 
 * @param layout
 *            The layout we are filling
 */
private void defineActions(IPageLayout layout) {
    // Add "new wizards".
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$

    // Add "show views".
    layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER);
    layout.addShowViewShortcut(IPageLayout.ID_BOOKMARKS);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_PROP_SHEET);
    layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_PROGRESS_VIEW);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);

    layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
}
项目:SecureBPMN    文件:ActivitiPerspective.java   
/**
 * Defines the initial layout for a page.
 * 
 * @param layout
 *            The layout we are filling
 */
private void defineLayout(IPageLayout layout) {
    // Editors are placed for free.
    String editorArea = layout.getEditorArea();

    // Top left.
    IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea);//$NON-NLS-1$
    topLeft.addView("org.eclipse.jdt.ui.PackageExplorer");
    topLeft.addView(IPageLayout.ID_PROJECT_EXPLORER);
    topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);

    // Bottom left.
    IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, (float) 0.50,//$NON-NLS-1$
            "topLeft");//$NON-NLS-1$
    bottomLeft.addView(IPageLayout.ID_OUTLINE);
    bottomLeft.addView("org.eclipse.graphiti.ui.internal.editor.thumbnailview");

    // Bottom right.
    IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, (float) 0.66,//$NON-NLS-1$
            editorArea);
    bottomRight.addView(IPageLayout.ID_PROP_SHEET);
    bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottomRight.addView("org.eclipse.ant.ui.views.AntView");
    bottomRight.addView("org.eclipse.pde.runtime.LogView");
}
项目:jdepend4eclipse    文件:JDependPerspectiveFactory.java   
@Override
public void createInitialLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();

    layout.setEditorAreaVisible(false);

    IFolderLayout top =
            layout.createFolder("top", IPageLayout.TOP, 1f, editorArea);  //$NON-NLS-1$
    top.addView(DependencyView.ID);
    top.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);

    IFolderLayout bottom_left =
            layout.createFolder("bottom_left", IPageLayout.LEFT, 0.3f, DependencyView.ID);  //$NON-NLS-1$
    bottom_left.addView(MetricsView.ID);

    IFolderLayout left =
            layout.createFolder("left", IPageLayout.TOP, 0.7f, MetricsView.ID);    //$NON-NLS-1$
    left.addView(PackageTreeView.ID);
}
项目:CooperateModelingEnvironment    文件:CooperatePerspective.java   
private static void defineLayout(IPageLayout layout) {
    String editorArea = layout.getEditorArea();
    final String bottom = "bottom";
    final String left = "left";

    layout.createFolder(left, IPageLayout.LEFT, (float) 0.23, editorArea);

    IFolderLayout lefttop = layout.createFolder("lefttop", IPageLayout.TOP, (float) 0.35, left);
    lefttop.addView(IPageLayout.ID_PROJECT_EXPLORER);

    IFolderLayout leftbottom = layout.createFolder("leftbottom", IPageLayout.BOTTOM, (float) 0.65, left);
    leftbottom.addView(IPageLayout.ID_OUTLINE);

    layout.createFolder(bottom, IPageLayout.BOTTOM, (float) 0.65, editorArea);

    IFolderLayout bottomleft = layout.createFolder("bottomleft", IPageLayout.LEFT, (float) 0.5, bottom);
    bottomleft.addView(IPageLayout.ID_PROP_SHEET);
    bottomleft.addView("de.cooperateproject.ui.focus.views.FocusView");
    // Exchange with addView once Branch AccessibleDiff is merged to master
    bottomleft.addPlaceholder("de.cooperateproject.ui.diff.views.DiffView");

    IFolderLayout bottomright = layout.createFolder("bottomright", IPageLayout.RIGHT, (float) 0.5, bottom);
    bottomright.addView(IPageLayout.ID_PROBLEM_VIEW);
    bottomright.addView("org.eclipse.papyrus.views.validation.ModelValidationView");
}
项目:APICloud-Studio    文件:InvasiveThemeHijacker.java   
protected void hijackOutline()
{
    IWorkbenchPage page = UIUtils.getActivePage();
    if (page != null)
    {
        IViewReference[] refs = page.getViewReferences();
        for (IViewReference ref : refs)
        {
            if (ref.getId().equals(IPageLayout.ID_OUTLINE))
            {
                hijackView(ref.getView(false), false);
                return;
            }
        }
    }
}
项目:APICloud-Studio    文件:SVNPerspective.java   
/**
 * Defines the initial actions for a page.  
 */

public void defineActions(IPageLayout layout) {

    // Add "new wizards". They will be present in File/New menu
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); //$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
    layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); //$NON-NLS-1$

    // Add "show views". They will be present in "show view" menu
    layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);
    layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
    layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
    layout.addShowViewShortcut(ISVNUIConstants.HISTORY_VIEW_ID);
    layout.addShowViewShortcut(RepositoriesView.VIEW_ID);
    layout.addShowViewShortcut(ISynchronizeView.VIEW_ID);

    // Add  "perspective short cut"
    layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); //$NON-NLS-1$
    layout.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective"); //$NON-NLS-1$
}
项目:APICloud-Studio    文件:IndexView.java   
/**
 * addListeners
 */
private void addListeners()
{
    // this.listenForScriptChanges();
    ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();

    // @formatter:off
    selectionService.addPostSelectionListener(
        IPageLayout.ID_PROJECT_EXPLORER,
        new ISelectionListener() {
            public void selectionChanged(IWorkbenchPart part, ISelection selection)
            {
                if (part != IndexView.this && selection instanceof IStructuredSelection)
                {
                    setInputFromSelection(selection);
                }
            }
        }
    );
    // @formatter:on
}
项目:APICloud-Studio    文件:WebPerspectiveFactory.java   
public void createInitialLayout(IPageLayout layout)
{
    // Get the editor area
    String editorArea = layout.getEditorArea();

    // Left
    IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.20f, editorArea); //$NON-NLS-1$
    left.addView(IPageLayout.ID_PROJECT_EXPLORER);
    left.addPlaceholder(APP_EXPLORER_ID);
    left.addPlaceholder("com.aptana.ui.io.remoteview"); //$NON-NLS-1$

    // Bottom right: Console. Had to leave this programmatic to get the Console appear in bottom right
    IFolderLayout bottomArea = layout.createFolder("terminalArea", IPageLayout.BOTTOM, 0.75f, //$NON-NLS-1$
            editorArea);
    bottomArea.addView(IConsoleConstants.ID_CONSOLE_VIEW);
    bottomArea.addPlaceholder("com.aptana.terminal.views.terminal:*"); //$NON-NLS-1$

    UIUtils.setCoolBarVisibility(true);
}
项目:mytourbook    文件:PerspectiveFactoryRawData.java   
@Override
public void createInitialLayout(final IPageLayout layout) {

    layout.setEditorAreaVisible(false);

    //--------------------------------------------------------------------------------

    final IFolderLayout leftFolder = layout.createFolder(FOLDER_ID_LEFT,//
            IPageLayout.LEFT,
            0.4f,
            IPageLayout.ID_EDITOR_AREA);

    leftFolder.addView(RawDataView.ID);

    //--------------------------------------------------------------------------------

    final IFolderLayout topFolder = layout.createFolder(FOLDER_ID_TOP,//
            IPageLayout.TOP,
            0.5f,
            IPageLayout.ID_EDITOR_AREA);

    topFolder.addView(TourChartView.ID);
    topFolder.addPlaceholder(TourLogView.ID);
}
项目:jo-widgets    文件:DynamicPerspective.java   
private String layoutFirst(
    final IPageLayout layout,
    final IViewContainerContext viewContainerContext,
    final int relation,
    final float ratio,
    final String relativeTo) {
    if (viewContainerContext instanceof SplitViewContainerContext) {
        final SplitViewContainerContext splitViewContainerContext = (SplitViewContainerContext) viewContainerContext;
        final String firstViewId = layoutFirst(layout, splitViewContainerContext.getFirst(), relation, ratio, relativeTo);
        return firstViewId;
    }
    if (viewContainerContext instanceof SingleViewContainerContext) {
        final SingleViewContainerContext singleViewContainerContext = (SingleViewContainerContext) viewContainerContext;
        return layoutSingle(layout, singleViewContainerContext, relation, ratio, relativeTo);
    }
    if (viewContainerContext instanceof TabViewContainerContext) {
        final TabViewContainerContext tabViewContainerContext = (TabViewContainerContext) viewContainerContext;
        return layoutViewList(layout, tabViewContainerContext, relation, ratio, relativeTo);
    }
    throw new IllegalArgumentException("view container context type");
}
项目:jo-widgets    文件:DynamicPerspective.java   
private void layoutRest(final IPageLayout layout, final IViewContainerContext viewContainerContext, final String relativeTo) {
    if (viewContainerContext instanceof SplitViewContainerContext) {
        final SplitViewContainerContext splitViewContainerContext = (SplitViewContainerContext) viewContainerContext;
        final ISplitLayout splitViewContainer = splitViewContainerContext.getViewContainer();
        final float innerRatio = (float) splitViewContainer.getWeight();
        final int innerRelation = splitViewContainer.getOrientation().equals(Orientation.VERTICAL)
                ? IPageLayout.BOTTOM : IPageLayout.RIGHT;
        final String secondViewId = layoutFirst(
                layout,
                splitViewContainerContext.getSecond(),
                innerRelation,
                innerRatio,
                relativeTo);
        layoutRest(layout, splitViewContainerContext.getFirst(), relativeTo);
        layoutRest(layout, splitViewContainerContext.getSecond(), secondViewId);
    }
}
项目:jo-widgets    文件:DynamicPerspective.java   
private String layoutSingle(
    final IPageLayout layout,
    final SingleViewContainerContext viewContainerContext,
    final int relation,
    final float ratio,
    final String relativeTo) {
    final String viewId;
    if (viewContainerContext.isRcpView()) {
        viewId = viewContainerContext.getViewId();
    }
    else {
        viewId = DynamicView.ID + ":" + viewContainerContext.getViewId();
    }
    layout.addView(viewId, relation, ratio, relativeTo);
    layout.getViewLayout(viewId).setCloseable(viewContainerContext.isCloseable());
    layout.getViewLayout(viewId).setMoveable(viewContainerContext.isDetachable());
    return viewId;
}
项目:OpenSPIFe    文件:PlanningPerspectiveFactory.java   
/**
 * Creates the initial planning perspective layout.
 */
@Override
public void createInitialLayout(IPageLayout layout) {
    super.createInitialLayout(layout);
    layout.setEditorAreaVisible(true);
    addViewByEditor(layout, DETAIL_VIEW, IPageLayout.RIGHT, 0.75f);
    if (showActivityDictionaryView()) {
        addViewByEditor(layout, DICTIONARY_VIEW, IPageLayout.BOTTOM, 0.6f);
    } else {
        addViewPlaceholderByEditor(layout, DICTIONARY_VIEW, IPageLayout.BOTTOM, 0.6f);
    }
    setViewMovableNotClosable(layout, DICTIONARY_VIEW);
    // We register the detail view, because we constructed it as part of this method and
    // also in the plugin.xml.  It is registered here for layout purposes, and registered
    // in the plugin.xml to define the plugin id so that it can be retrieved by ClassIdRegistry. (see DetailView.ID)
    ForbiddenWorkbenchUtils.registerExistingParts(Collections.singletonList(DETAIL_VIEW));
    // Because the extension mechanism processes extensions in alphabetical order, we use
    // our method to register them first, in the order in which the dependencies require
    // them to be registered.
    ForbiddenWorkbenchUtils.instantiatePerspectiveExtension(layout);
}
项目:ermaster-nhit    文件:ERDiagramMultiPageEditor.java   
/**
 * {@inheritDoc}
 */
@Override
protected Composite createPageContainer(Composite parent) {
    try {
        IWorkbenchPage page = this.getSite().getWorkbenchWindow()
                .getActivePage();

        if (page != null) {
            page.showView(IPageLayout.ID_OUTLINE);
        }

    } catch (PartInitException e) {
        ERDiagramActivator.showExceptionDialog(e);
    }

    return super.createPageContainer(parent);
}
项目:developer-studio    文件:DeveloperStudioPerspective.java   
@Override
public void createInitialLayout(IPageLayout layout) {
    if (Platform.getOS().equals(Platform.OS_WIN32)){
        final IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
        PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        IWorkbenchPage page = window.getActivePage();
        try {
            hideDashboards();
            PlatformUI.getWorkbench().showPerspective(J2EE_PERSPECTIVE_ID, window);
            page.openEditor(new NullEditorInput(), CLASSIC_DASHBOARD_ID);
        } catch (Exception e) {
        }
    }
    else{
        String editorArea = layout.getEditorArea();
        IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 1f, editorArea);
        topLeft.addView(ANIMATED_DASHBOARD_ID);
    }
}
项目:dawnsci    文件:ExamplePerspective.java   
/**
 * Creates the initial layout for a page.
 */
public void createInitialLayout(IPageLayout layout) {

    layout.setEditorAreaVisible(false);
    addFastViews(layout);
    addViewShortcuts(layout);
    addPerspectiveShortcuts(layout);
    {
        IFolderLayout folderLayout = layout.createFolder("folder", IPageLayout.LEFT, 0.5f, IPageLayout.ID_EDITOR_AREA);
        folderLayout.addView("org.dawnsci.plotting.examples.xyExample");
        folderLayout.addView("org.dawnsci.plotting.examples.xyUpdateExample");
        folderLayout.addView("org.dawnsci.plotting.examples.axisExample");
        folderLayout.addView("org.dawnsci.plotting.examples.barExample");
        folderLayout.addView("org.dawnsci.plotting.examples.imageExample");
        folderLayout.addView("org.dawnsci.plotting.examples.sectorExample");
        folderLayout.addView("org.dawnsci.plotting.examples.surfaceExample");
        folderLayout.addView("org.dawnsci.plotting.examples.vectorExample");
        folderLayout.addView("org.dawnsci.plotting.examples.compositeExample");
        folderLayout.addView("org.dawnsci.plotting.examples.volumeExample");
        folderLayout.addView("org.dawnsci.plotting.examples.plane3DExample");
    }
}
项目:Manal    文件:SuspectAnalysisPerspective.java   
@Override
public void createInitialLayout(IPageLayout layout) {
    // IWorkbenchPage page =
    // PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    // IEditorPart editor = page.getActiveEditor();
    // http://stackoverflow.com/questions/977528/how-do-i-programmatically-resize-an-eclipse-viewpart


    //layout.addView("org.eclipse.jdt.ui.PackageExplorer", IPageLayout.LEFT,(float) 0.3f, layout.getEditorArea());  
    //layout.addView("org.eclipse.ui.editors", IPageLayout.RIGHT, 0.55f, layout.getEditorArea());
    //layout.addView("left", IPageLayout.LEFT, 0.2f, layout.getEditorArea());
    //layout.addView("right", IPageLayout.RIGHT, 0.01f, layout.getEditorArea());
    //layout.addView("com.dforensic.plugin.manal.views.SuspectListVw", IPageLayout.RIGHT, 0.15f, layout.getEditorArea());   
    //right.addView(IPageLayout.ID_EDITOR_AREA);
    //right.addView("com.dforensic.plugin.manal.views.SuspectListVw");
    //layout.getViewLayout("com.dforensic.plugin.manal.views.SuspectListVw").setMoveable(false);
    //layout.getViewLayout(IPageLayout.ID_EDITOR_AREA).setMoveable(false);

    layout.setEditorAreaVisible(true);



}
项目:FoxBPM-Designer    文件:FoxBPMPerspective.java   
@Override
public void createInitialLayout(IPageLayout layout) {
    // 获取透明视图的编辑空间标示
    String editerArea = layout.getEditorArea();

    // 编辑器左上部视图
    IFolderLayout leftTop = layout.createFolder("leftTop", IPageLayout.LEFT, 0.25f, editerArea); // 相对于‘editerArea’编辑器的位置left
    leftTop.addView(ID_FOXBPM_VIEW);//FOXBPM视图
    leftTop.addView(IPageLayout.ID_PROJECT_EXPLORER); // 工程视图

    // 编辑器左下角视图
    IFolderLayout leftBottom = layout.createFolder("leftBottom", IPageLayout.BOTTOM, 0.5f, IPageLayout.ID_PROJECT_EXPLORER); // 相对于上面‘left’视图的位置在底部
    leftBottom.addView(IPageLayout.ID_OUTLINE); // OUTLINE视图

    // 编辑器底部视图
    IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.65f, editerArea); // 相对于‘editerArea’编辑器的位置底部
    bottom.addView(IPageLayout.ID_PROP_SHEET); // 属性视图
    bottom.addView(ID_SERVERS_VIEW);// 服务器视图
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW); // 问题视图
    bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);// 控制台视图
    bottom.addView(ID_SEARCH_VIEW);// 搜索视图
    bottom.addView(ID_HISTORY_VIEW);// 历史视图
}
项目:antlr4ide    文件:Antlr4Perspective.java   
@Override
public void createInitialLayout(final IPageLayout layout) {
  String editorId = layout.getEditorArea();

  IFolderLayout bottom1 = layout.createFolder("bottom1", IPageLayout.BOTTOM, .75f, editorId);
  bottom1.addView(IPageLayout.ID_PROBLEM_VIEW);
  bottom1.addView(IPageLayout.ID_TASK_LIST);
  bottom1.addView(IConsoleConstants.ID_CONSOLE_VIEW);

  IFolderLayout bottom2 = layout.createFolder("bottom2", IPageLayout.RIGHT, .5f, "bottom1");
  bottom2.addView("com.github.jknack.Antlr4.syntaxDiagram");
  bottom2.addView("antlr4.parseTreeView");

  IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, .22f, editorId);
  folder.addView(IPageLayout.ID_PROJECT_EXPLORER);

  IFolderLayout outline = layout.createFolder("right", IPageLayout.RIGHT, .7f, editorId);
  outline.addView(IPageLayout.ID_OUTLINE);
}
项目:jive    文件:JivePerspectiveFactory.java   
@Override
public void createInitialLayout(final IPageLayout layout)
{
  final String editorArea = layout.getEditorArea();
  // Create and populate the execution state folder
  final IFolderLayout executionStateFolderLayout = layout.createFolder(
      JivePerspectiveFactory.ID_FOLDER_EXECUTION_STATE, IPageLayout.RIGHT, (float) 0.45,
      editorArea);
  setExecutionStateFolderViews(executionStateFolderLayout);
  // Create and populate the execution history folder
  final IFolderLayout executionHistoryFolderLayout = layout.createFolder(
      JivePerspectiveFactory.ID_FOLDER_EXECUTION_HISTORY, IPageLayout.BOTTOM, (float) 0.50,
      JivePerspectiveFactory.ID_FOLDER_EXECUTION_STATE);
  setExecutionHistoryFolderViews(executionHistoryFolderLayout);
  // Create and populate the launch folder
  final IFolderLayout launchFolderLayout = layout.createFolder(
      JivePerspectiveFactory.ID_FOLDER_LAUNCH, IPageLayout.TOP, (float) 0.30, editorArea);
  setLaunchFolderViews(launchFolderLayout);
  // Create and populate the console folder
  final IFolderLayout consoleFolderLayout = layout.createFolder(
      JivePerspectiveFactory.ID_FOLDER_CONSOLE, IPageLayout.BOTTOM, (float) 0.67, editorArea);
  setConsoleFolderViews(consoleFolderLayout);
  // Populate the "Window -> Open Perspective" and "Window -> Show View" menus
  setPerspectiveShortcuts(layout);
  setViewShortcuts(layout);
}
项目:vdt-plugin    文件:LaunchShortcut.java   
private static IProject getActiveProject() {
    IProject project = null;

    IWorkbenchWindow wb = VerilogPlugin.getActiveWorkbenchWindow();
    if (wb != null) {
        IWorkbenchPage page = wb.getActivePage();
        if (page != null) {
            project = getActiveProject(page.getSelection());
            if (project == null)
                project = getActiveProject(page.getActiveEditor());
            if (project == null)
                project = getActiveProject(page.findView(IPageLayout.ID_RES_NAV));
        }
    }

    if (project == null)
        project = getActiveProject(VerilogPlugin.getWorkspace().getRoot().getProjects());

    return project;
}