2015-06-01 122 views
0

我想在Eclipse RCE应用程序中使用JFace实现选项卡式对话框。其中一个选项卡的内容应该是ContainerSelectionDialog,其内容如下所示:带有标签的JFace对话框

ContainerSelectionDialog dialog = new ContainerSelectionDialog(
     Display.getDefault().getActiveShell(), container, true, 
     "Please select target folder"); 
int open = dialog.open(); 
if (!(open == org.eclipse.jface.window.Window.OK)) 
    return null; 
Object[] result = dialog.getResult(); 

IPath path = (IPath) result[0]; 
targetFolder = ResourcesPlugin.getWorkspace().getRoot().findMember(path); 
containerPath = targetFolder.getLocation().toPortableString(); 

这怎么可能imlement一个标签对话框,并添加ContainerSelectionDialog的标签之一?

回答

1

你不能那样做。正如你所说,SelectionContainerDialog 一个对话框。所以你不能把它的内容放到另一个对话框中。

看看SelectionContainerDialog类,主要内容由另一个类SelectionContainerGroup处理。这可能是一个开始的好地方,但要小心这个课程,它的内部