郁闷的Perspective

下午正式开始RCP开发,于是乎轻车熟路的开始打基础框架。
       
       1. 建RCP项目
       2. 复制Form的jar包
       3. 写第一次使用时需要维护信息的Wizard和WizardPage
       4. 写用户登录窗口
       5. 在ApplicationWorkbenchWindowAdvisor中增加最大化代码,在ApplicationWorkbenchAdvisor中增加保存用户配置的代码

1      public   void  postWindowOpen() {
2        this.getWindowConfigurer().getWindow().getShell().setMaximized(true);
3    }

 

1      public   void  initialize(IWorkbenchConfigurer configurer)  {
2         configurer.setSaveAndRestore(true);
3    }


       5. 写Perspective们

       6. 写View们
       7. 给Perspective们分配View们
    run一下看看~晕,什么都不出来~Why!

    寻了一大圈才发现问题出在第五步给ApplicationWorkbenchAdvisor中增加保存用户配置的代码上~注释掉configurer.setSaveAndRestore( true );就一切正常了。

    非常之不解,难道是我再给Perspective们分配View们之前已经run过了,所以记录了我的布局方式了?不至于这么白痴吧~
希望知道的大哥给解释一下~

你可能感兴趣的:(框架)