网站首页 新闻首页 网页设计图形动画软件编程网站开发办公软件操作系统数据库网络技术认证考试范文资料黑客攻防 书籍教程 进入论坛

扩展Eclipse Pespectives时,设置自己Pesptective的布局

http://www.diybl.com/ 2008-3-8  网络 点击:  [ 评论 ]
文章搜索:    【点击打包该文章】

       开发Eclipse插件或RCP,有时需要扩展eclipse pespective point ,通过实现IPerspectiveFactory建立自己的Perspective。如何对自己的Pespective 布局进行设置?结合前段时间所做应用,我把自己对如何设置Pespective布局的理解记录下来,供自己以后参考,也希望能对大家有所帮助。
       为了说起来方便,这里先把我自己实现的createInitialLayout方法贴出来:
           

public void createInitialLayout(IPageLayout  layout) {
        String editorArea 
= layout.getEditorArea();
        IFolderLayout left
=layout.createFolder("left", IPageLayout.LEFT, 0.2f, editorArea);
        left.addView(
"org.eclipse.ui.views.ResourceNavigator");

        IFolderLayout bottom
=layout.createFolder("bottom", IPageLayout.BOTTOM, 0.8f, editorArea);
        bottom.addView(“MyView1”);
        bottom.addView(“MyView2”);
        
        IFolderLayout right
=layout.createFolder("right", IPageLayout.RIGHT, 0.8f, editorArea);
        right.addView(&ldq

欢迎光临DIY部落,点击这里查看更多文章教程   【点击打包该文章】
[1] [2]
如果图片或页面不能正常显示请点击这里 站内搜索:   

文章评论

请您留言

 

最新新闻