新创建的VIEW已经加到透视图中,但是打开程序时就是不显示相应的视图.
解决方法:
原来是设置了这个导致的
configurer.setSaveAndRestore(true);
代码如下:
package com.act.mac.upload.intro;
import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
private static final String PERSPECTIVE_ID = "com.act.mac.upload.perspective";
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
public void initialize(IWorkbenchConfigurer configurer) {
super.initialize(configurer);
//configurer.setSaveAndRestore(true);//注释掉就OK了
}
public String getInitialWindowPerspectiveId() {
return PERSPECTIVE_ID;
}
}
posted on 2012-06-08 11:25
Ke 阅读(2404)
评论(4) 编辑 收藏 所属分类:
eclipse RCP