2015-06-01 61 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處理。這可能是一個開始的好地方,但要小心這個課程,它的內部