---
title: "关于选择文件夹对话框ContainerSelectionDialog的问题"
author: "my520"
date: "2010-09-09T17:21:45Z"
tags: []
categories: ["非技术"]
slug: "containerselectiondialog"
draft: false
lastmod: "2010-09-09T17:21:45Z"
id: 759662
url: "https://my520.iteye.com/blog/759662"
---

private void handleBrowse() {
     ContainerSelectionDialog dialog = new ContainerSelectionDialog(
		getShell(), ResourcesPlugin.getWorkspace().getRoot().getProject(),true,
		"Select new file container");
    dialog.setTitle("请选择文件夹");
    if (dialog.open() == ContainerSelectionDialog.OK) {
           Object result = dialog.getResult();
           if (result.length == 1) {
	        text.setText(((Path) result).toString());
	  }
    }
		
		
}
为什么出现的对话框中没有可以选择的文件夹？大家帮我分析下啊，用模板生成的也没有文件夹可以选择，不知道是什么愿意