各位高手,我需要在插件中打击一个按钮打开一个shell窗口,单独能够打开这个窗口,但是在action里面链接就不行。请教各位
action中的run()方法是这样的:
public void run(IAction action) {try{
FileTableViewer ftv=new FileTableViewer();
ftv.creatFileTableViewerContent();
}catch(Exception e){
e.printStackTrace();
}
FileTableViewer.java中获取shell代码:
  Display display=PlatformUI.getWorkbench().getDisplay();//问题应该是在这里,dispaly需要从
  //插件中的workbench获取
  Shell parent=new Shell(display);